comparison lisp/emacs-lisp/bytecomp.el @ 19637:baaf02a51ba2

(byte-compile-output-file-form): Handle custom-declare-variable.
author Richard M. Stallman <rms@gnu.org>
date Sun, 31 Aug 1997 17:07:28 +0000
parents 12a8bc6cb225
children 1d135b4edfcb
comparison
equal deleted inserted replaced
19636:77fa90ed939d 19637:baaf02a51ba2
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.32 $") 13 (defconst byte-compile-version "$Revision: 2.33 $")
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
1458 ))) 1458 )))
1459 1459
1460 1460
1461 (defun byte-compile-output-file-form (form) 1461 (defun byte-compile-output-file-form (form)
1462 ;; writes the given form to the output buffer, being careful of docstrings 1462 ;; writes the given form to the output buffer, being careful of docstrings
1463 ;; in defun, defmacro, defvar, defconst and autoload because make-docfile is 1463 ;; in defun, defmacro, defvar, defconst, autoload and
1464 ;; so amazingly stupid. 1464 ;; custom-declare-variable because make-docfile is so amazingly stupid.
1465 ;; defalias calls are output directly by byte-compile-file-form-defmumble; 1465 ;; defalias calls are output directly by byte-compile-file-form-defmumble;
1466 ;; it does not pay to first build the defalias in defmumble and then parse 1466 ;; it does not pay to first build the defalias in defmumble and then parse
1467 ;; it here. 1467 ;; it here.
1468 (if (and (memq (car-safe form) '(defun defmacro defvar defconst autoload)) 1468 (if (and (memq (car-safe form) '(defun defmacro defvar defconst autoload
1469 custom-declare-variable))
1469 (stringp (nth 3 form))) 1470 (stringp (nth 3 form)))
1470 (byte-compile-output-docform nil nil '("\n(" 3 ")") form nil 1471 (byte-compile-output-docform nil nil '("\n(" 3 ")") form nil
1471 (eq (car form) 'autoload)) 1472 (memq (car form)
1473 '(autoload custom-declare-variable)))
1472 (let ((print-escape-newlines t) 1474 (let ((print-escape-newlines t)
1473 (print-length nil) 1475 (print-length nil)
1474 (print-level nil) 1476 (print-level nil)
1475 (print-quoted t) 1477 (print-quoted t)
1476 (print-gensym t)) 1478 (print-gensym t))
1486 of the function bytecode string. In that case, 1488 of the function bytecode string. In that case,
1487 we output that argument and the following argument (the constants vector) 1489 we output that argument and the following argument (the constants vector)
1488 together, for lazy loading. 1490 together, for lazy loading.
1489 QUOTED says that we have to put a quote before the 1491 QUOTED says that we have to put a quote before the
1490 list that represents a doc string reference. 1492 list that represents a doc string reference.
1491 `autoload' needs that." 1493 `autoload' and `custom-declare-variable' need that."
1492 ;; We need to examine byte-compile-dynamic-docstrings 1494 ;; We need to examine byte-compile-dynamic-docstrings
1493 ;; in the input buffer (now current), not in the output buffer. 1495 ;; in the input buffer (now current), not in the output buffer.
1494 (let ((dynamic-docstrings byte-compile-dynamic-docstrings)) 1496 (let ((dynamic-docstrings byte-compile-dynamic-docstrings))
1495 (set-buffer 1497 (set-buffer
1496 (prog1 (current-buffer) 1498 (prog1 (current-buffer)