diff .elisp/settings/50.localfuncs.el @ 125:15bcc3e0afeb

Function for selecting text inside of a quote pair.
author Augie Fackler <durin42@gmail.com>
date Thu, 09 Jul 2009 13:25:06 -0500
parents 2ae20e96f6c0
children 34b698771af9
line wrap: on
line diff
--- 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)
+   )
+ )