branch: externals/marginalia
commit c1365bf0c7b5d32e7531fa8f1a9a3b64a155cec0
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Pretty print oclosures
---
marginalia.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/marginalia.el b/marginalia.el
index 73b41fcc38..3e8783e325 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -592,6 +592,9 @@ keybinding since CAND includes it."
;; Emacs bug#53988: abbrev-table-p throws an error
((guard (ignore-errors (abbrev-table-p val))) (propertize
"#<abbrev-table>" 'face 'marginalia-value))
((pred char-table-p) (propertize "#<char-table>" 'face
'marginalia-value))
+ ;; Emacs 29 comes with callable objects or object closures
(OClosures)
+ ((guard (and (fboundp 'oclosure-type) (oclosure-type val)))
+ (format (propertize "#<oclosure %s>" 'face 'marginalia-function)
(oclosure-type val)))
((pred byte-code-function-p) (propertize "#<byte-code-function>"
'face 'marginalia-function))
((and (pred functionp) (pred symbolp))
;; NOTE: We are not consistent here, values are generally printed
unquoted. But we