Changeset 3939 for vendor/emacs-CVS_HEAD/lisp/emacs-lisp/bytecomp.el
- Timestamp:
- 11/01/05 07:08:22 (3 years ago)
- Files:
-
- vendor/emacs-CVS_HEAD/lisp/emacs-lisp/bytecomp.el (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
vendor/emacs-CVS_HEAD/lisp/emacs-lisp/bytecomp.el
r3806 r3939 909 909 ;; assume we've already passed that point, and look for the next 910 910 ;; occurrence of the symbol. 911 ;; 912 ;; This function should not be called twice for the same occurrence of 913 ;; a symbol, and it should not be called for symbols generated by the 914 ;; byte compiler itself; because rather than just fail looking up the 915 ;; symbol, we may find an occurrence of the symbol further ahead, and 916 ;; then `byte-compile-last-position' as advanced too far. 917 ;; 911 918 ;; So your're probably asking yourself: Isn't this function a 912 919 ;; gross hack? And the answer, of course, would be yes. … … 2305 2312 outbuffer))))) 2306 2313 2307 (let* ((new-one (byte-compile-lambda ( cons 'lambda (nthcdr 2 form))))2314 (let* ((new-one (byte-compile-lambda (nthcdr 2 form) t)) 2308 2315 (code (byte-compile-byte-code-maker new-one))) 2309 2316 (if this-one … … 2501 2508 ;; The value is usually a compiled function but may be the original 2502 2509 ;; lambda-expression. 2503 (defun byte-compile-lambda (fun) 2504 (unless (eq 'lambda (car-safe fun)) 2505 (error "Not a lambda list: %S" fun)) 2506 (byte-compile-set-symbol-position 'lambda) 2510 ;; When ADD-LAMBDA is non-nil, the symbol `lambda' is added as head 2511 ;; of the list FUN and `byte-compile-set-symbol-position' is not called. 2512 ;; Use this feature to avoid calling `byte-compile-set-symbol-position' 2513 ;; for symbols generated by the byte compiler itself. 2514 (defun byte-compile-lambda (fun &optional add-lambda) 2515 (if add-lambda 2516 (setq fun (cons 'lambda fun)) 2517 (unless (eq 'lambda (car-safe fun)) 2518 (error "Not a lambda list: %S" fun)) 2519 (byte-compile-set-symbol-position 'lambda)) 2507 2520 (byte-compile-check-lambda-list (nth 1 fun)) 2508 2521 (let* ((arglist (nth 1 fun)) … … 2756 2769 byte-compile-compatibility)) 2757 2770 (not (get (get fn 'byte-opcode) 'emacs19-opcode)))) 2758 (progn 2759 (byte-compile-set-symbol-position fn) 2760 (funcall handler form)) 2771 (funcall handler form) 2761 2772 (when (memq 'callargs byte-compile-warnings) 2762 2773 (if (memq fn '(custom-declare-group custom-declare-variable custom-declare-face)) … … 3672 3683 (list 'quote (nth 1 form)) 3673 3684 (byte-compile-byte-code-maker 3674 (byte-compile-lambda (c ons 'lambda (cdr (cdr form)))))))3685 (byte-compile-lambda (cdr (cdr form)) t)))) 3675 3686 (byte-compile-discard)) 3676 3687 ;; We prefer to generate a defalias form so it will record the function … … 3680 3691 (list 'quote (nth 1 form)) 3681 3692 (byte-compile-byte-code-maker 3682 (byte-compile-lambda (c ons 'lambda (cdr (cdr form))))))3693 (byte-compile-lambda (cdr (cdr form)) t))) 3683 3694 t)) 3684 3695 (byte-compile-constant (nth 1 form))) … … 3689 3700 (list (list 'fset (list 'quote (nth 1 form)) 3690 3701 (let ((code (byte-compile-byte-code-maker 3691 (byte-compile-lambda 3692 (cons 'lambda (cdr (cdr form))))))) 3702 (byte-compile-lambda (cdr (cdr form)) t)))) 3693 3703 (if (eq (car-safe code) 'make-byte-code) 3694 3704 (list 'cons ''macro code)
