mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
Add 'safety' function declaration
* lisp/emacs-lisp/comp.el (comp-known-predicates): Use 'comp-func-safety'. (comp-ctxt, comp-mvar-type-hint-match-p): New 'safety' slot. (comp-c-func-name): New function. (comp--spill-lap-function, comp--intern-func-in-ctxt): Update. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Spill safety. * lisp/emacs-lisp/byte-run.el (byte-run--set-completion): New alias. (defun-declarations-alist): Update.
This commit is contained in:
parent
13ddfc2011
commit
9e4e6d0fc9
3 changed files with 19 additions and 0 deletions
|
|
@ -193,6 +193,11 @@ So far, FUNCTION can only be a symbol, not a lambda expression."
|
|||
(list 'function-put (list 'quote f)
|
||||
''speed (list 'quote val))))
|
||||
|
||||
(defalias 'byte-run--set-safety
|
||||
#'(lambda (f _args val)
|
||||
(list 'function-put (list 'quote f)
|
||||
''safety (list 'quote val))))
|
||||
|
||||
(defalias 'byte-run--set-completion
|
||||
#'(lambda (f _args val)
|
||||
(list 'function-put (list 'quote f)
|
||||
|
|
@ -242,6 +247,7 @@ If `error-free', drop calls even if `byte-compile-delete-errors' is nil.")
|
|||
(list 'doc-string #'byte-run--set-doc-string)
|
||||
(list 'indent #'byte-run--set-indent)
|
||||
(list 'speed #'byte-run--set-speed)
|
||||
(list 'safety #'byte-run--set-safety)
|
||||
(list 'completion #'byte-run--set-completion)
|
||||
(list 'modes #'byte-run--set-modes)
|
||||
(list 'interactive-args #'byte-run--set-interactive-args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue