* lisp/subr.el (macrop): New function.
(text-clone--maintaining): New var. (text-clone--maintain): Rename from text-clone-maintain. Use it instead of inhibit-modification-hooks. * lisp/emacs-lisp/nadvice.el (advice--normalize): For aliases to macros, use a proxy, so as handle autoloads and redefinitions of the target. (advice--defalias-fset, advice-remove): Use advice--symbol-function. * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Remove bogus (arrayp . stringp) pair. Add entries for `vectorp'. (pcase--mutually-exclusive-p): New function. (pcase--split-consp): Use it. (pcase--split-pred): Use it. Optimize the case where `pat' is a qpat mutually exclusive with the current predicate. * test/automated/advice-tests.el (advice-tests-nadvice): Test removal before definition. (advice-tests-macroaliases): New test. * lisp/emacs-lisp/edebug.el (edebug-lookup-function): Remove function. (edebug-macrop): Remove. Use `macrop' instead. * lisp/emacs-lisp/advice.el (ad-subr-p): Remove. Use `subrp' instead. (ad-macro-p): * lisp/eshell/esh-cmd.el (eshell-macrop): * lisp/apropos.el (apropos-macrop): Remove. Use `macrop' instead.
This commit is contained in:
parent
e443729d65
commit
671d5c1654
11 changed files with 106 additions and 90 deletions
|
@ -295,19 +295,6 @@ A lambda list keyword is a symbol that starts with `&'."
|
|||
(eq (selected-window)
|
||||
(next-window (next-window (selected-window))))))
|
||||
|
||||
(defsubst edebug-lookup-function (object)
|
||||
(while (and (symbolp object) (fboundp object))
|
||||
(setq object (symbol-function object)))
|
||||
object)
|
||||
|
||||
(defun edebug-macrop (object)
|
||||
"Return the macro named by OBJECT, or nil if it is not a macro."
|
||||
(setq object (edebug-lookup-function object))
|
||||
(if (and (listp object)
|
||||
(eq 'macro (car object))
|
||||
(functionp (cdr object)))
|
||||
object))
|
||||
|
||||
(defun edebug-sort-alist (alist function)
|
||||
;; Return the ALIST sorted with comparison function FUNCTION.
|
||||
;; This uses 'sort so the sorting is destructive.
|
||||
|
@ -1416,7 +1403,7 @@ expressions; a `progn' form will be returned enclosing these forms."
|
|||
; but leave it in for compatibility.
|
||||
))
|
||||
;; No edebug-form-spec provided.
|
||||
((edebug-macrop head)
|
||||
((macrop head)
|
||||
(if edebug-eval-macro-args
|
||||
(edebug-forms cursor)
|
||||
(edebug-sexps cursor)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue