diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-09-17 19:01:09 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-09-17 19:01:09 +0000 |
commit | d8f59f561a72bbfe03d357635c17983751a9ef61 (patch) | |
tree | 6aa2acb88f882f21f302fe95e4c53698a8486ba7 /lisp/emacs-lisp/bytecomp.el | |
parent | c23baf9f139a5518e063a87abdc12f2ee446e25a (diff) | |
download | emacs-d8f59f561a72bbfe03d357635c17983751a9ef61.tar.gz emacs-d8f59f561a72bbfe03d357635c17983751a9ef61.tar.bz2 emacs-d8f59f561a72bbfe03d357635c17983751a9ef61.zip |
(byte-compile-lambda): If the doc string is also the
return value, use it for both.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 7 |
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 @@ ;;; This version incorporates changes up to version 2.10 of the ;;; Zawinski-Furuseth compiler. -(defconst byte-compile-version "$Revision: 2.17 $") +(defconst byte-compile-version "$Revision: 2.19 $") ;; This file is part of GNU Emacs. @@ -1900,7 +1900,10 @@ If FORM is a lambda or a macro, byte-compile it as a function." (body (cdr (cdr fun))) (doc (if (stringp (car body)) (prog1 (car body) - (setq body (cdr body))))) + ;; Discard the doc string + ;; unless it is the last element of the body. + (if (nthcdr 2 body) + (setq body (cdr body)))))) (int (assq 'interactive body))) (cond (int ;; Skip (interactive) if it is in front (the most usual location). |