GNU bug report logs -
#7147
24.0.50; M-: minibuffer completion chokes at `:'
Previous Next
Reported by: Štěpán Němec <stepnem <at> gmail.com>
Date: Sat, 2 Oct 2010 13:02:02 UTC
Severity: normal
Found in version 24.0.50
Done: Štěpán Němec <stepnem <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 7147 <at> debbugs.gnu.org (full text, mbox):
> Steps to reproduce:
> emacs -Q
> (defun too:bad () nil)
> M-: (too M-TAB
> => lists completions including `too:bad'
> M-: (too: M-TAB
> => [Nothing to complete]
Thanks. A similar problem exists in Emacs-23, tho with slightly less
severe symptoms. I've checked the fix below in emacs-23 which will
propagate to trunk soonish.
Please confirm when it is fixed,
Stefan
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2010-10-09 10:51:42 +0000
+++ lisp/ChangeLog 2010-10-09 15:41:56 +0000
@@ -1,3 +1,8 @@
+2010-10-09 Stefan Monnier <monnier <at> iro.umontreal.ca>
+
+ * emacs-lisp/lisp.el (lisp-completion-at-point):
+ Use emacs-lisp-mode-syntax-table for the whole function.
+
2010-10-09 Richard Sharman <richard_sharman <at> mitel.com> (tiny change)
* progmodes/gdb-ui.el (gdb-mouse-toggle-breakpoint-margin)
=== modified file 'lisp/emacs-lisp/lisp.el'
--- lisp/emacs-lisp/lisp.el 2010-04-20 07:54:28 +0000
+++ lisp/emacs-lisp/lisp.el 2010-10-09 15:37:41 +0000
@@ -632,13 +632,13 @@
(defun lisp-completion-at-point (&optional predicate)
"Function used for `completion-at-point-functions' in `emacs-lisp-mode'."
;; FIXME: the `end' could be after point?
+ (with-syntax-table emacs-lisp-mode-syntax-table
(let* ((end (point))
- (beg (with-syntax-table emacs-lisp-mode-syntax-table
- (save-excursion
+ (beg (save-excursion
(backward-sexp 1)
(while (= (char-syntax (following-char)) ?\')
(forward-char 1))
- (point))))
+ (point)))
(predicate
(or predicate
(save-excursion
@@ -653,7 +653,7 @@
(eq (char-after) ?\())
(error nil))
;; If the first element of the parent list is an open
- ;; parenthesis we are probably not in a funcall position.
+ ;; paren we are probably not in a funcall position.
;; Maybe a `let' varlist or something.
nil
;; Else, we assume that a function name is expected.
@@ -662,7 +662,7 @@
:predicate predicate
:annotate-function
(unless (eq predicate 'fboundp)
- (lambda (str) (if (fboundp (intern-soft str)) " <f>"))))))
+ (lambda (str) (if (fboundp (intern-soft str)) " <f>")))))))
;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e
;;; lisp.el ends here
This bug report was last modified 14 years and 257 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.