Mercurial > emacs
comparison lisp/emacs-lisp/bytecomp.el @ 50618:ebecc2b80af6
(byte-compile-const-symbol-p): Rename arg.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 16 Apr 2003 20:10:33 +0000 |
parents | e80e4ccf1bfc |
children | c3ba923eb0e9 |
comparison
equal
deleted
inserted
replaced
50617:9582ab8af8fe | 50618:ebecc2b80af6 |
---|---|
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.123 $") | 13 (defconst byte-compile-version "$Revision: 2.124 $") |
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 |
1313 "the following functions are not known to be defined:" | 1313 "the following functions are not known to be defined:" |
1314 unresolved))) | 1314 unresolved))) |
1315 nil) | 1315 nil) |
1316 | 1316 |
1317 | 1317 |
1318 (defsubst byte-compile-const-symbol-p (symbol &optional value) | 1318 (defsubst byte-compile-const-symbol-p (symbol &optional any-value) |
1319 "Non-nil if SYMBOL is constant. | 1319 "Non-nil if SYMBOL is constant. |
1320 If VALUE is nil, only return non-nil if the value of the symbol is the | 1320 If ANY-VALUE is nil, only return non-nil if the value of the symbol is the |
1321 symbol itself." | 1321 symbol itself." |
1322 (or (memq symbol '(nil t)) | 1322 (or (memq symbol '(nil t)) |
1323 (keywordp symbol) | 1323 (keywordp symbol) |
1324 (if value (memq symbol byte-compile-const-variables)))) | 1324 (if any-value (memq symbol byte-compile-const-variables)))) |
1325 | 1325 |
1326 (defmacro byte-compile-constp (form) | 1326 (defmacro byte-compile-constp (form) |
1327 "Return non-nil if FORM is a constant." | 1327 "Return non-nil if FORM is a constant." |
1328 `(cond ((consp ,form) (eq (car ,form) 'quote)) | 1328 `(cond ((consp ,form) (eq (car ,form) 'quote)) |
1329 ((not (symbolp ,form))) | 1329 ((not (symbolp ,form))) |