363 |
:type '(choice (const :tag "Yes" t) (const :tag "No" nil) |
:type '(choice (const :tag "Yes" t) (const :tag "No" nil) |
364 |
(other :tag "Ask" lambda))) |
(other :tag "Ask" lambda))) |
365 |
|
|
366 |
(defconst byte-compile-call-tree nil "Alist of functions and their call tree. |
(defvar byte-compile-call-tree nil "Alist of functions and their call tree. |
367 |
Each element looks like |
Each element looks like |
368 |
|
|
369 |
\(FUNCTION CALLERS CALLS\) |
\(FUNCTION CALLERS CALLS\) |
441 |
|
|
442 |
;;; The byte codes; this information is duplicated in bytecomp.c |
;;; The byte codes; this information is duplicated in bytecomp.c |
443 |
|
|
444 |
(defconst byte-code-vector nil |
(defvar byte-code-vector nil |
445 |
"An array containing byte-code names indexed by byte-code values.") |
"An array containing byte-code names indexed by byte-code values.") |
446 |
|
|
447 |
(defconst byte-stack+-info nil |
(defvar byte-stack+-info nil |
448 |
"An array with the stack adjustment for each byte-code.") |
"An array with the stack adjustment for each byte-code.") |
449 |
|
|
450 |
(defmacro byte-defop (opcode stack-adjust opname &optional docstring) |
(defmacro byte-defop (opcode stack-adjust opname &optional docstring) |
810 |
(if (symbolp x) (list 'prin1-to-string x) x)) |
(if (symbolp x) (list 'prin1-to-string x) x)) |
811 |
args))))))) |
args))))))) |
812 |
|
|
813 |
(defconst byte-compile-last-warned-form nil) |
(defvar byte-compile-last-warned-form nil) |
814 |
(defconst byte-compile-last-logged-file nil) |
(defvar byte-compile-last-logged-file nil) |
815 |
|
|
816 |
(defvar byte-compile-last-line nil |
(defvar byte-compile-last-line nil |
817 |
"Last known line number in the input.") |
"Last known line number in the input.") |
1322 |
(if (> skip-count 0) (format ", %d skipped" skip-count) "") |
(if (> skip-count 0) (format ", %d skipped" skip-count) "") |
1323 |
(if (> dir-count 1) (format " in %d directories" dir-count) "")))) |
(if (> dir-count 1) (format " in %d directories" dir-count) "")))) |
1324 |
|
|
1325 |
|
(defvar no-byte-compile nil |
1326 |
|
"Non-nil to prevent byte-compiling of emacs-lisp code. |
1327 |
|
This is normally set in local file variables at the end of the elisp file: |
1328 |
|
|
1329 |
|
;; Local Variables:\n;; no-byte-compile: t\n;; End: ") |
1330 |
|
|
1331 |
;;;###autoload |
;;;###autoload |
1332 |
(defun byte-compile-file (filename &optional load) |
(defun byte-compile-file (filename &optional load) |
1333 |
"Compile a file of Lisp code named FILENAME into a file of byte code. |
"Compile a file of Lisp code named FILENAME into a file of byte code. |
1394 |
(setq default-directory (file-name-directory filename))) |
(setq default-directory (file-name-directory filename))) |
1395 |
;; Check if the file's local variables explicitly specify not to |
;; Check if the file's local variables explicitly specify not to |
1396 |
;; compile this file. |
;; compile this file. |
1397 |
(if (with-current-buffer input-buffer |
(if (with-current-buffer input-buffer no-byte-compile) |
|
(and (boundp 'no-byte-compile) no-byte-compile)) |
|
1398 |
(progn |
(progn |
1399 |
(message "%s not compiled because of `no-byte-compile: %s'" |
(message "%s not compiled because of `no-byte-compile: %s'" |
1400 |
(file-relative-name filename) |
(file-relative-name filename) |
3301 |
(byte-compile-warn "third arg to %s %s is not a string: %s" |
(byte-compile-warn "third arg to %s %s is not a string: %s" |
3302 |
fun var string)) |
fun var string)) |
3303 |
`(put ',var 'variable-documentation ,string)) |
`(put ',var 'variable-documentation ,string)) |
3304 |
(if (cdr (cdr form)) ; `value' provided |
(if (cddr form) ; `value' provided |
3305 |
(if (eq fun 'defconst) |
(if (eq fun 'defconst) |
3306 |
;; `defconst' sets `var' unconditionally. |
;; `defconst' sets `var' unconditionally. |
3307 |
`(setq ,var ,value) |
(let ((tmp (make-symbol "defconst-tmp-var"))) |
3308 |
|
`(let ((,tmp ,value)) |
3309 |
|
(eval '(defconst ,var ,tmp)))) |
3310 |
;; `defvar' sets `var' only when unbound. |
;; `defvar' sets `var' only when unbound. |
3311 |
`(if (not (boundp ',var)) (setq ,var ,value)))) |
`(if (not (boundp ',var)) (setq ,var ,value)))) |
3312 |
`',var)))) |
`',var)))) |