Commit graph

441 commits

Author SHA1 Message Date
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
e9bffc61f2 Refill some copyright headers. 2011-01-15 18:21:30 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Stefan Monnier
17870c01f6 Fix up last change.
* lisp/emacs-lisp/bytecomp.el (byte-compile-output-docform): Fix up use of
print-number-table.
* src/print.c (PRINT_NUMBER_OBJECT, PRINT_NUMBER_STATUS): Remove.
(print_preprocess): Fix handling of uninterned symbols in last change.
2010-12-22 19:00:12 -05:00
Stefan Monnier
4a47c27573 Merge from emacs-23 2010-11-17 22:54:14 -05:00
Glenn Morris
7847454adc bytecomp trivia.
* lisp/emacs-lisp/bytecomp.el (byte-compile-log-buffer): New constant.
Use it to replace all instances of "*Compile-Log*"
2010-11-11 19:21:38 -08:00
Stefan Monnier
acef0722fc * lisp/files.el (safe-local-variable-p): Gracefully handle errors.
* lisp/emacs-lisp/bytecomp.el (byte-compile-warnings): Simplify the
safety predicate.
2010-11-11 17:19:01 -05:00
Noah Friedman
fa14dc1800 (byte-recompile-file): If bytecomp-arg is nil, do not ask to recompile files that are not already compiled, and do not recompile them. 2010-11-02 15:51:25 -07:00
Glenn Morris
feb5e60ae7 * lisp/emacs-lisp/bytecomp.el (byte-recompile-file): Fix previous change. 2010-10-31 19:55:12 -07:00
Julien Danjou
430e7297cb * lisp/emacs-lisp/bytecomp.el (byte-recompile-file): New fun.
(byte-recompile-directory):
* lisp/emacs-lisp/lisp-mode.el (emacs-lisp-byte-compile-and-load):
* cedet/ede/proj-elisp.el (project-compile-target):
* cedet/semantic/ede-grammar.el (project-compile-target):
Use `byte-recompile-file'.

Fixes: debbugs:7297
2010-10-31 15:25:39 -04:00
Chong Yidong
96bcef2ec6 Remove obsolete use of binary-overwrite-mode in bytecomp (Bug#7001).
* emacs-lisp/bytecomp.el (byte-compile-from-buffer): Remove
obsolete use of binary-overwrite-mode (Bug#7001).
2010-10-03 00:31:59 -04:00
Chong Yidong
986d19df1f Add minor comment (Bug#7001). 2010-10-02 19:10:41 -04:00
Glenn Morris
9c524fcb89 Run kill-emacs-hook in batch mode, and on SIGINT in batch mode.
See thread http://lists.gnu.org/archive/html/emacs-devel/2010-09/msg00795.html

* src/emacs.c (fatal_error_signal): Also run Fkill_emacs on SIGINT.
(main) [!WINDOWSNT]: Handle SIGINT with fatal_error_signal
in batch-mode.
(Fkill_emacs): Doc fix.  Also run the hook in batch mode.
(kill-emacs-hook): Doc fix.

* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Use kill-emacs-hook to
delete tempfile if interrupted during compilation.

* doc/lispref/os.texi (Killing Emacs): Hook now runs in batch mode.

* etc/NEWS: Mention these changes.
2010-10-01 19:30:11 -07:00
Glenn Morris
7a16788be4 Trivial bytecomp.el change.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar):
(byte-compile-defvar, byte-compile-cl-warn):
Start warnings with lower-case, like the majority.
2010-09-23 00:55:01 -07:00
Stefan Monnier
3fe6ef4e36 * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar)
(byte-compile-defvar): "foo/bar" does not lack a prefix.
2010-09-17 16:31:06 +02:00
Stefan Monnier
4f1e996048 * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types): New type
`lexical' for warnings related to lexical scoping.
(byte-compile-file-form-defvar, byte-compile-defvar): Warn about
global vars which don't have a prefix and could hence affect lexical
scoping in unrelated files.
2010-09-15 17:30:43 +02:00
Glenn Morris
7eb662be2f * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Tweak previous change.
Write out the name of the .elc file, rather than the temp-file.
2010-09-11 12:33:52 -07:00
Glenn Morris
0f34ae289a Close bug#4196.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Create .elc files
atomically, to avoid parallel build errors.
2010-09-11 11:52:04 -07:00
Glenn Morris
5a972c365f Very minor bytecomp fix.
* lisp/emacs-lisp/bytecomp.el (byte-compile-report-ops):
Error if not compiled with -DBYTE_CODE_METER.
2010-09-08 09:02:38 -07:00
Glenn Morris
13639aab35 * emacs-lisp/bytecomp.el (byte-recompile-directory): Ignore dir-locals-file. 2010-09-08 08:59:10 -07:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Stefan Monnier
171eda5358 Merge from emacs-23 2010-05-24 20:54:13 -04:00
Stefan Monnier
dd9b52a693 * emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions):
Add delete-backward-char.
2010-05-24 17:01:10 -04:00
Stefan Monnier
9ae0c31028 Provide byte-compiler warnings when set-default a read-only var.
* emacs-lisp/bytecomp.el (byte-compile-set-default): New function.
(byte-compile-setq-default): Optimize for the
single-var case and don't call byte-compile-form in this case to avoid
inf-loop with byte-compile-set-default.
2010-04-23 12:26:11 -04:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Glenn Morris
5fa9d1ecf4 Ulrich Mueller <ulm at gentoo.org>
(byte-compile-insert-header): Put the version number comment back on
its own line, for easier parsing by external tools.
2009-12-07 06:21:27 +00:00
Glenn Morris
3ab4308bab (byte-compile-save-excursion): Make message consistent with others (no
final period).
2009-12-01 03:14:02 +00:00
Stefan Monnier
62a258a71d (byte-compile-warning-types): New type `suspicious'.
(byte-compile-warnings): Use byte-compile-warning-types.
(byte-compile-save-excursion): Warn about use of set-buffer right
after save-excursion.
2009-11-27 22:03:04 +00:00
YAMAMOTO Mitsuharu
1e8571214b (byte-compile-output-file-form):
Quote doc string reference in defvaralias as it is not in special form.
(byte-compile-output-docform): Doc fix.
2009-11-16 04:06:12 +00:00
Glenn Morris
0028351d98 (byte-compile-single-version): Remove, unused.
(baud-rate, byte-code-function-p)
(byte-compile-generate-emacs19-bytecodes, byte-compile-overwrite-file)
(byte-compiler-valid-options, byte-compiler-options-handler)
(byte-compile-and-load-file, byte-compile-buffer):
Remove commented-out code.
2009-11-14 04:23:18 +00:00
Glenn Morris
775adc5143 (byte-compile-insert-header): Drop test for Emacs 19. (Bug#1531)
(byte-compile-fix-header): Update for the above change.
Drop test for epoch::version.
2009-11-05 03:25:41 +00:00
Dan Nicolaescu
f6195dfb58 * emacs-lisp/bytecomp.el (byte-compile-output-file-form): Handle defvaralias.
* make-docfile.c (scan_lisp_file): Also look for `defvaralias'.
2009-11-04 06:15:41 +00:00
Glenn Morris
eef899a997 (byte-defop-compiler19): Remove.
Without byte-compile-compatibility, the 'emacs19-opcode property is not
used by anything.  Replace all calls with byte-defop-compiler.
2009-11-04 03:17:15 +00:00
Glenn Morris
e5c89ce967 (byte-compile-version-cond): Remove macro.
(byte-compile-compatibility): Remove option.
(byte-compile-close-variables, byte-compile-fix-header)
(byte-compile-insert-header, byte-compile-output-docform)
(byte-compile-file-form-defmumble, byte-compile-byte-code-maker)
(byte-compile-lambda, byte-compile-form, byte-defop-compiler19)
(byte-compile-list, byte-compile-concat, byte-compile-function-form)
(byte-compile-insert, byte-compile-defun):
Remove support for byte-compile-compatibility and Emacs 18.  (Bug#4571)
2009-11-04 03:15:14 +00:00
Glenn Morris
2aea6521e3 (byte-compile-file-form-defvar)
(byte-compile-file-form-define-abbrev-table)
(byte-compile-file-form-custom-declare-variable)
(byte-compile-variable-ref, byte-compile-defvar):
Whether or not a warning is enabled should only affect whether we issue
the warning, not whether or not we collect the relevant data.
Eg warnings can be turned on and off throughout the course of a file.
2009-11-03 03:16:23 +00:00
Glenn Morris
416d35886f (byte-compile-warning-types, byte-compile-warnings): Add `constants'
as an option.
(byte-compile-callargs-warn, byte-compile-arglist-warn)
(display-call-tree): Update for byte-compile-fdefinition possibly
returning `(macro lambda ...)'.  (Bug#4778)
(byte-compile-variable-ref, byte-compile-setq-default):
Respect `constants' member of byte-compile-warnings.
2009-10-31 02:10:43 +00:00
Stefan Monnier
9d28c33ede * eval.c (Fcalled_interactively_p): Add `kind' argument.
* subr.el (interactive-p): Mark obsolete.
(called-interactively-p): Make the optional-ness of `kind' obsolete.
* emacs-lisp/bytecomp.el (byte-compile-fdefinition): Make it obey
advertised-signature-table for subroutines as well.
2009-10-01 17:47:38 +00:00
Stefan Monnier
ced10a4c9f * emacs-lisp/byte-run.el (advertised-signature-table): New var.
(set-advertised-calling-convention): New function.
(make-obsolete, define-obsolete-function-alias)
(make-obsolete-variable, define-obsolete-variable-alias):
Make the optional-ness of `when' obsolete.
(define-obsolete-face-alias): Make `when' non-optional.
* help-fns.el (help-function-arglist):
* emacs-lisp/bytecomp.el (byte-compile-fdefinition):
Use advertised-signature-table.
2009-10-01 16:54:21 +00:00
Stefan Monnier
e3a6b82fc7 (byte-compile-defmacro-declaration): New fun.
(byte-compile-file-form-defmumble, byte-compile-defmacro): Use it.
(byte-compile-defmacro): Use backquotes.
2009-10-01 04:38:52 +00:00
Glenn Morris
88d5190ca2 (byte-compile-form): Always check the function arguments, whether or
not it has a handler.
2009-09-17 07:29:43 +00:00
Glenn Morris
8480fc7c63 (byte-compile-not-obsolete-vars): Rename from byte-compile-not-obsolete-var.
It's a list now.
(byte-compile-not-obsolete-funcs): New variable.
(byte-compile-warn-obsolete): Don't warn about functions if they are in
byte-compile-not-obsolete-funcs.
(byte-compile-variable-ref, byte-compile-defvar): Update for
byte-compile-not-obsolete-vars name-change and list nature.
(byte-compile-maybe-guarded): Suppress warnings about obsolete functions
and variables behind (f)boundp tests.
2009-09-16 03:13:03 +00:00
Stefan Monnier
8fed6934e5 * Makefile.in (compile-onefile): Use byte-compile-refresh-preloaded.
* emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded): Don't autoload.
2009-09-15 15:29:50 +00:00
Stefan Monnier
49fec53141 (byte-compile-refresh-preloaded): New function. 2009-09-15 04:03:35 +00:00
Glenn Morris
c276856990 (byte-compile-keep-pending, byte-compile-file-form, byte-compile-lambda)
(byte-compile-top-level-body, byte-compile-form)
(byte-compile-variable-ref, byte-compile-setq)
(byte-compile-setq-default, byte-compile-body)
(byte-compile-body-do-effect, byte-compile-and, byte-compile-or)
(batch-byte-compile): Give some more local variables with common names
a "bytecomp-" prefix to avoid masking warnings about free variables.
2009-09-15 02:34:32 +00:00
Glenn Morris
cb4fb1d065 (byte-compile-function-environment): Doc fix.
(byte-compile-file-form-autoload): Don't warn about unknown functions
where the autoload statement comes after the use.
(with-no-warnings): Give it a byte-hunk-handler like than of progn, so
that any handlers inside the body (eg require) are in turn respected.
2009-09-10 06:22:30 +00:00
Glenn Morris
3f12e5bd4c (emacs-lisp-file-regexp): Doc fix.
(byte-compile-dest-file-function): New option.
(byte-compile-dest-file): Doc fix.  Obey byte-compile-dest-file-function.
(byte-compile-cl-file-p): New function.
(byte-compile-eval): Only suppress noruntime warnings about cl functions
if the cl-functions warning is enabled.  Use byte-compile-cl-file-p.
(byte-compile-eval): Check for non-nil byte-compile-cl-functions rather
than for file being previously loaded.
(byte-compile-find-cl-functions): Use byte-compile-cl-file-p.
(byte-compile-file-form-require): Handle the case where requiring a file
indirectly causes CL to be loaded.
2009-09-05 19:10:37 +00:00
Stefan Monnier
6444d64a4d (byte-compile-interactive-only-functions): Add comint-run. 2009-08-30 05:22:50 +00:00
Stefan Monnier
d988dbf687 (byte-compile-const-symbol-p):
Recognize immutable variables like most-positive-fixnum.
(byte-compile-setq-default): Check and warn if trying to assign
to an immutable variable, or a non-variable.
2009-08-29 14:44:45 +00:00
Stefan Monnier
14acf2f55e * gnus/nnheader.el (nnheader-find-file-noselect):
* gnus/mm-util.el (mm-insert-file-contents):
* org/org-html.el (org-export-as-html):
* org/org-docbook.el (org-export-as-docbook):
* textmodes/reftex.el (reftex-get-file-buffer-force):
* progmodes/verilog-mode.el (verilog-batch-execute-func):
* emulation/viper.el (viper-go-away, viper-set-hooks):
* emacs-lisp/re-builder.el (re-builder-unload-function):
* emacs-lisp/bytecomp.el (byte-compile-file):
* ses.el (ses-unload-function):
* hexl.el (hexl-find-file):
* files.el (normal-mode):
* ehelp.el (with-electric-help):
* autoinsert.el (auto-insert-alist):
* arc-mode.el (archive-mode):
Use (default-value 'major-mode) instead of default-major-mode.
2009-08-28 17:02:53 +00:00