Mercurial > emacs
comparison lisp/emacs-lisp/bytecomp.el @ 47912:d3e117492507
Fix typo.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Thu, 17 Oct 2002 15:32:26 +0000 |
parents | e7f753af9ceb |
children | 97a835048241 |
comparison
equal
deleted
inserted
replaced
47911:e07cfa93f2f3 | 47912:d3e117492507 |
---|---|
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.114 $") | 13 (defconst byte-compile-version "$Revision: 2.115 $") |
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 |
340 redefine function cell redefined from a macro to a lambda or vice | 340 redefine function cell redefined from a macro to a lambda or vice |
341 versa, or redefined to take a different number of arguments. | 341 versa, or redefined to take a different number of arguments. |
342 obsolete obsolete variables and functions. | 342 obsolete obsolete variables and functions. |
343 noruntime functions that may not be defined at runtime (typically | 343 noruntime functions that may not be defined at runtime (typically |
344 defined only under `eval-when-compile'). | 344 defined only under `eval-when-compile'). |
345 cl-functions calls to runtime functions from the CL package (as | 345 cl-functions calls to runtime functions from the CL package (as |
346 distinguished from macros and aliases)." | 346 distinguished from macros and aliases)." |
347 :group 'bytecomp | 347 :group 'bytecomp |
348 :type `(choice (const :tag "All" t) | 348 :type `(choice (const :tag "All" t) |
349 (set :menu-tag "Some" | 349 (set :menu-tag "Some" |
350 (const free-vars) (const unresolved) | 350 (const free-vars) (const unresolved) |
865 ;; `read-symbol-positions-list', and set `byte-compile-last-position' | 865 ;; `read-symbol-positions-list', and set `byte-compile-last-position' |
866 ;; to that symbol's character position. Similarly, if we encounter a | 866 ;; to that symbol's character position. Similarly, if we encounter a |
867 ;; variable reference, like in (1+ foo), we remove `foo' from the | 867 ;; variable reference, like in (1+ foo), we remove `foo' from the |
868 ;; list. If our current position is after the symbol's position, we | 868 ;; list. If our current position is after the symbol's position, we |
869 ;; assume we've already passed that point, and look for the next | 869 ;; assume we've already passed that point, and look for the next |
870 ;; occurence of the symbol. | 870 ;; occurrence of the symbol. |
871 ;; So your're probably asking yourself: Isn't this function a | 871 ;; So your're probably asking yourself: Isn't this function a |
872 ;; gross hack? And the answer, of course, would be yes. | 872 ;; gross hack? And the answer, of course, would be yes. |
873 (defun byte-compile-set-symbol-position (sym &optional allow-previous) | 873 (defun byte-compile-set-symbol-position (sym &optional allow-previous) |
874 (when byte-compile-read-position | 874 (when byte-compile-read-position |
875 (let (last entry) | 875 (let (last entry) |
876 (while (progn | 876 (while (progn |
2159 (car-safe (cdr-safe body)) | 2159 (car-safe (cdr-safe body)) |
2160 (stringp (car-safe (cdr-safe (cdr-safe body))))) | 2160 (stringp (car-safe (cdr-safe (cdr-safe body))))) |
2161 (byte-compile-set-symbol-position (nth 1 form)) | 2161 (byte-compile-set-symbol-position (nth 1 form)) |
2162 (byte-compile-warn "probable `\"' without `\\' in doc string of %s" | 2162 (byte-compile-warn "probable `\"' without `\\' in doc string of %s" |
2163 (nth 1 form)))) | 2163 (nth 1 form)))) |
2164 | 2164 |
2165 ;; Generate code for declarations in macro definitions. | 2165 ;; Generate code for declarations in macro definitions. |
2166 ;; Remove declarations from the body of the macro definition. | 2166 ;; Remove declarations from the body of the macro definition. |
2167 (when macrop | 2167 (when macrop |
2168 (let ((tail (nthcdr 2 form))) | 2168 (let ((tail (nthcdr 2 form))) |
2169 (when (stringp (car (cdr tail))) | 2169 (when (stringp (car (cdr tail))) |
2174 (setcdr tail (cdr (cdr tail))) | 2174 (setcdr tail (cdr (cdr tail))) |
2175 (princ `(if macro-declaration-function | 2175 (princ `(if macro-declaration-function |
2176 (funcall macro-declaration-function | 2176 (funcall macro-declaration-function |
2177 ',name ',declaration)) | 2177 ',name ',declaration)) |
2178 outbuffer))))) | 2178 outbuffer))))) |
2179 | 2179 |
2180 (let* ((new-one (byte-compile-lambda (cons 'lambda (nthcdr 2 form)))) | 2180 (let* ((new-one (byte-compile-lambda (cons 'lambda (nthcdr 2 form)))) |
2181 (code (byte-compile-byte-code-maker new-one))) | 2181 (code (byte-compile-byte-code-maker new-one))) |
2182 (if this-one | 2182 (if this-one |
2183 (setcdr this-one new-one) | 2183 (setcdr this-one new-one) |
2184 (set this-kind | 2184 (set this-kind |