Mercurial > emacs
changeset 15561:6f50026fd1e6
(mouse-start-end): Support selecting strings by double
clicking on a character with quote syntax.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 29 Jun 1996 01:02:59 +0000 |
parents | 0ce70615b9e9 |
children | 335159567eb8 |
files | lisp/mouse.el |
diffstat | 1 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mouse.el Sat Jun 29 00:57:36 1996 +0000 +++ b/lisp/mouse.el Sat Jun 29 01:02:59 1996 +0000 @@ -651,6 +651,31 @@ (backward-sexp 1) (point)) (1+ start))) + ((and (= mode 1) + (= start end) + (char-after start) + (= (char-syntax (char-after start)) ?\")) + (let ((open (or (eq start (point-min)) + (save-excursion + (goto-char (- start 1)) + (looking-at "\\s(\\|\\s \\|\\s>"))))) + (if open + (list start + (save-excursion + (condition-case nil + (progn + (goto-char start) + (forward-sexp 1) + (point)) + (error end)))) + (list (1+ start) + (save-excursion + (condition-case nil + (progn + (goto-char (1+ start)) + (backward-sexp 1) + (point)) + (error end))))))) ((= mode 1) (list (save-excursion (goto-char start)