summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-02-19 05:06:28 +0000
committerRichard M. Stallman <rms@gnu.org>1993-02-19 05:06:28 +0000
commit4591cb9059790dfb3fd0f322e9edfc82d2c73d24 (patch)
tree61d5dd4b3024dc5dcbdf120f3eb1255a0c30b5c1 /lisp/help.el
parent9b2471dfa9867cd987fe11e86c39b31bfcf72934 (diff)
downloademacs-4591cb9059790dfb3fd0f322e9edfc82d2c73d24.tar.gz
(describe-function): Print the arglist if the function is bytecode or a list.
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el22
1 files changed, 18 insertions, 4 deletions
diff --git a/lisp/help.el b/lisp/help.el
index d968aedb7a7..95d08297361 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -311,10 +311,24 @@ C-w print information on absence of warranty for GNU Emacs."
;;; (nth 1 def)
))
(t "")))
- (terpri))
- (if (documentation function)
- (princ (documentation function))
- (princ "not documented"))
+ (terpri)
+ (if (documentation function)
+ (princ (documentation function))
+ (princ "not documented"))
+ (cond ((byte-code-function-p def)
+ (save-excursion
+ (set-buffer standard-output)
+ (or (eq (char-after (1- (point-max))) ?\n)
+ (terpri)))
+ (terpri)
+ (princ (car (append def nil))))
+ ((eq (car-safe def) 'lambda)
+ (save-excursion
+ (set-buffer standard-output)
+ (or (eq (char-after (1- (point-max))) ?\n)
+ (terpri)))
+ (terpri)
+ (princ (nth 1 def)))))
(print-help-return-message)
;; Return the text we displayed.
(save-excursion (set-buffer standard-output) (buffer-string))))