diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-12 16:09:23 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-12 16:09:23 -0400 |
commit | 4afafa03704aab0c21e4cb4f028256ecead5f795 (patch) | |
tree | 17884b80cd29d6d070e2dd24e15e8fa4b5ef313e /lisp/emacs-lisp | |
parent | 8df673907781bce8b080b91b056cb9987587387c (diff) | |
download | emacs-4afafa03704aab0c21e4cb4f028256ecead5f795.tar.gz emacs-4afafa03704aab0c21e4cb4f028256ecead5f795.tar.bz2 emacs-4afafa03704aab0c21e4cb4f028256ecead5f795.zip |
Try and avoid hardcoding lists of function types
* lisp/bind-key.el (bind-key--get-binding-description):
Show docstrings for compiled functions also. Don't hardcode knowledge
about various particular kinds of functions.
* lisp/emacs-lisp/bytecomp.el (display-call-tree): Remove special
support for functions with a `byte-code` body since we never generate
that nowadays. Don't hardcode knowledge
about various particular kinds of functions.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index cf0e6d600dd..7af568cfe34 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -5536,23 +5536,14 @@ invoked interactively." (if (null f) " <top level>";; shouldn't insert nil then, actually -sk " <not defined>")) - ((subrp (setq f (symbol-function f))) - " <subr>") - ((symbolp f) + ((symbolp (setq f (symbol-function f))) ;; An alias. (format " ==> %s" f)) - ((byte-code-function-p f) - "<compiled function>") ((not (consp f)) - "<malformed function>") + (format " <%s>" (type-of f))) ((eq 'macro (car f)) - (if (or (compiled-function-p (cdr f)) - ;; FIXME: Can this still happen? - (assq 'byte-code (cdr (cdr (cdr f))))) + (if (compiled-function-p (cdr f)) " <compiled macro>" " <macro>")) - ((assq 'byte-code (cdr (cdr f))) - ;; FIXME: Can this still happen? - "<compiled lambda>") ((eq 'lambda (car f)) "<function>") (t "???")) |