aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1996-09-17 19:01:09 +0000
committerRichard M. Stallman1996-09-17 19:01:09 +0000
commitd8f59f561a72bbfe03d357635c17983751a9ef61 (patch)
tree6aa2acb88f882f21f302fe95e4c53698a8486ba7 /lisp
parentc23baf9f139a5518e063a87abdc12f2ee446e25a (diff)
downloademacs-d8f59f561a72bbfe03d357635c17983751a9ef61.tar.gz
emacs-d8f59f561a72bbfe03d357635c17983751a9ef61.zip
(byte-compile-lambda): If the doc string is also the
return value, use it for both.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 13f52717cff..719584bfcc9 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -10,7 +10,7 @@
10 10
11;;; This version incorporates changes up to version 2.10 of the 11;;; This version incorporates changes up to version 2.10 of the
12;;; Zawinski-Furuseth compiler. 12;;; Zawinski-Furuseth compiler.
13(defconst byte-compile-version "$Revision: 2.17 $") 13(defconst byte-compile-version "$Revision: 2.19 $")
14 14
15;; This file is part of GNU Emacs. 15;; This file is part of GNU Emacs.
16 16
@@ -1900,7 +1900,10 @@ If FORM is a lambda or a macro, byte-compile it as a function."
1900 (body (cdr (cdr fun))) 1900 (body (cdr (cdr fun)))
1901 (doc (if (stringp (car body)) 1901 (doc (if (stringp (car body))
1902 (prog1 (car body) 1902 (prog1 (car body)
1903 (setq body (cdr body))))) 1903 ;; Discard the doc string
1904 ;; unless it is the last element of the body.
1905 (if (nthcdr 2 body)
1906 (setq body (cdr body))))))
1904 (int (assq 'interactive body))) 1907 (int (assq 'interactive body)))
1905 (cond (int 1908 (cond (int
1906 ;; Skip (interactive) if it is in front (the most usual location). 1909 ;; Skip (interactive) if it is in front (the most usual location).