comparison lisp/emacs-lisp/bytecomp.el @ 5283:f48e54cb9b01

(byte-compile-dest-file): If FILENAME is not recognized, append .elc to it. (byte-recompile-directory): Don't treat symlinks as dirs. (batch-byte-recompile-directory): Add autoload cookie.
author Richard M. Stallman <rms@gnu.org>
date Thu, 23 Dec 1993 03:37:27 +0000
parents db0a4691f468
children 2f4fab6070b8
comparison
equal deleted inserted replaced
5282:1d3c5ef6e8a1 5283:f48e54cb9b01
204 (setq filename (file-name-sans-versions filename)) 204 (setq filename (file-name-sans-versions filename))
205 (cond ((eq system-type 'vax-vms) 205 (cond ((eq system-type 'vax-vms)
206 (concat (substring filename 0 (string-match ";" filename)) "c")) 206 (concat (substring filename 0 (string-match ";" filename)) "c"))
207 ((string-match emacs-lisp-file-regexp filename) 207 ((string-match emacs-lisp-file-regexp filename)
208 (concat (substring filename 0 (match-beginning 0)) ".elc")) 208 (concat (substring filename 0 (match-beginning 0)) ".elc"))
209 (t (concat filename "c"))))) 209 (t (concat filename ".elc")))))
210 210
211 ;; This can be the 'byte-compile property of any symbol. 211 ;; This can be the 'byte-compile property of any symbol.
212 (autoload 'byte-compile-inline-expand "byte-opt") 212 (autoload 'byte-compile-inline-expand "byte-opt")
213 213
214 ;; This is the entrypoint to the lapcode optimizer pass1. 214 ;; This is the entrypoint to the lapcode optimizer pass1.
1081 (let ((files (directory-files directory)) 1081 (let ((files (directory-files directory))
1082 source dest) 1082 source dest)
1083 (while files 1083 (while files
1084 (setq source (expand-file-name (car files) directory)) 1084 (setq source (expand-file-name (car files) directory))
1085 (if (and (not (member (car files) '("." ".." "RCS" "CVS"))) 1085 (if (and (not (member (car files) '("." ".." "RCS" "CVS")))
1086 (file-directory-p source)) 1086 (file-directory-p source)
1087 (not (file-symlink-p source)))
1087 (if (or (null arg) 1088 (if (or (null arg)
1088 (eq 0 arg) 1089 (eq 0 arg)
1089 (y-or-n-p (concat "Check " source "? "))) 1090 (y-or-n-p (concat "Check " source "? ")))
1090 (setq directories 1091 (setq directories
1091 (nconc directories (list source)))) 1092 (nconc directories (list source))))
3030 file 3031 file
3031 (get (car err) 'error-message) 3032 (get (car err) 'error-message)
3032 (prin1-to-string (cdr err))) 3033 (prin1-to-string (cdr err)))
3033 nil))) 3034 nil)))
3034 3035
3036 ;;;###autoload
3035 (defun batch-byte-recompile-directory () 3037 (defun batch-byte-recompile-directory ()
3036 "Runs `byte-recompile-directory' on the dirs remaining on the command line. 3038 "Runs `byte-recompile-directory' on the dirs remaining on the command line.
3037 Must be used only with `-batch', and kills Emacs on completion. 3039 Must be used only with `-batch', and kills Emacs on completion.
3038 For example, invoke `emacs -batch -f batch-byte-recompile-directory .'." 3040 For example, invoke `emacs -batch -f batch-byte-recompile-directory .'."
3039 ;; command-line-args-left is what is left of the command line (startup.el) 3041 ;; command-line-args-left is what is left of the command line (startup.el)