Mercurial > emacs
comparison lisp/emacs-lisp/bytecomp.el @ 50573:e80e4ccf1bfc
(byte-compile-file-form-defvar, byte-compile-defvar):
Fix last commit which mistakenly relied on not-yet committed code.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 12 Apr 2003 21:39:50 +0000 |
parents | 80ed0fdbf171 |
children | ebecc2b80af6 |
comparison
equal
deleted
inserted
replaced
50572:c62614cbc500 | 50573:e80e4ccf1bfc |
---|---|
8 ;; Maintainer: FSF | 8 ;; Maintainer: FSF |
9 ;; Keywords: lisp | 9 ;; Keywords: lisp |
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.122 $") | 13 (defconst byte-compile-version "$Revision: 2.123 $") |
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 |
2063 (if (null (nth 3 form)) | 2063 (if (null (nth 3 form)) |
2064 ;; Since there is no doc string, we can compile this as a normal form, | 2064 ;; Since there is no doc string, we can compile this as a normal form, |
2065 ;; and not do a file-boundary. | 2065 ;; and not do a file-boundary. |
2066 (byte-compile-keep-pending form) | 2066 (byte-compile-keep-pending form) |
2067 (when (memq 'free-vars byte-compile-warnings) | 2067 (when (memq 'free-vars byte-compile-warnings) |
2068 (push (nth 1 form) byte-compile-dynamic-variables) | 2068 (push (nth 1 form) byte-compile-bound-variables) |
2069 (if (eq (car form) 'defconst) | 2069 (if (eq (car form) 'defconst) |
2070 (push (nth 1 form) byte-compile-const-variables))) | 2070 (push (nth 1 form) byte-compile-const-variables))) |
2071 (cond ((consp (nth 2 form)) | 2071 (cond ((consp (nth 2 form)) |
2072 (setq form (copy-sequence form)) | 2072 (setq form (copy-sequence form)) |
2073 (setcar (cdr (cdr form)) | 2073 (setcar (cdr (cdr form)) |
3559 (and (eq fun 'defconst) (null (cddr form)))) | 3559 (and (eq fun 'defconst) (null (cddr form)))) |
3560 (byte-compile-warn | 3560 (byte-compile-warn |
3561 "%s called with %d arguments, but accepts only %s" | 3561 "%s called with %d arguments, but accepts only %s" |
3562 fun (length (cdr form)) "2-3")) | 3562 fun (length (cdr form)) "2-3")) |
3563 (when (memq 'free-vars byte-compile-warnings) | 3563 (when (memq 'free-vars byte-compile-warnings) |
3564 (push var byte-compile-dynamic-variables) | 3564 (push var byte-compile-bound-variables) |
3565 (if (eq fun 'defconst) | 3565 (if (eq fun 'defconst) |
3566 (push var byte-compile-const-variables))) | 3566 (push var byte-compile-const-variables))) |
3567 (byte-compile-body-do-effect | 3567 (byte-compile-body-do-effect |
3568 (list | 3568 (list |
3569 ;; Put the defined variable in this library's load-history entry | 3569 ;; Put the defined variable in this library's load-history entry |