# HG changeset patch # User Augie Fackler # Date 1247163906 18000 # Node ID 15bcc3e0afebbeeadc5fd516a0889012493e6776 # Parent 2ae20e96f6c0095754569eec7835b4c273791abd Function for selecting text inside of a quote pair. diff --git a/.elisp/settings/50.localfuncs.el b/.elisp/settings/50.localfuncs.el --- a/.elisp/settings/50.localfuncs.el +++ b/.elisp/settings/50.localfuncs.el @@ -60,3 +60,17 @@ Symbols matching the text at point are p (defun hg-rm-this-file () (interactive) (shell-command-to-string (concat "hg rm " (shell-quote-argument buffer-file-name)))) + +;; Lifted from http://code.google.com/p/ergoemacs/ +(defun select-text-in-quote () + "Select text between the nearest left and right delimiters. +Delimiters are paired characters: ()[]<>«»“”‘’「」, including \"\"." + (interactive) + (let (b1 b2) + (skip-chars-backward "^<>(“{[「«\"‘") + (setq b1 (point)) + (skip-chars-forward "^<>)”}]」»\"’") + (setq b2 (point)) + (set-mark b1) + ) + )