[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a33f3947ea1: * lisp/progmodes/elisp-mode.el (elisp-completion-at-
From: |
Stefan Monnier |
Subject: |
master a33f3947ea1: * lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Fix bug#68514 |
Date: |
Thu, 18 Jan 2024 14:05:27 -0500 (EST) |
branch: master
commit a33f3947ea1ba429570e2ecb4c3167341dcae1a2
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* 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.
---
lisp/progmodes/elisp-mode.el | 15 ++++++++++-----
1 file 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
(save-excursion
(backward-sexp 1)
(skip-chars-forward "`',‘#")
- (point))
+ (min (point) pos))
(scan-error pos)))
(end
- (unless (or (eq beg (point-max))
- (member (char-syntax (char-after beg))
- '(?\" ?\()))
+ (cond
+ ((and (< beg (point-max))
+ (memq (char-syntax (char-after beg))
+ '(?w ?\\ ?_)))
(condition-case nil
(save-excursion
(goto-char beg)
@@ -670,7 +671,11 @@ functions are annotated with \"<f>\" via the
(skip-chars-backward "'’")
(when (>= (point) pos)
(point)))
- (scan-error pos))))
+ (scan-error pos)))
+ ((or (>= beg (point-max))
+ (memq (char-syntax (char-after beg))
+ '(?\) ?\s)))
+ beg)))
;; t if in function position.
(funpos (eq (char-before beg) ?\())
(quoted (elisp--form-quoted-p beg))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a33f3947ea1: * lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Fix bug#68514,
Stefan Monnier <=