Commit d8f59f56 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(byte-compile-lambda): If the doc string is also the

return value, use it for both.
parent c23baf9f
......@@ -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).
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