[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point):
From: |
Stefan Monnier |
Subject: |
Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start |
Date: |
Tue, 11 Feb 2014 20:42:10 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
>> Yes, except that "a quote before BEG" is not sufficient.
>> We could/should also check if one of the parent open-parens is prefixed
>> with a quote or a backquote, and only allow boundp if not.
> Ok to install?
Let's keep it for after 24.4. It's clearly a new feature, and I don't
see any hurry to implement it.
> +(defun lisp--form-quoted-p ()
> + "Return non-nil if the form after point is not evaluated.
> +It can be quoted, or be inside a quoted form.
> +This function moves point."
> + ;; FIXME: Do some macro expansion maybe.
> + (or (eq (char-after) ?\[)
> + (progn
> + (skip-chars-backward " ")
> + (memq (char-before) '(?' ?`)))
> + (and (not (eq (char-before) ?,))
> + (ignore-errors
> + (up-list -1)
> + (lisp--form-quoted-p)))))
I think we'd want to use (nth 9 (syntax-ppss)) rather than up-list (it's
got the start pos of all enclosing lists in ). Using syntax-ppss should
also help us handle the case we're inside a comment/string.
> `defadvice', ideally, would have to be handled specially anyway, to limit
> completions to functions.
Yes. And `function' (aka #') should only complete functions as well.
Stefan
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, (continued)
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Michael Heerdegen, 2014/02/06
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Dmitry Gutov, 2014/02/10
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Michael Heerdegen, 2014/02/11
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Dmitry Gutov, 2014/02/11
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Michael Heerdegen, 2014/02/12
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Dmitry Gutov, 2014/02/13
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Michael Heerdegen, 2014/02/13
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Stefan Monnier, 2014/02/13
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Dmitry Gutov, 2014/02/13
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start,
Stefan Monnier <=
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Dmitry Gutov, 2014/02/13
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Michael Heerdegen, 2014/02/13
- Re: trunk r116285: * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start, Dmitry Gutov, 2014/02/13