From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Štěpán Němec" <stepnem@gmail.com>
Cc: 7147@debbugs.gnu.org, rfrancoise@debian.org
Subject: bug#7147: 24.0.50; M-: minibuffer completion chokes at `:'
Date: Sat, 09 Oct 2010 17:46:58 +0200 [thread overview]
Message-ID: <jwvy6a7qst5.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <874od43geg.fsf@gmail.com> ("Štěpán Němec"'s message of "Sat, 02 Oct 2010 14:53:11 +0200")
> 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@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@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
next prev parent reply other threads:[~2010-10-09 15:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-02 12:53 bug#7147: 24.0.50; M-: minibuffer completion chokes at `:' Štěpán Němec
2010-10-09 15:46 ` Stefan Monnier [this message]
2010-10-12 0:07 ` Juanma Barranquero
2010-10-17 13:06 ` Štěpán Němec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvy6a7qst5.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=7147@debbugs.gnu.org \
--cc=rfrancoise@debian.org \
--cc=stepnem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.