Commit graph

199 commits

Author SHA1 Message Date
Dave Love
def9389aaa (maphash, map-char-table): Use
byte-compile-funarg.
2002-11-19 18:02:07 +00:00
Richard M. Stallman
ab8bc7178c (byte-compile-lambda): Handle progn like let, inside interactive spec. 2002-11-06 05:07:04 +00:00
Juanma Barranquero
6b8c2efcd6 Fix typo. 2002-10-17 15:32:26 +00:00
Richard M. Stallman
2b25de040f (byte-compile-output-docform): Don't make the definition dynamic if it
shares structure with the arg list.
2002-09-18 16:02:49 +00:00
Stefan Monnier
4f6d5bf009 (byte-compile-file): Don't switch buffer. 2002-09-09 21:41:34 +00:00
Richard M. Stallman
4eb4926c58 (byte-recompile-directory): Set and then bind default-directory. 2002-09-09 19:35:57 +00:00
Richard M. Stallman
cd91e34cb4 (byte-compile-delete-errors): Default to nil. 2002-09-09 00:28:38 +00:00
Richard M. Stallman
4390021bf8 (byte-compile-warning-prefix):
Decide here whether to print which form we're compiling.
If we do that, still print file and line.  Make file name
relative to default-directory.	Print fewer newlines.
(byte-compile-log-file): Print something even if no file.
Print messages for entering and leaving directories,
and set default-directory.
(displaying-byte-compile-warnings): Only sometimes bind warning-series.
(byte-compile-warning-series): New function.
(byte-compile-file): Set byte-compile-last-logged-file, don't bind it.
(byte-compile-display-log-head-p): Function deleted.
2002-08-29 17:26:47 +00:00
Richard M. Stallman
8f876842ca (byte-compile-log-file): Use \f.
(byte-compile-cl-warn): Add cl-macroexpand-all, cl-compiling-file
to don't-warn list.
2002-08-29 14:49:48 +00:00
Richard M. Stallman
c43008c44a (byte-compile-find-cl-functions):
Check that (car elt) is a string.
2002-07-31 22:05:16 +00:00
Richard M. Stallman
1fd592a0b0 (byte-compile-set-symbol-position): Don't recompute `entry' on each iteration.
(byte-compile-delete-first): Make it defsubst.
2002-07-25 18:18:10 +00:00
Richard M. Stallman
95c997fa7f (byte-compile-cl-functions): New variable.
(byte-compile-cl-warn): Use that variable.
(byte-compile-find-cl-functions): New function.
(displaying-byte-compile-warnings):
Call byte-compile-find-cl-functions.
2002-07-24 03:58:02 +00:00
Richard M. Stallman
22788fb817 Use warnings.el:
(byte-compile-warning-prefix): New function.
(byte-compile-log-file): Return page start position.
(byte-compile-log-warning): New function.
(byte-compile-warn): Use byte-compile-log-warning.
(byte-compile-report-error): Likewise.  Also use error-message-string.
(displaying-byte-compile-warnings): Bind warning-series.
Don't bind or use byte-compile-warnings-point-max.
Don't display the log buffer at the end.
(byte-compile-warnings-point-max): Variable deleted.
(byte-compile-log-1): Rewrite for trace info, not used for warnings.
(byte-compile-last-warned-form, byte-compile-last-logged-file):
Defvars moved.
2002-07-20 22:01:19 +00:00
Richard M. Stallman
9cb9a7bc56 (byte-compile-cl-warn): Delete `values'
and `values-list' from list of CL functions.

