comparison lisp/emacs-lisp/bytecomp.el @ 86452:ff400c9a8768

(batch-byte-recompile-directory): Doc fix.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 26 Nov 2007 15:38:18 +0000
parents 5dde93581c8f
children ee629020b5a7
comparison
equal deleted inserted replaced
86451:9279479159b0 86452:ff400c9a8768
3504 (if ,discard 'byte-goto-if-nil 'byte-goto-if-nil-else-pop)) 3504 (if ,discard 'byte-goto-if-nil 'byte-goto-if-nil-else-pop))
3505 ,tag)) 3505 ,tag))
3506 3506
3507 ;; Return the list of items in CONDITION-PARAM that match PRED-LIST. 3507 ;; Return the list of items in CONDITION-PARAM that match PRED-LIST.
3508 ;; Only return items that are not in ONLY-IF-NOT-PRESENT. 3508 ;; Only return items that are not in ONLY-IF-NOT-PRESENT.
3509 (defun byte-compile-find-bound-condition (condition-param 3509 (defun byte-compile-find-bound-condition (condition-param
3510 pred-list 3510 pred-list
3511 &optional only-if-not-present) 3511 &optional only-if-not-present)
3512 (let ((result nil) 3512 (let ((result nil)
3513 (nth-one nil) 3513 (nth-one nil)
3514 (cond-list 3514 (cond-list
3515 (if (memq (car-safe condition-param) pred-list) 3515 (if (memq (car-safe condition-param) pred-list)
3516 ;; The condition appears by itself. 3516 ;; The condition appears by itself.
3517 (list condition-param) 3517 (list condition-param)
3518 ;; If the condition is an `and', look for matches among the 3518 ;; If the condition is an `and', look for matches among the
3519 ;; `and' arguments. 3519 ;; `and' arguments.
3520 (when (eq 'and (car-safe condition-param)) 3520 (when (eq 'and (car-safe condition-param))
3521 (cdr condition-param))))) 3521 (cdr condition-param)))))
3522 3522
3523 (dolist (crt cond-list) 3523 (dolist (crt cond-list)
3524 (when (and (memq (car-safe crt) pred-list) 3524 (when (and (memq (car-safe crt) pred-list)
3525 (eq 'quote (car-safe (setq nth-one (nth 1 crt)))) 3525 (eq 'quote (car-safe (setq nth-one (nth 1 crt))))
3526 ;; Ignore if the symbol is already on the unresolved 3526 ;; Ignore if the symbol is already on the unresolved
3527 ;; list. 3527 ;; list.
3539 being undefined will be suppressed. 3539 being undefined will be suppressed.
3540 3540
3541 If CONDITION's value is (not (featurep 'emacs)) or (featurep 'xemacs), 3541 If CONDITION's value is (not (featurep 'emacs)) or (featurep 'xemacs),
3542 that suppresses all warnings during execution of BODY." 3542 that suppresses all warnings during execution of BODY."
3543 (declare (indent 1) (debug t)) 3543 (declare (indent 1) (debug t))
3544 `(let* ((fbound-list (byte-compile-find-bound-condition 3544 `(let* ((fbound-list (byte-compile-find-bound-condition
3545 ,condition (list 'fboundp) 3545 ,condition (list 'fboundp)
3546 byte-compile-unresolved-functions)) 3546 byte-compile-unresolved-functions))
3547 (bound-list (byte-compile-find-bound-condition 3547 (bound-list (byte-compile-find-bound-condition
3548 ,condition (list 'boundp 'default-boundp))) 3548 ,condition (list 'boundp 'default-boundp)))
3549 ;; Maybe add to the bound list. 3549 ;; Maybe add to the bound list.
3550 (byte-compile-bound-variables 3550 (byte-compile-bound-variables
3551 (if bound-list 3551 (if bound-list
3552 (append bound-list byte-compile-bound-variables) 3552 (append bound-list byte-compile-bound-variables)
4272 "Run `byte-recompile-directory' on the dirs remaining on the command line. 4272 "Run `byte-recompile-directory' on the dirs remaining on the command line.
4273 Must be used only with `-batch', and kills Emacs on completion. 4273 Must be used only with `-batch', and kills Emacs on completion.
4274 For example, invoke `emacs -batch -f batch-byte-recompile-directory .'. 4274 For example, invoke `emacs -batch -f batch-byte-recompile-directory .'.
4275 4275
4276 Optional argument ARG is passed as second argument ARG to 4276 Optional argument ARG is passed as second argument ARG to
4277 `batch-recompile-directory'; see there for its possible values 4277 `byte-recompile-directory'; see there for its possible values
4278 and corresponding effects." 4278 and corresponding effects."
4279 ;; command-line-args-left is what is left of the command line (startup.el) 4279 ;; command-line-args-left is what is left of the command line (startup.el)
4280 (defvar command-line-args-left) ;Avoid 'free variable' warning 4280 (defvar command-line-args-left) ;Avoid 'free variable' warning
4281 (if (not noninteractive) 4281 (if (not noninteractive)
4282 (error "batch-byte-recompile-directory is to be used only with -batch")) 4282 (error "batch-byte-recompile-directory is to be used only with -batch"))