aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-04-17 01:26:24 +0000
committerRichard M. Stallman1993-04-17 01:26:24 +0000
commit6101b31fb01406af94e27d6b3907e2d6b897fa3c (patch)
treef94fe077495fc6ee9754000f230448d82a58e9a4
parent2b86d62c8f337750174fd8718d2144a9606d8cd6 (diff)
downloademacs-6101b31fb01406af94e27d6b3907e2d6b897fa3c.tar.gz
emacs-6101b31fb01406af94e27d6b3907e2d6b897fa3c.zip
(byte-compile, byte-compile-keep-pending)
(byte-compile-file-form-defmumble): Generate define-function rather than fset, to install definitions for defun, defmacro, etc.
-rw-r--r--lisp/emacs-lisp/bytecomp.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index ab40f109e93..b5f2bbaefd0 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1334,8 +1334,8 @@ With argument, insert value in current buffer after the form."
1334 ;; writes the given form to the output buffer, being careful of docstrings 1334 ;; writes the given form to the output buffer, being careful of docstrings
1335 ;; in defun, defmacro, defvar, defconst and autoload because make-docfile is 1335 ;; in defun, defmacro, defvar, defconst and autoload because make-docfile is
1336 ;; so amazingly stupid. 1336 ;; so amazingly stupid.
1337 ;; fset's are output directly by byte-compile-file-form-defmumble; it does 1337 ;; define-functions are output directly by byte-compile-file-form-defmumble; it does
1338 ;; not pay to first build the fset in defmumble and then parse it here. 1338 ;; not pay to first build the define-function in defmumble and then parse it here.
1339 (if (and (memq (car-safe form) '(defun defmacro defvar defconst autoload)) 1339 (if (and (memq (car-safe form) '(defun defmacro defvar defconst autoload))
1340 (stringp (nth 3 form))) 1340 (stringp (nth 3 form)))
1341 (byte-compile-output-docform '("\n(" 3 ")") form) 1341 (byte-compile-output-docform '("\n(" 3 ")") form)
@@ -1376,7 +1376,7 @@ With argument, insert value in current buffer after the form."
1376 (let ((for-effect t)) 1376 (let ((for-effect t))
1377 ;; To avoid consing up monstrously large forms at load time, we split 1377 ;; To avoid consing up monstrously large forms at load time, we split
1378 ;; the output regularly. 1378 ;; the output regularly.
1379 (and (eq (car-safe form) 'fset) (nthcdr 300 byte-compile-output) 1379 (and (eq (car-safe form) 'define-function) (nthcdr 300 byte-compile-output)
1380 (byte-compile-flush-pending)) 1380 (byte-compile-flush-pending))
1381 (funcall handler form) 1381 (funcall handler form)
1382 (if for-effect 1382 (if for-effect
@@ -1569,9 +1569,9 @@ With argument, insert value in current buffer after the form."
1569 new-one))))) 1569 new-one)))))
1570 'byte-compile-two-args) 1570 'byte-compile-two-args)
1571 ;; Output the form by hand, that's much simpler than having 1571 ;; Output the form by hand, that's much simpler than having
1572 ;; b-c-output-file-form analyze the fset. 1572 ;; b-c-output-file-form analyze the define-function.
1573 (byte-compile-flush-pending) 1573 (byte-compile-flush-pending)
1574 (princ "\n(fset '" outbuffer) 1574 (princ "\n(define-function '" outbuffer)
1575 (prin1 name outbuffer) 1575 (prin1 name outbuffer)
1576 (byte-compile-output-docform 1576 (byte-compile-output-docform
1577 (cond ((atom code) 1577 (cond ((atom code)
@@ -1602,7 +1602,7 @@ If FORM is a lambda or a macro, byte-compile it as a function."
1602 (cons 'macro (byte-compile-lambda fun)) 1602 (cons 'macro (byte-compile-lambda fun))
1603 (byte-compile-lambda fun))) 1603 (byte-compile-lambda fun)))
1604 (if (symbolp form) 1604 (if (symbolp form)
1605 (fset form fun) 1605 (define-function form fun)
1606 fun))))))) 1606 fun)))))))
1607 1607
1608(defun byte-compile-sexp (sexp) 1608(defun byte-compile-sexp (sexp)