changeset 16232:d79492598ec8

(byte-compile-lambda): If the doc string is also the return value, use it for both.
author Richard M. Stallman <rms@gnu.org>
date Tue, 17 Sep 1996 19:01:09 +0000
parents 5ce3b59f093b
children 96a698bb6c17
files lisp/emacs-lisp/bytecomp.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el	Tue Sep 17 17:49:23 1996 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Tue Sep 17 19:01:09 1996 +0000
@@ -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 @@
 	 (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).