Commit 4591cb90 authored by Richard M. Stallman's avatar Richard M. Stallman

(describe-function): Print the arglist if the function is bytecode or a list.

parent 9b2471df
...@@ -311,10 +311,24 @@ C-w print information on absence of warranty for GNU Emacs." ...@@ -311,10 +311,24 @@ C-w print information on absence of warranty for GNU Emacs."
;;; (nth 1 def) ;;; (nth 1 def)
)) ))
(t ""))) (t "")))
(terpri)) (terpri)
(if (documentation function) (if (documentation function)
(princ (documentation function)) (princ (documentation function))
(princ "not documented")) (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) (print-help-return-message)
;; Return the text we displayed. ;; Return the text we displayed.
(save-excursion (set-buffer standard-output) (buffer-string)))) (save-excursion (set-buffer standard-output) (buffer-string))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment