1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 11:00:45 -08:00

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-97

Merge from emacs--cvs-trunk--0

Patches applied:

 * emacs--cvs-trunk--0  (patch 616-696)

   - Add lisp/mh-e/.arch-inventory
   - Update from CVS
   - Merge from gnus--rel--5.10
   - Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords.
   - lisp/gnus/ChangeLog: Remove duplicate entry

 * gnus--rel--5.10  (patch 147-181)

   - Update from CVS
   - Merge from emacs--cvs-trunk--0
   - Update from CVS: lisp/mml.el (mml-preview): Doc fix.
   - Update from CVS: texi/message.texi: Fix default values.
   - Update from CVS: texi/gnus.texi (RSS): Addition.
This commit is contained in:
Miles Bader 2006-01-16 08:37:27 +00:00
commit 41882805d6
566 changed files with 62573 additions and 32764 deletions

View file

@ -1,7 +1,7 @@
;;; bytecomp.el --- compilation of Lisp code into byte code
;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002,
;; 2003, 2004, 2005 Free Software Foundation, Inc.
;; 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
@ -908,6 +908,13 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
;; list. If our current position is after the symbol's position, we
;; assume we've already passed that point, and look for the next
;; occurrence of the symbol.
;;
;; This function should not be called twice for the same occurrence of
;; a symbol, and it should not be called for symbols generated by the
;; byte compiler itself; because rather than just fail looking up the
;; symbol, we may find an occurrence of the symbol further ahead, and
;; then `byte-compile-last-position' as advanced too far.
;;
;; So your're probably asking yourself: Isn't this function a
;; gross hack? And the answer, of course, would be yes.
(defun byte-compile-set-symbol-position (sym &optional allow-previous)
@ -2304,7 +2311,7 @@ list that represents a doc string reference.
',name ',declaration))
outbuffer)))))
(let* ((new-one (byte-compile-lambda (cons 'lambda (nthcdr 2 form))))
(let* ((new-one (byte-compile-lambda (nthcdr 2 form) t))
(code (byte-compile-byte-code-maker new-one)))
(if this-one
(setcdr this-one new-one)
@ -2500,10 +2507,16 @@ If FORM is a lambda or a macro, byte-compile it as a function."
;; Byte-compile a lambda-expression and return a valid function.
;; The value is usually a compiled function but may be the original
;; lambda-expression.
(defun byte-compile-lambda (fun)
(unless (eq 'lambda (car-safe fun))
(error "Not a lambda list: %S" fun))
(byte-compile-set-symbol-position 'lambda)
;; When ADD-LAMBDA is non-nil, the symbol `lambda' is added as head
;; of the list FUN and `byte-compile-set-symbol-position' is not called.
;; Use this feature to avoid calling `byte-compile-set-symbol-position'
;; for symbols generated by the byte compiler itself.
(defun byte-compile-lambda (fun &optional add-lambda)
(if add-lambda
(setq fun (cons 'lambda fun))
(unless (eq 'lambda (car-safe fun))
(error "Not a lambda list: %S" fun))
(byte-compile-set-symbol-position 'lambda))
(byte-compile-check-lambda-list (nth 1 fun))
(let* ((arglist (nth 1 fun))
(byte-compile-bound-variables
@ -2755,9 +2768,7 @@ That command is designed for interactive use only" fn))
(or (not (byte-compile-version-cond
byte-compile-compatibility))
(not (get (get fn 'byte-opcode) 'emacs19-opcode))))
(progn
(byte-compile-set-symbol-position fn)
(funcall handler form))
(funcall handler form)
(when (memq 'callargs byte-compile-warnings)
(if (memq fn '(custom-declare-group custom-declare-variable custom-declare-face))
(byte-compile-nogroup-warn form))
@ -3673,7 +3684,7 @@ that suppresses all warnings during execution of BODY."
(list 'fset
(list 'quote (nth 1 form))
(byte-compile-byte-code-maker
(byte-compile-lambda (cons 'lambda (cdr (cdr form)))))))
(byte-compile-lambda (cdr (cdr form)) t))))
(byte-compile-discard))
;; We prefer to generate a defalias form so it will record the function
;; definition just like interpreting a defun.
@ -3681,7 +3692,7 @@ that suppresses all warnings during execution of BODY."
(list 'defalias
(list 'quote (nth 1 form))
(byte-compile-byte-code-maker
(byte-compile-lambda (cons 'lambda (cdr (cdr form))))))
(byte-compile-lambda (cdr (cdr form)) t)))
t))
(byte-compile-constant (nth 1 form)))
@ -3690,8 +3701,7 @@ that suppresses all warnings during execution of BODY."
(byte-compile-body-do-effect
(list (list 'fset (list 'quote (nth 1 form))
(let ((code (byte-compile-byte-code-maker
(byte-compile-lambda
(cons 'lambda (cdr (cdr form)))))))
(byte-compile-lambda (cdr (cdr form)) t))))
(if (eq (car-safe code) 'make-byte-code)
(list 'cons ''macro code)
(list 'quote (cons 'macro (eval code))))))
@ -3777,7 +3787,15 @@ that suppresses all warnings during execution of BODY."
(push (cons (nth 1 (nth 1 form))
(if constant (nth 1 (nth 2 form)) t))
byte-compile-function-environment)))
(byte-compile-normal-call form))
;; We used to jus do: (byte-compile-normal-call form)
;; But it turns out that this fails to optimize the code.
;; So instead we now do the same as what other byte-hunk-handlers do,
;; which is to call back byte-compile-file-form and then return nil.
;; Except that we can't just call byte-compile-file-form since it would
;; call us right back.
(byte-compile-keep-pending form)
;; Return nil so the form is not output twice.
nil)
;; Turn off warnings about prior calls to the function being defalias'd.
;; This could be smarter and compare those calls with
@ -4085,7 +4103,11 @@ already up-to-date."
(defun batch-byte-recompile-directory (&optional arg)
"Run `byte-recompile-directory' on the dirs remaining on the command line.
Must be used only with `-batch', and kills Emacs on completion.
For example, invoke `emacs -batch -f batch-byte-recompile-directory .'."
For example, invoke `emacs -batch -f batch-byte-recompile-directory .'.
Optional argument ARG is passed as second argument ARG to
`batch-recompile-directory'; see there for its possible values
and corresponding effects."
;; command-line-args-left is what is left of the command line (startup.el)
(defvar command-line-args-left) ;Avoid 'free variable' warning
(if (not noninteractive)