(compile-defun): Bind `read-with-symbol-positions' to current buffer.
2002-07-19 23:01:24 +00:00
Juanma Barranquero
6079b12b94 (unread-command-char, executing-macro, post-command-idle-hook,
post-command-idle-delay): Move obsolescence declarations to subr.el.
2002-07-19 11:35:37 +00:00
Juanma Barranquero
9c708a1b1c (dot, dot-max, dot-min, dot-marker, buffer-flush-undo, baud-rate,
compiled-function-p, define-function): Move obsolescence declarations to
subr.el.
2002-07-19 06:23:28 +00:00
Richard M. Stallman
4795d1c7d1 (byte-compile-warning-types):
Rename cl-func to cl-functions.  Enable it by default.
(byte-compile-file-form-eval-boundary):
Turn off cl-functions warnings if the file loads cl.
(byte-compile-initial-macro-environment): For eval-and-compile,
use byte-compile-eval-before-compile to eval.
(byte-compile-eval-before-compile): New function to turn off
cl-functions when appropriate, for eval-and-compile.

(byte-compile-warnings):  Add cl-func option.
(byte-compile-cl-warn): New function.
(byte-compile-form): Use it, to warn about calling cl functions.
2002-07-02 18:48:34 +00:00
Juanma Barranquero
52f4048f13 (baud-rate): Fix obsolescence declaration.
(meta-flag): Likewise.
2002-06-27 16:07:04 +00:00
Stefan Monnier
ba76e7fac5 (byte-compile-callargs-warn):
Check for `noruntime' even if the function has a known sig.
(byte-compile-file, byte-compile-output-docform):
Don't hard code point-min = 1.
2002-06-25 01:09:52 +00:00
Richard M. Stallman
c4f2cabda6 (byte-recompile-directory): Doc fix.
(batch-byte-recompile-directory): Undo previous change.
2002-06-15 20:37:01 +00:00
Richard M. Stallman
d09b1c02f5 (batch-byte-compile-file): Delete the output file if we get a file-error. 2002-05-29 16:38:46 +00:00
Colin Walters
ccb3c8deaf (byte-compile-last-line): Deleted.
(byte-compile-delete-first): New function.
(byte-compile-read-position): New variable.
(byte-compile-last-position): New variable.
(byte-compile-current-buffer): New variable.
(byte-compile-log-1): Use it.
(byte-compile-set-symbol-position): New function.
(byte-compile-obsolete, byte-compile-callargs-warn)
(byte-compile-arglist-warn, byte-compile-arglist-warn)
(byte-compile-print-syms, byte-compile-file-form-defmumble)
(byte-compile-check-lambda-list, byte-compile-lambda)
(byte-compile-form, byte-compile-variable-ref)
(byte-compile-subr-wrong-args, byte-compile-negation-optimizer)
(byte-compile-condition-case, byte-compile-defun)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form): Use it.
(byte-compile-from-buffer): Set it, and bind
`read-with-symbol-positions' and `read-symbol-positions-list'.
(byte-compile-debug): New variable.
2002-05-28 17:40:47 +00:00
Gerd Moellmann
985b468607 (byte-compile-file-form-defmumble):
Handle declarations in macro definitions.
2002-03-24 19:48:27 +00:00
Stefan Monnier
814c447faf (batch-byte-compile-if-not-done): Add autoload cookie. 2002-03-22 23:05:26 +00:00
Richard M. Stallman
7e7d0f8bc2 (batch-byte-compile): New arg noforce.
(batch-byte-compile-if-not-done): New function.
2002-02-01 04:14:14 +00:00
Stefan Monnier
fef3407e0a (byte-compile-call-tree, byte-code-vector)
(byte-stack+-info, byte-compile-last-warned-form)
(byte-compile-last-logged-file): Don't defconst a variable.
(no-byte-compile): Declare.
(byte-compile-file): Don't boundp-check no-byte-compile any more.
(byte-compile-defvar): Leave defconst as is.
2001-11-17 00:54:36 +00:00
Sam Steingold
d90a41e8ba (byte-recompile-directory): Report numbers of files skipped and failed too. 2001-10-29 17:26:26 +00:00
Sam Steingold
1f00682428 Put the *Compile-Log* buffer in `compilation-mode'. 2001-10-18 21:05:16 +00:00
Gerd Moellmann
e34fd2f2c0 (byte-compile-check-lambda-list):
Turn error for repeated variables into warning.
2001-10-12 21:59:38 +00:00
Gerd Moellmann
eadd64444e (byte-compile-check-lambda-list): New
function checking that lambda-list consists of non-constant
symbols, that &rest and &optional are followed by variable names,
that &rest VAR is the last element, and that variables aren't
doubled.
(byte-compile-lambda): Use it.
2001-10-12 14:20:14 +00:00
Gerd Moellmann
b8175fe659 (byte-compile-display-log-head-p): New
function extracted from byte-compile-log-1.
(byte-compile-log-1): Change output to be more in line with
the output of other GNU tools.
(byte-compile-warn): Emit `warning' instead of `**' for warnings.
(byte-compile-report-error): Downcase error message.  Use
`error' instead of `!!' for error messages.
(byte-compile-print-syms): Treat non-interactive case specially.
(displaying-byte-compile-warnings): Use backquote.
(byte-compile-from-buffer): Bind byte-compile-last-line.
(batch-byte-compile): Remove `Done' message.
2001-10-11 12:57:18 +00:00
Stefan Monnier
82345a9abc (byte-compile-file): Return success when the file says no-byte-compile. 2001-10-07 23:34:07 +00:00
Gerd Moellmann
3614fc84de (byte-recompile-directory): Make sure the file is readable.
(byte-compile-file): Don't compile if `no-byte-compile' is set.
(byte-compile-defvar): Update to reflect the change in Fdefvar.
(batch-byte-recompile-directory): Pass arg=0.
2001-10-05 09:29:51 +00:00
Miles Bader
e4cf159b2a (byte-compile-file): Remove TARGET-FILE before writing it, so that
hard-links don't see new version.
2001-08-21 17:01:57 +00:00
Pavel Janík
5553563924 Some fixes to follow coding conventions in files maintained by FSF. 2001-07-15 16:15:35 +00:00
Stefan Monnier
d686d354c1 (byte-compile-file-form-autoload): Use the
same definition in byte-compile-function-environment as `autoload'
would put in `symbol-function'.
2001-05-27 11:40:39 +00:00
Richard M. Stallman
5afd1b9cc3 (byte-compile-log-1): In non-batch case, don't mention the file name
or the date here, because they are logged at the start of the file.
2001-01-08 19:33:02 +00:00
Gerd Moellmann
9985d3915e (byte-compiling-files-p): New function. 2000-11-09 23:01:40 +00:00
Gerd Moellmann
6a619620de (byte-compile-current-file): Don't bind
it, so that a boundp test can be used to determine if we're
currently byte-compiling.
2000-11-09 16:07:56 +00:00
Miles Bader
3b6542bab5 (byte-compile-file): Bind `byte-compile-last-logged-file' to nil. 2000-10-23 10:27:47 +00:00
Miles Bader
cb3069bb5e [the following changes fix a bug where `define-minor-mode' didn't
correctly generate :require clauses for defcustoms in compiled files]

