Function-quote completion property of declare form
For discussion, see the following thread: https://lists.gnu.org/r/emacs-devel/2021-02/msg01666.html * lisp/emacs-lisp/byte-run.el (byte-run--set-completion): Quote with 'function' for syntactical consistency with other declare form properties. This allows writing (declare (completion foo)) instead of (declare (completion 'foo)). * lisp/emacs-lisp/easymenu.el (easy-menu-do-define): * lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Prefer function-put over put for function symbols. * lisp/subr.el (ignore, undefined): Remove #'-quoting from declare form; it is no longer needed.
This commit is contained in:
parent
70f2d658e4
commit
752278834b
4 changed files with 6 additions and 6 deletions
|
@ -149,7 +149,7 @@ The return value of this function is not used."
|
||||||
(defalias 'byte-run--set-completion
|
(defalias 'byte-run--set-completion
|
||||||
#'(lambda (f _args val)
|
#'(lambda (f _args val)
|
||||||
(list 'function-put (list 'quote f)
|
(list 'function-put (list 'quote f)
|
||||||
''completion-predicate val)))
|
''completion-predicate (list 'function val))))
|
||||||
|
|
||||||
(defalias 'byte-run--set-modes
|
(defalias 'byte-run--set-modes
|
||||||
#'(lambda (f _args &rest val)
|
#'(lambda (f _args &rest val)
|
||||||
|
|
|
@ -184,12 +184,12 @@ This is expected to be bound to a mouse event."
|
||||||
(funcall
|
(funcall
|
||||||
(or (plist-get (get symbol 'menu-prop)
|
(or (plist-get (get symbol 'menu-prop)
|
||||||
:filter)
|
:filter)
|
||||||
'identity)
|
#'identity)
|
||||||
(symbol-function symbol)))
|
(symbol-function symbol)))
|
||||||
symbol))))
|
symbol))))
|
||||||
;; These symbols are commands, but not interesting for users
|
;; These symbols are commands, but not interesting for users
|
||||||
;; to `M-x TAB'.
|
;; to `M-x TAB'.
|
||||||
(put symbol 'completion-predicate 'ignore))
|
(function-put symbol 'completion-predicate #'ignore))
|
||||||
(dolist (map (if (keymapp maps) (list maps) maps))
|
(dolist (map (if (keymapp maps) (list maps) maps))
|
||||||
(define-key map
|
(define-key map
|
||||||
(vector 'menu-bar (easy-menu-intern (car menu)))
|
(vector 'menu-bar (easy-menu-intern (car menu)))
|
||||||
|
|
|
@ -2517,7 +2517,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
|
||||||
(let ((gnus-summary-show-article-charset-alist
|
(let ((gnus-summary-show-article-charset-alist
|
||||||
`((1 . ,cs))))
|
`((1 . ,cs))))
|
||||||
(gnus-summary-show-article 1))))
|
(gnus-summary-show-article 1))))
|
||||||
(put command 'completion-predicate 'ignore)
|
(function-put command 'completion-predicate #'ignore)
|
||||||
`[,(symbol-name cs) ,command t]))
|
`[,(symbol-name cs) ,command t]))
|
||||||
(sort (coding-system-list) #'string<)))))
|
(sort (coding-system-list) #'string<)))))
|
||||||
("Washing"
|
("Washing"
|
||||||
|
|
|
@ -375,7 +375,7 @@ PREFIX is a string, and defaults to \"g\"."
|
||||||
"Do nothing and return nil.
|
"Do nothing and return nil.
|
||||||
This function accepts any number of ARGUMENTS, but ignores them.
|
This function accepts any number of ARGUMENTS, but ignores them.
|
||||||
Also see `always'."
|
Also see `always'."
|
||||||
(declare (completion #'ignore))
|
(declare (completion ignore))
|
||||||
(interactive)
|
(interactive)
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
|
@ -923,7 +923,7 @@ For an approximate inverse of this, see `key-description'."
|
||||||
|
|
||||||
(defun undefined ()
|
(defun undefined ()
|
||||||
"Beep to tell the user this binding is undefined."
|
"Beep to tell the user this binding is undefined."
|
||||||
(declare (completion #'ignore))
|
(declare (completion ignore))
|
||||||
(interactive)
|
(interactive)
|
||||||
(ding)
|
(ding)
|
||||||
(if defining-kbd-macro
|
(if defining-kbd-macro
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue