aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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."
311;;; (nth 1 def) 311;;; (nth 1 def)
312 )) 312 ))
313 (t ""))) 313 (t "")))
314 (terpri)) 314 (terpri)
315 (if (documentation function) 315 (if (documentation function)
316 (princ (documentation function)) 316 (princ (documentation function))
317 (princ "not documented")) 317 (princ "not documented"))
318 (cond ((byte-code-function-p def)
319 (save-excursion
320 (set-buffer standard-output)
321 (or (eq (char-after (1- (point-max))) ?\n)
322 (terpri)))
323 (terpri)
324 (princ (car (append def nil))))
325 ((eq (car-safe def) 'lambda)
326 (save-excursion
327 (set-buffer standard-output)
328 (or (eq (char-after (1- (point-max))) ?\n)
329 (terpri)))
330 (terpri)
331 (princ (nth 1 def)))))
318 (print-help-return-message) 332 (print-help-return-message)
319 ;; Return the text we displayed. 333 ;; Return the text we displayed.
320 (save-excursion (set-buffer standard-output) (buffer-string)))) 334 (save-excursion (set-buffer standard-output) (buffer-string))))