diff options
| author | Stefan Monnier | 2024-01-18 14:05:16 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2024-01-18 14:05:16 -0500 |
| commit | a33f3947ea1ba429570e2ecb4c3167341dcae1a2 (patch) | |
| tree | d5ce0c94c40f2db71e462e38864203e5e7049fd3 | |
| parent | b07a86abb6d5bb3d5cd178bb77592ad7208882f5 (diff) | |
| download | emacs-a33f3947ea1ba429570e2ecb4c3167341dcae1a2.tar.gz emacs-a33f3947ea1ba429570e2ecb4c3167341dcae1a2.zip | |
* lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Fix bug#68514
Redo the commit 0db2126d7176 to try and avoid selecting more than
a mere symbol.
| -rw-r--r-- | lisp/progmodes/elisp-mode.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 00910fb67c7..da0cb96e1cf 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el | |||
| @@ -657,12 +657,13 @@ functions are annotated with \"<f>\" via the | |||
| 657 | (save-excursion | 657 | (save-excursion |
| 658 | (backward-sexp 1) | 658 | (backward-sexp 1) |
| 659 | (skip-chars-forward "`',‘#") | 659 | (skip-chars-forward "`',‘#") |
| 660 | (point)) | 660 | (min (point) pos)) |
| 661 | (scan-error pos))) | 661 | (scan-error pos))) |
| 662 | (end | 662 | (end |
| 663 | (unless (or (eq beg (point-max)) | 663 | (cond |
| 664 | (member (char-syntax (char-after beg)) | 664 | ((and (< beg (point-max)) |
| 665 | '(?\" ?\())) | 665 | (memq (char-syntax (char-after beg)) |
| 666 | '(?w ?\\ ?_))) | ||
| 666 | (condition-case nil | 667 | (condition-case nil |
| 667 | (save-excursion | 668 | (save-excursion |
| 668 | (goto-char beg) | 669 | (goto-char beg) |
| @@ -670,7 +671,11 @@ functions are annotated with \"<f>\" via the | |||
| 670 | (skip-chars-backward "'’") | 671 | (skip-chars-backward "'’") |
| 671 | (when (>= (point) pos) | 672 | (when (>= (point) pos) |
| 672 | (point))) | 673 | (point))) |
| 673 | (scan-error pos)))) | 674 | (scan-error pos))) |
| 675 | ((or (>= beg (point-max)) | ||
| 676 | (memq (char-syntax (char-after beg)) | ||
| 677 | '(?\) ?\s))) | ||
| 678 | beg))) | ||
| 674 | ;; t if in function position. | 679 | ;; t if in function position. |
| 675 | (funpos (eq (char-before beg) ?\()) | 680 | (funpos (eq (char-before beg) ?\()) |
| 676 | (quoted (elisp--form-quoted-p beg)) | 681 | (quoted (elisp--form-quoted-p beg)) |