Mercurial > emacs
comparison lisp/emacs-lisp/bytecomp.el @ 3948:33d46b047130
(byte-compile-file-form-defmumble):
If byte-compile-compatibility, use fset, not defalias.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 01 Jul 1993 22:13:28 +0000 |
parents | 217addf0f940 |
children | cac16b165691 |
comparison
equal
deleted
inserted
replaced
3947:924d8515c250 | 3948:33d46b047130 |
---|---|
1577 (cons (car form) | 1577 (cons (car form) |
1578 (cons name (cdr (nth 1 code)))) | 1578 (cons name (cdr (nth 1 code)))) |
1579 (if (not (stringp (nth 3 form))) | 1579 (if (not (stringp (nth 3 form))) |
1580 ;; No doc string to make-docfile; insert form in normal code. | 1580 ;; No doc string to make-docfile; insert form in normal code. |
1581 (byte-compile-keep-pending | 1581 (byte-compile-keep-pending |
1582 (list 'defalias (list 'quote name) | 1582 (list (if (byte-compile-version-cond byte-compile-compatibility) |
1583 'defalias 'fset) | |
1584 (list 'quote name) | |
1583 (cond ((not macrop) | 1585 (cond ((not macrop) |
1584 code) | 1586 code) |
1585 ((eq 'make-byte-code (car-safe code)) | 1587 ((eq 'make-byte-code (car-safe code)) |
1586 (list 'cons ''macro code)) | 1588 (list 'cons ''macro code)) |
1587 ((list 'quote (if macrop | 1589 ((list 'quote (if macrop |
1588 (cons 'macro new-one) | 1590 (cons 'macro new-one) |
1589 new-one)))))) | 1591 new-one)))))) |
1590 ;; Output the form by hand, that's much simpler than having | 1592 ;; Output the form by hand, that's much simpler than having |
1591 ;; b-c-output-file-form analyze the defalias. | 1593 ;; b-c-output-file-form analyze the defalias. |
1592 (byte-compile-flush-pending) | 1594 (byte-compile-flush-pending) |
1593 (princ "\n(defalias '" outbuffer) | 1595 (princ (if (byte-compile-version-cond byte-compile-compatibility) |
1596 "\n(defalias '" "\n(fset '") | |
1597 outbuffer) | |
1594 (prin1 name outbuffer) | 1598 (prin1 name outbuffer) |
1595 (byte-compile-output-docform | 1599 (byte-compile-output-docform |
1596 (cond ((atom code) | 1600 (cond ((atom code) |
1597 (if macrop '(" '(macro . #[" 4 "])") '(" #[" 4 "]"))) | 1601 (if macrop '(" '(macro . #[" 4 "])") '(" #[" 4 "]"))) |
1598 ((eq (car code) 'quote) | 1602 ((eq (car code) 'quote) |