Commit fd5285f3 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

*** empty log message ***

parent 8215ebe6
;;; -*- Mode: Emacs-Lisp -*- ;;; bytecomp.el --- compilation of Lisp code into byte code.
;;; Compilation of Lisp code into byte code.
;;; Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc. ;; Author: Jamie Zawinski <jwz@lucid.com>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
;; Last-Modified: 15 Jul 1992
;; Keywords: internal
;; By Jamie Zawinski <jwz@lucid.com> and Hallvard Furuseth <hbf@ulrik.uio.no>.
;; Subsequently modified by RMS. ;; Subsequently modified by RMS.
(defconst byte-compile-version "FSF 2.1") (defconst byte-compile-version "FSF 2.1")
;;; Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc.
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify ;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by ;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 1, or (at your option) ;; the Free Software Foundation; either version 2, or (at your option)
;; any later version. ;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful, ;; GNU Emacs is distributed in the hope that it will be useful,
...@@ -23,6 +27,8 @@ ...@@ -23,6 +27,8 @@
;; along with GNU Emacs; see the file COPYING. If not, write to ;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
;;; Code:
;;; ======================================================================== ;;; ========================================================================
;;; Entry points: ;;; Entry points:
;;; byte-recompile-directory, byte-compile-file, batch-byte-compile, ;;; byte-recompile-directory, byte-compile-file, batch-byte-compile,
...@@ -757,8 +763,11 @@ otherwise pop it") ...@@ -757,8 +763,11 @@ otherwise pop it")
(if byte-compile-error-on-warn (if byte-compile-error-on-warn
(error "%s" format) ; byte-compile-file catches and logs it (error "%s" format) ; byte-compile-file catches and logs it
(byte-compile-log-1 (concat "** " format)) (byte-compile-log-1 (concat "** " format))
(or noninteractive ; already written on stdout. ;;; It is useless to flash warnings too fast to be read.
(message "Warning: %s" format)))) ;;; Besides, they will all be shown at the end.
;;; (or noninteractive ; already written on stdout.
;;; (message "Warning: %s" format))
))
;;; Used by make-obsolete. ;;; Used by make-obsolete.
(defun byte-compile-obsolete (form) (defun byte-compile-obsolete (form)
...@@ -1043,6 +1052,7 @@ otherwise pop it") ...@@ -1043,6 +1052,7 @@ otherwise pop it")
(recenter 1)))))))) (recenter 1))))))))
;;;###autoload
(defun byte-recompile-directory (directory &optional arg) (defun byte-recompile-directory (directory &optional arg)
"Recompile every `.el' file in DIRECTORY that needs recompilation. "Recompile every `.el' file in DIRECTORY that needs recompilation.
This is if a `.elc' file exists but is older than the `.el' file. This is if a `.elc' file exists but is older than the `.el' file.
...@@ -1070,6 +1080,7 @@ for each such `.el' file, whether to compile it." ...@@ -1070,6 +1080,7 @@ for each such `.el' file, whether to compile it."
(message "Done (Total of %d file%s compiled)" (message "Done (Total of %d file%s compiled)"
count (if (= count 1) "" "s")))) count (if (= count 1) "" "s"))))
;;;###autoload
(defun byte-compile-file (filename &optional load) (defun byte-compile-file (filename &optional load)
"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.
The output file's name is made by appending `c' to the end of FILENAME. The output file's name is made by appending `c' to the end of FILENAME.
...@@ -1087,8 +1098,8 @@ With prefix arg (noninteractively: 2nd arg), load the file after compiling." ...@@ -1087,8 +1098,8 @@ With prefix arg (noninteractively: 2nd arg), load the file after compiling."
(list (read-file-name (if current-prefix-arg (list (read-file-name (if current-prefix-arg
"Byte compile and load file: " "Byte compile and load file: "
"Byte compile file: ") "Byte compile file: ")
file-dir file-name nil)) file-dir file-name nil)
current-prefix-arg)) current-prefix-arg)))
;; Expand now so we get the current buffer's defaults ;; Expand now so we get the current buffer's defaults
(setq filename (expand-file-name filename)) (setq filename (expand-file-name filename))
...@@ -1142,7 +1153,7 @@ With prefix arg (noninteractively: 2nd arg), load the file after compiling." ...@@ -1142,7 +1153,7 @@ With prefix arg (noninteractively: 2nd arg), load the file after compiling."
(or (eq t byte-compile-generate-call-tree) (or (eq t byte-compile-generate-call-tree)
(y-or-n-p (format "Report call tree for %s? " filename)))) (y-or-n-p (format "Report call tree for %s? " filename))))
(save-excursion (save-excursion
(byte-compile-report-call-tree filename))) (display-call-tree filename)))
(if load (if load
(load target-file))) (load target-file)))
t) t)
...@@ -1170,6 +1181,7 @@ With prefix arg (noninteractively: 2nd arg), load the file after compiling." ...@@ -1170,6 +1181,7 @@ With prefix arg (noninteractively: 2nd arg), load the file after compiling."
;; t) ;; t)
;;; compiling a single function ;;; compiling a single function
;;;###autoload
(defun compile-defun (&optional arg) (defun compile-defun (&optional arg)
"Compile and evaluate the current top-level form. "Compile and evaluate the current top-level form.
Print the result in the minibuffer. Print the result in the minibuffer.
...@@ -1180,7 +1192,8 @@ With argument, insert value in current buffer after the form." ...@@ -1180,7 +1192,8 @@ With argument, insert value in current buffer after the form."
(beginning-of-defun) (beginning-of-defun)
(let* ((byte-compile-current-file nil) (let* ((byte-compile-current-file nil)
(byte-compile-last-warned-form 'nothing) (byte-compile-last-warned-form 'nothing)
(value (eval (byte-compile-sexp (read (current-buffer)))))) (value (eval (displaying-byte-compile-warnings
(byte-compile-sexp (read (current-buffer)))))))
(cond (arg (cond (arg
(message "Compiling from buffer... done.") (message "Compiling from buffer... done.")
(prin1 value (current-buffer)) (prin1 value (current-buffer))
...@@ -1525,6 +1538,7 @@ With argument, insert value in current buffer after the form." ...@@ -1525,6 +1538,7 @@ With argument, insert value in current buffer after the form."
nil))))) nil)))))
;;;###autoload
(defun byte-compile (form) (defun byte-compile (form)
"If FORM is a symbol, byte-compile its function definition. "If FORM is a symbol, byte-compile its function definition.
If FORM is a lambda or a macro, byte-compile it as a function." If FORM is a lambda or a macro, byte-compile it as a function."
...@@ -2725,6 +2739,7 @@ If FORM is a lambda or a macro, byte-compile it as a function." ...@@ -2725,6 +2739,7 @@ If FORM is a lambda or a macro, byte-compile it as a function."
;; Renamed from byte-compile-report-call-tree ;; Renamed from byte-compile-report-call-tree
;; to avoid interfering with completion of byte-compile-file. ;; to avoid interfering with completion of byte-compile-file.
;;;###autoload
(defun display-call-tree (&optional filename) (defun display-call-tree (&optional filename)
"Display a call graph of a specified file. "Display a call graph of a specified file.
This lists which functions have been called, what functions called This lists which functions have been called, what functions called
...@@ -2853,6 +2868,7 @@ invoked interactively." ...@@ -2853,6 +2868,7 @@ invoked interactively."
;;; by crl@newton.purdue.edu ;;; by crl@newton.purdue.edu
;;; Only works noninteractively. ;;; Only works noninteractively.
;;;###autoload
(defun batch-byte-compile () (defun batch-byte-compile ()
"Run `byte-compile-file' on the files remaining on the command line. "Run `byte-compile-file' on the files remaining on the command line.
Use this from the command line, with `-batch'; Use this from the command line, with `-batch';
...@@ -2959,3 +2975,5 @@ For example, invoke \"emacs -batch -f batch-byte-compile $emacs/ ~/*.el\"" ...@@ -2959,3 +2975,5 @@ For example, invoke \"emacs -batch -f batch-byte-compile $emacs/ ~/*.el\""
byte-compile-constant byte-compile-constant
byte-compile-variable-ref)))) byte-compile-variable-ref))))
nil) nil)
;;; bytecomp.el ends here
...@@ -512,6 +512,7 @@ run `normal-mode' explicitly." ...@@ -512,6 +512,7 @@ run `normal-mode' explicitly."
("\\.article\\'" . text-mode) ("\\.article\\'" . text-mode)
("\\.letter\\'" . text-mode) ("\\.letter\\'" . text-mode)
("\\.texinfo\\'" . texinfo-mode) ("\\.texinfo\\'" . texinfo-mode)
("\\.texi\\'" . texinfo-mode)
("\\.lsp\\'" . lisp-mode) ("\\.lsp\\'" . lisp-mode)
("\\.awk\\'" . awk-mode) ("\\.awk\\'" . awk-mode)
("\\.prolog\\'" . prolog-mode) ("\\.prolog\\'" . prolog-mode)
......
...@@ -1214,17 +1214,12 @@ and reverse search is specified by a negative numeric arg." ...@@ -1214,17 +1214,12 @@ and reverse search is specified by a negative numeric arg."
(defun rmail-delete-forward (&optional backward) (defun rmail-delete-forward (&optional backward)
"Delete this message and move to next nondeleted one. "Delete this message and move to next nondeleted one.
Deleted messages stay in the file until the \\[rmail-expunge] command is given. Deleted messages stay in the file until the \\[rmail-expunge] command is given.
With prefix argument, delete and move backward. If there is no nondeleted With prefix argument, delete and move backward."
message to move to in the preferred or specified direction, move in the
other direction."
(interactive "P") (interactive "P")
(rmail-set-attribute "deleted" t) (rmail-set-attribute "deleted" t)
(condition-case () (condition-case ()
(rmail-next-undeleted-message (if backward -1 1)) (rmail-next-undeleted-message (if backward -1 1))
(error (error nil)))
(condition-case ()
(rmail-previous-undeleted-message (if backward -1 1))
(error nil)))))
(defun rmail-delete-backward () (defun rmail-delete-backward ()
"Delete this message and move to previous nondeleted one. "Delete this message and move to previous nondeleted one.
......
...@@ -521,7 +521,7 @@ Its numeric meaning is what you would get from `(interactive \"p\")'.") ...@@ -521,7 +521,7 @@ Its numeric meaning is what you would get from `(interactive \"p\")'.")
if (NILP (raw)) if (NILP (raw))
XFASTINT (val) = 1; XFASTINT (val) = 1;
else if (EQ (val, Qminus)) else if (EQ (raw, Qminus))
XSETINT (val, -1); XSETINT (val, -1);
else if (CONSP (raw)) else if (CONSP (raw))
XSETINT (val, XINT (XCONS (raw)->car)); XSETINT (val, XINT (XCONS (raw)->car));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment