Show
Ignore:
Timestamp:
11/01/05 07:08:22 (3 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • vendor/emacs-CVS_HEAD/lisp/emacs-lisp/bytecomp.el

    r3806 r3939  
    909909;; assume we've already passed that point, and look for the next 
    910910;; 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;; 
    911918;; So your're probably asking yourself: Isn't this function a 
    912919;; gross hack?  And the answer, of course, would be yes. 
     
    23052312                   outbuffer))))) 
    23062313 
    2307     (let* ((new-one (byte-compile-lambda (cons 'lambda (nthcdr 2 form)))) 
     2314    (let* ((new-one (byte-compile-lambda (nthcdr 2 form) t)) 
    23082315           (code (byte-compile-byte-code-maker new-one))) 
    23092316      (if this-one 
     
    25012508;; The value is usually a compiled function but may be the original 
    25022509;; 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)) 
    25072520  (byte-compile-check-lambda-list (nth 1 fun)) 
    25082521  (let* ((arglist (nth 1 fun)) 
     
    27562769                              byte-compile-compatibility)) 
    27572770                        (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) 
    27612772             (when (memq 'callargs byte-compile-warnings) 
    27622773               (if (memq fn '(custom-declare-group custom-declare-variable custom-declare-face)) 
     
    36723683               (list 'quote (nth 1 form)) 
    36733684               (byte-compile-byte-code-maker 
    3674                 (byte-compile-lambda (cons 'lambda (cdr (cdr form))))))) 
     3685                (byte-compile-lambda (cdr (cdr form)) t)))) 
    36753686        (byte-compile-discard)) 
    36763687    ;; We prefer to generate a defalias form so it will record the function 
     
    36803691           (list 'quote (nth 1 form)) 
    36813692           (byte-compile-byte-code-maker 
    3682             (byte-compile-lambda (cons 'lambda (cdr (cdr form)))))) 
     3693            (byte-compile-lambda (cdr (cdr form)) t))) 
    36833694     t)) 
    36843695  (byte-compile-constant (nth 1 form))) 
     
    36893700   (list (list 'fset (list 'quote (nth 1 form)) 
    36903701               (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)))) 
    36933703                 (if (eq (car-safe code) 'make-byte-code) 
    36943704                     (list 'cons ''macro code)