From b89d72a18a7211ffb0ffd25c2b423dd553f4cc5f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 8 Sep 1999 07:41:52 +0000 Subject: [PATCH] (describe-function-1): Don't return empty string for keymaps. --- lisp/help.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lisp/help.el b/lisp/help.el index 40d8521e7dc..957a0fc637f 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -646,6 +646,18 @@ It can also be nil, if the definition is not associated with any file." (if (eq (nth 4 def) 'keymap) "keymap" (if (nth 4 def) "Lisp macro" "Lisp function")) )) + ;; perhaps use keymapp here instead + ((eq (car-safe def) 'keymap) + (let ((is-full nil) + (elts (cdr-safe def))) + (while elts + (if (char-table-p (car-safe elts)) + (setq is-full t + elts nil)) + (setq elts (cdr-safe elts))) + (if is-full + "a full keymap" + "a sparse keymap"))) (t ""))) (when (and parens (not (equal string ""))) (setq need-close t) -- 2.39.5