comparison .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
comparison
equal deleted inserted replaced
124:2ae20e96f6c0 125:15bcc3e0afeb
58 58
59 59
60 (defun hg-rm-this-file () 60 (defun hg-rm-this-file ()
61 (interactive) 61 (interactive)
62 (shell-command-to-string (concat "hg rm " (shell-quote-argument buffer-file-name)))) 62 (shell-command-to-string (concat "hg rm " (shell-quote-argument buffer-file-name))))
63
64 ;; Lifted from http://code.google.com/p/ergoemacs/
65 (defun select-text-in-quote ()
66 "Select text between the nearest left and right delimiters.
67 Delimiters are paired characters: ()[]<>«»“”‘’「」, including \"\"."
68 (interactive)
69 (let (b1 b2)
70 (skip-chars-backward "^<>(“{[「«\"‘")
71 (setq b1 (point))
72 (skip-chars-forward "^<>)”}]」»\"’")
73 (setq b2 (point))
74 (set-mark b1)
75 )
76 )