diff options
| author | Richard M. Stallman | 1996-06-29 01:02:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-06-29 01:02:59 +0000 |
| commit | 5377087736872b0ea7e400647a986ef6f74d58ef (patch) | |
| tree | d83413ae1993032d355e1d81122385b0378ae451 /lisp | |
| parent | 77f76e3e1b83c55e1a033aef28bce51e16b1612a (diff) | |
| download | emacs-5377087736872b0ea7e400647a986ef6f74d58ef.tar.gz emacs-5377087736872b0ea7e400647a986ef6f74d58ef.zip | |
(mouse-start-end): Support selecting strings by double
clicking on a character with quote syntax.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/mouse.el | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 41fda55689b..23f5c192e3f 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -651,6 +651,31 @@ If DIR is positive skip forward; if negative, skip backward." | |||
| 651 | (backward-sexp 1) | 651 | (backward-sexp 1) |
| 652 | (point)) | 652 | (point)) |
| 653 | (1+ start))) | 653 | (1+ start))) |
| 654 | ((and (= mode 1) | ||
| 655 | (= start end) | ||
| 656 | (char-after start) | ||
| 657 | (= (char-syntax (char-after start)) ?\")) | ||
| 658 | (let ((open (or (eq start (point-min)) | ||
| 659 | (save-excursion | ||
| 660 | (goto-char (- start 1)) | ||
| 661 | (looking-at "\\s(\\|\\s \\|\\s>"))))) | ||
| 662 | (if open | ||
| 663 | (list start | ||
| 664 | (save-excursion | ||
| 665 | (condition-case nil | ||
| 666 | (progn | ||
| 667 | (goto-char start) | ||
| 668 | (forward-sexp 1) | ||
| 669 | (point)) | ||
| 670 | (error end)))) | ||
| 671 | (list (1+ start) | ||
| 672 | (save-excursion | ||
| 673 | (condition-case nil | ||
| 674 | (progn | ||
| 675 | (goto-char (1+ start)) | ||
| 676 | (backward-sexp 1) | ||
| 677 | (point)) | ||
| 678 | (error end))))))) | ||
| 654 | ((= mode 1) | 679 | ((= mode 1) |
| 655 | (list (save-excursion | 680 | (list (save-excursion |
| 656 | (goto-char start) | 681 | (goto-char start) |