(byte-compile-last-logged-file):
  New variable.
(byte-compile-log-file, byte-compile-log-1):
  Don't set `byte-compile-current-file' to nil.
  Instead set `byte-compile-last-logged-file' to it.
  Test whether byte-compile-current-file equals byte-compile-last-logged-file
    instead of whether its nil.
2000-10-23 09:16:47 +00:00
Gerd Moellmann
1bc20d83cb (byte-compile-defvar-or-defconst): Only cons onto
current-load-list in top-level forms.  Else this leaks a cons cell
every time a defun is called.
2000-09-25 15:41:30 +00:00
Gerd Moellmann
71246c2c41 Undo last change
because it breaks '(make-variable-buffer-local (defvar ...)'
which is used at least in dired.
2000-09-12 09:10:56 +00:00
Gerd Moellmann
cc0f95a474 (byte-compile-defvar): Only cons onto
current-load-list in top-level forms.  Else this leaks a cons cell
every time a defun is called.
2000-09-11 18:26:43 +00:00
Dave Love
28bb2cef02 (mapc): Use byte-compile-funarg. 2000-08-27 21:55:00 +00:00
Miles Bader
527083d575 (byte-compile-beginning-of-line):
Compiler macro removed; beginning-of-line is no longer always
equivalent to forward-line, in the presence of fields.
2000-08-19 01:53:42 +00:00
Kenichi Handa
447a052b48 (byte-compile-fix-header): Fix the way of checking the existence of
any multibyte characters.
2000-08-07 01:47:27 +00:00
Stefan Monnier
20482b7061 * byte-run.el (make-obsolete, make-obsolete-variable):
Add an optional WHEN argument and change the format of the
symbol-property information.
* emacs-lisp/bytecomp.el (byte-compile-log): Don't quote lambda.
(byte-compile-obsolete, byte-compile-variable-ref): Understand the
new obsolete-symbol-property format and print WHEN if it is provided.
(make-obsolete): Update the calls to use the third argument.
2000-06-01 04:58:08 +00:00
Dave Love
ed62683d5a (byte-compile-callargs-warn): Use subr-arity to check primitives.
(byte-compile-flush-pending, byte-compile-file-form-progn)
(byte-compile-normal-call, byte-compile-list, byte-compile-concat)
(byte-compile-insert, byte-compile-funcall): Use mapc instead of
mapcar.
2000-05-26 10:35:38 +00:00
Gerd Moellmann
c3b2784b4b (byte-compile-file-form-autoload): Re-enable new code. 2000-03-31 11:28:14 +00:00