Mercurial > emacs
comparison lisp/emacs-lisp/bytecomp.el @ 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 | d4b674c08fe1 |
children | e9819849c533 |
comparison
equal
deleted
inserted
replaced
16231:5ce3b59f093b | 16232:d79492598ec8 |
---|---|
8 | 8 |
9 ;; Subsequently modified by RMS. | 9 ;; Subsequently modified by RMS. |
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 |
17 ;; GNU Emacs is free software; you can redistribute it and/or modify | 17 ;; GNU Emacs is free software; you can redistribute it and/or modify |
18 ;; it under the terms of the GNU General Public License as published by | 18 ;; it under the terms of the GNU General Public License as published by |
1898 (delq '&rest (delq '&optional (copy-sequence arglist)))) | 1898 (delq '&rest (delq '&optional (copy-sequence arglist)))) |
1899 byte-compile-bound-variables)) | 1899 byte-compile-bound-variables)) |
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). |
1907 (if (eq int (car body)) | 1910 (if (eq int (car body)) |
1908 (setq body (cdr body))) | 1911 (setq body (cdr body))) |