emacs/lisp/ChangeLog
Stefan Monnier 175069efeb Derive from prog-mode, use derived-mode-p, and fix up various
minor style issues in lisp/progmodes.

* lisp/progmodes/vhdl-mode.el (vhdl-write-file-hooks-init)
(vhdl-hs-minor-mode, vhdl-ps-print-init): Fix make-local-variable ->
make-local-hook.
* lisp/progmodes/sh-script.el (sh-require-final-newline): Remove.
(sh-set-shell): Don't set require-final-newline since it's already done
by prog-mode.
* lisp/progmodes/modula2.el (m2-mode): Don't make m2-end-comment-column
since we never set it.
* lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation):
Use read-string and standard prompt.
* lisp/progmodes/dcl-mode.el (dcl-mode-map): Move init into declaration.
* lisp/progmodes/meta-mode.el (meta-mode-abbrev-table): Merge init and decl.
(meta-common-mode-syntax-table): Rename from meta-mode-syntax-table.
(meta-common-mode-map): Rename from meta-mode-map.
Remove C-m binding, which is a user preference, not mode specific.
(meta-common-mode): New major mode; replace meta-common-initialization.
* lisp/progmodes/js.el (js-mode): Call syntax-propertize rather than messing
around with font-lock.
* lisp/progmodes/etags.el (select-tags-table-mode):
Derive from special-mode.
* lisp/progmodes/octave-mod.el (octave-mode):
* lisp/progmodes/gdb-mi.el (gdb-inferior-io-mode, gdb-threads-mode)
(gdb-memory-mode, gdb-disassembly-mode, gdb-breakpoints-mode)
(gdb-frames-mode, gdb-locals-mode, gdb-registers-mode):
Let define-derived-mode do its job.
* lisp/progmodes/cpp.el (cpp-edit-mode-map):
Move initialization into declaration.
(cpp-edit-mode): Use define-derived-mode.
(cpp-edit-load): Use derived-mode-p.
* lisp/progmodes/mixal-mode.el (mixal-mode):
* lisp/progmodes/f90.el (f90-mode):
* lisp/progmodes/cfengine.el (cfengine-mode): Don't bother setting
require-final-newline since prog-mode does it already.
* lisp/progmodes/cc-cmds.el (c-update-modeline): Use match-string.
* lisp/progmodes/asm-mode.el (asm-mode-map): Fix menu setup.
* lisp/progmodes/antlr-mode.el: Require cc-mode upfront.
(antlr-mode-syntax-table, antlr-action-syntax-table): Initialize in
the declaration.
(antlr-directory-dependencies, antlr-show-makefile-rules):
Use derived-mode-p.
(antlr-language-option): Don't assume point-min==1.
(antlr-mode): Use define-derived-mode.
* lisp/progmodes/ada-mode.el: Use derived-mode-p.
(ada-mode): Use define-derived-mode.
Use hack-local-variables-hook.

* lisp/progmodes/vhdl-mode.el (vhdl-mode):
* lisp/progmodes/verilog-mode.el (verilog-mode):
* lisp/progmodes/vera-mode.el (vera-mode):
* lisp/progmodes/sql.el (sql-mode):
* lisp/progmodes/scheme.el (scheme-mode):
* lisp/progmodes/perl-mode.el (perl-mode):
* lisp/progmodes/octave-inf.el (inferior-octave-mode):
* lisp/progmodes/autoconf.el (autoconf-mode):
* lisp/progmodes/m4-mode.el (m4-mode):
* lisp/progmodes/inf-lisp.el (inferior-lisp-mode):
* lisp/progmodes/idlwave.el (idlwave-mode):
* lisp/progmodes/icon.el (icon-mode):
* lisp/progmodes/idlw-help.el (idlwave-help-mode):
* lisp/progmodes/dcl-mode.el (dcl-mode):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode):
* lisp/progmodes/ebrowse.el (ebrowse-tree-mode, ebrowse-electric-list-mode)
(ebrowse-member-mode, ebrowse-electric-position-mode):
Use define-derived-mode.

* lisp/progmodes/xscheme.el (xscheme-start)
(local-set-scheme-interaction-buffer, scheme-interaction-mode):
* lisp/progmodes/which-func.el (which-function):
* lisp/progmodes/vhdl-mode.el (vhdl-set-style):
* lisp/progmodes/verilog-mode.el (verilog-set-compile-command)
(verilog-modify-compile-command, verilog-error-regexp-add-xemacs)
(verilog-set-define, verilog-auto-reeval-locals):
* lisp/progmodes/sql.el (sql-product-font-lock, sql-interactive-mode):
* lisp/progmodes/simula.el (simula-mode):
* lisp/progmodes/scheme.el (scheme-mode-variables, dsssl-mode):
* lisp/progmodes/python.el (python-check, python-mode):
* lisp/progmodes/prolog.el (prolog-mode-variables):
* lisp/progmodes/gud.el (gud-tooltip-activate-mouse-motions):
* lisp/progmodes/ebrowse.el (ebrowse-view-file-other-frame):
* lisp/progmodes/delphi.el (delphi-mode):
* lisp/progmodes/cc-styles.el (c-setup-paragraph-variables):
* lisp/progmodes/cc-mode.el (c-basic-common-init, c-common-init)
(c-font-lock-init): Move make-local-variable to their setq.

* lisp/progmodes/xscheme.el (exit-scheme-interaction-mode)
(xscheme-enter-interaction-mode, xscheme-enter-debugger-mode)
(xscheme-debugger-mode-p, xscheme-send-string-1):
* lisp/progmodes/tcl.el (inferior-tcl-proc, tcl-current-word)
(tcl-load-file, tcl-restart-with-file):
* lisp/progmodes/ps-mode.el (ps-run-running):
* lisp/progmodes/gdb-mi.el (gud-watch, gdb-mouse-set-clear-breakpoint):
* lisp/progmodes/js.el (js--get-all-known-symbols):
* lisp/progmodes/inf-lisp.el (inferior-lisp-proc):
* lisp/progmodes/idlwave.el (idlwave-beginning-of-statement)
(idlwave-template, idlwave-update-buffer-routine-info)
(idlwave-update-current-buffer-info)
(idlwave-get-routine-info-from-buffers, idlwave-choose)
(idlwave-scan-class-info, idlwave-fix-keywords)
(idlwave-list-buffer-load-path-shadows):
* lisp/progmodes/idlw-toolbar.el (idlwave-toolbar, idlwave-toolbar-add)
(idlwave-toolbar-remove):
* lisp/progmodes/idlw-shell.el (idlwave-shell-save-and-action)
(idlwave-shell-file-name, idlwave-shell-electric-debug-all-off)
(idlwave-shell-menu-def):
* lisp/progmodes/idlw-complete-structtag.el
(idlwave-prepare-structure-tag-completion):
* lisp/progmodes/gud.el (gud-set-buffer):
* lisp/progmodes/f90.el (f90-backslash-not-special):
* lisp/progmodes/delphi.el (delphi-find-unit): Use derived-mode-p.
2010-12-10 15:00:25 -05:00

274 lines
11 KiB
Text

2010-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/byte-lexbind.el (byte-compile-compute-lforminfo):
specialp -> special-variable-p.
2010-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
Don't macroexpand before evaluating in eval-and-compile, in case
`body's macro expansion uses macros and functions defined in itself.
2010-06-14 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/bytecomp.el (byte-compile-check-variable):
Update byte-compile-not-obsolete-var to byte-compile-not-obsolete-vars.
* Makefile.in (.el.elc): Increase max-lisp-eval-depth.
2006-12-04 Miles Bader <miles@gnu.org>
* Makefile.in (COMPILE_FIRST_STACK_DEPTH): New variable.
(compile, compile-always): Use it.
2005-10-24 Miles Bader <miles@gnu.org>
* subr.el (functionp): Re-remove.
* emacs-lisp/bytecomp.el (byte-compile-closure): Add optional
ADD-LAMBDA argument, which we just pass to `byte-compile-lambda'.
(byte-compile-defun): Use ADD-LAMBDA arg to `byte-compile-closure'
instead of adding lambda ourselves.
2004-08-09 Miles Bader <miles@gnu.org>
Changes from merging the funvec patch:
* emacs-lisp/bytecomp.el (byte-compile-make-closure): Use `curry'
instead of `vector' to create compiled closures.
Merge funvec patch.
2004-04-29 Miles Bader <miles@gnu.org>
* emacs-lisp/bytecomp.el (byte-compile-top-level): Add new entries
to `byte-compile-lexical-environment' at the start, not end.
(byte-compile-delay-out): Correctly default STACK-ADJUST to zero.
* emacs-lisp/byte-opt.el (byte-opt-update-stack-params):
Don't crash on no-op lapcode entries (car is nil).
* emacs-lisp/byte-lexbind.el (byte-compile-make-lambda-lexenv):
Push a lexvar onto lexenv, not a vinfo!
2004-04-11 Miles Bader <miles@gnu.org>
* emacs-lisp/bytecomp.el (byte-compile-top-level):
Correctly analyze lexically-bound arguments.
* emacs-lisp/byte-lexbind.el (byte-compile-lforminfo-analyze):
Use `append' instead of `nconc'.
* emacs-lisp/byte-lexbind.el (byte-compile-make-lvarinfo):
Don't use backquote to make a mutable data-structure.
(byte-compile-lvarinfo-num-refs, byte-compile-lvarinfo-num-sets):
Rename to use `num-' instead of `num'.
(byte-compile-make-lambda-lexenv): Adjust accordingly.
2004-04-10 Miles Bader <miles@gnu.org>
* emacs-lisp/byte-lexbind.el (byte-compile-compute-lforminfo):
Look at variable's global specialp state too.
2004-04-09 Miles Bader <miles@gnu.org>
* emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Default initial-stack-depth to 0.
(byte-optimize-lapcode): Discard the right number of values in
the stack-set+discard-->discard optimization.
2004-04-02 Miles Bader <miles@gnu.org>
* emacs-lisp/lisp-mode.el (eval-last-sexp-1): Setup the lexical
environment if lexical-binding is enabled.
2003-10-14 Miles Bader <miles@gnu.org>
* emacs-lisp/macroexp.el (macroexpand-all-1): Special-case
`backquote-list*' to avoid stack overflows.
2003-04-04 Miles Bader <miles@gnu.org>
* help-fns.el (help-function-arglist): Handle interpreted closures.
2002-11-20 Miles Bader <miles@gnu.org>
* emacs-lisp/bytecomp.el (byte-compile-stack-adjustment):
Correctly handle discardN* operators.
* emacs-lisp/byte-opt.el (byte-optimize-lapcode): Fix stack-depth
tracking errors.
2002-08-26 Miles Bader <miles@gnu.org>
* international/mule.el (make-char): Macroexpand call to
charset-id constructed by `byte-compile' hook.
* emacs-lisp/macroexp.el (macroexpand-all-1): Expand defconst value.
* emacs-lisp/byte-opt.el (byte-opt-update-stack-params): New macro.
(byte-optimize-lapcode): Keep track of stack-depth in final pass too.
Add more optimizations for lexical binding.
(byte-compile-inline-expand): Macroexpand result of inlining.
* emacs-lisp/bytecomp.el (byte-compile-lambda): Update call to
byte-compile-closure-initial-lexenv-p.
(byte-discardN-preserve-tos): Alias to byte-discardN.
(byte-compile-push-binding-init): Don't push unused variables on
init-lexenv.
(byte-compile-push-binding-init): Don't use LFORMINFO if it's nil.
(byte-compile-lambda): Don't look at lexical environment unless
we're using lexical binding.
(byte-compile-defmacro): Correctly generate macros.
* emacs-lisp/byte-lexbind.el (byte-compile-unbind): Optimize the
dynamic-bindings-only case.
(byte-compile-bind): Don't special-case unused lexical variables.
* emacs-lisp/disass.el (disassemble-1): Print arg for discardN ops.
2002-08-19 Miles Bader <miles@gnu.org>
* emacs-lisp/byte-opt.el (byte-decompile-bytecode-1):
Handle `byte-discardN-preserve-tos' pseudo-op.
(byte-compile-side-effect-and-error-free-ops): Add `byte-stack-ref'.
(byte-compile-side-effect-free-ops): Add `byte-vec-ref'.
(byte-optimize-lapcode): Add some cases for stack-set/ref ops.
Add tracking of stack-depth. Unfinished code to collapse
lexical-unbinding sequences.
* emacs-lisp/bytecomp.el (byte-compile-lapcode):
Handle `byte-discardN-preserve-tos' pseudo-op.
(byte-compile-top-level): If there are lexical args, output a TAG
op to record the initial stack-depth for the optimizer.
2002-08-17 Miles Bader <miles@gnu.org>
* emacs-lisp/bytecomp.el (byte-discardN): Add byte-defop.
(byte-compile-lapcode): Include byte-discardN.
(byte-compile-lambda): Fixup closure detection.
(byte-compile-top-level): Handle arguments for a lexical lambda.
(byte-compile-lexical-variable-ref, byte-compile-variable-ref)
(byte-compile-variable-set): Use byte-compile-stack-set/ref.
(byte-compile-discard): Add new parameters NUM and PRESERVE-TOS.
(byte-compile-stack-ref, byte-compile-stack-set): New functions.
(byte-compile-push-binding-init): Get the variable list properly
from LFORMINFO.
* emacs-lisp/byte-lexbind.el (byte-compile-lforminfo-analyze):
Ignore setq'd variables we're not interested in.
(byte-compile-make-lambda-lexenv): Add assertion that closed-over
variables be heap allocated.
(byte-compile-closure-initial-lexenv-p): Rename from
byte-compile-closure-lexenv-p.
(byte-compile-non-stack-bindings-p): Get the variable list
properly from LFORMINFO.
(byte-compile-maybe-push-heap-environment): Handle the
no-closed-over-variables case correctly.
(byte-compile-bind): Use byte-compile-stack-set/ref.
Don't bother modifying INIT-LEXENV as no one will see the changes.
(byte-compile-unbind): Call `byte-compile-discard' to handle
unbinding lexical bindings.
* emacs-lisp/disass.el (disassemble-internal): Handle closures.
(disassemble-1): Handle new bytecodes.
* emacs-lisp/byte-opt.el (disassemble-offset): Handle new bytecodes.
2002-06-16 Miles Bader <miles@gnu.org>
* emacs-lisp/macroexp.el (macroexp-accumulate): New macro.
(macroexpand-all-forms, macroexpand-all-clauses): Use it.
* Makefile.in (compile): Undo previous change.
2002-06-14 Miles Bader <miles@gnu.org>
* Makefile.in (COMPILE_FIRST): Add `emacs-lisp/macroexp.el'.
(compile): Add a special case that compiles `emacs-lisp/macroexp.el'
with an increased max-lisp-eval-depth.
* emacs-lisp/bytecomp.el: Provide `bytecomp-preload', at the
beginning of the file. Require `byte-lexbind' at compile time.
Add a few doc string.
(byte-compile-push-bytecodes)
(byte-compile-push-bytecode-const2): New macros.
(byte-compile-lapcode): Use them. Do general code cleanup.
(byte-compile-initial-macro-environment): Expand macros in
byte-compile-eval before passing to byte-compile-top-level.
(byte-compile): Use the `byte-compile-initial-macro-environment'.
* emacs-lisp/byte-lexbind.el: Require `bytecomp-preload' instead of
`bytecomp'.
(byte-compile-bind): Use `byte-compile-dynamic-variable-bind' to bind
dynamic variables.
(byte-compile-maybe-push-heap-environment): Fix function name typo.
2002-06-13 Miles Bader <miles@gnu.org>
Byte compiler lexical binding support (not finished yet):
* emacs-lisp/bytecomp.el: Require `macroexp'.
(byte-compile-lexical-environment)
(byte-compile-current-heap-environment)
(byte-compile-current-num-closures): New variables.
(0, 178, 179, 180, 181): New byte-opcodes.
(byte-compile-lapcode): Handle stack-ref/set opcodes. Signal an
error if a delay-output placeholder is not filled in yet.
(byte-compile-file-form, byte-compile): Expand all macros with
`macroexpand-all'.
(byte-compile-file-form-defsubst, byte-compile-form): Don't expand
macros here.
(byte-compile-make-lambda-lexenv): Autoload.
(byte-compile-lambda): Initial code for handling lexically-bound
arguments and closures; doesn't work yet.
(byte-compile-closure-code-p, byte-compile-make-closure)
(byte-compile-closure): New functions.
(byte-compile-check-variable, byte-compile-dynamic-variable-op)
(byte-compile-dynamic-variable-bind)
(byte-compile-lexical-variable-ref, byte-compile-variable-set):
New functions.
(byte-compile-variable-ref): Remove second argument. Now only
handles real variable references (not setting or binding).
(byte-compile-push-unknown-constant)
(byte-compile-resolve-unknown-constant): New functions.
(byte-compile-funarg, byte-compile-funarg-2): Functions removed.
(byte-compile-function-form): Use either `byte-compile-constant'
or `byte-compile-closure'.
(byte-compile-setq): Use `byte-compile-variable-set' instead of
`byte-compile-variable-ref'.
(apply, mapcar, mapatoms, mapconcat, mapc, sort):
`byte-defop-compiler-1's removed.
(byte-compile-while): Make sure lexically-bound variables inside
the loop don't get stored in an environment outside the loop.
(byte-compile-compute-lforminfo): Autoload.
(byte-compile-push-binding-init): New function.
(byte-compile-let, byte-compile-let*): Handle lexical binding.
(byte-compile-defun): Use `byte-compile-closure' to do the work.
(byte-compile-defmacro): Use `byte-compile-make-closure'.
(byte-compile-defvar): Expand the generated call to `push' since
we're past macroexpansion already.
(byte-compile-stack-adjustment): New function.
(byte-compile-out): Make second arg optional. Rewrite for clarity.
(byte-compile-delay-out, byte-compile-delayed-out): New functions.
* emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Don't expand macros here.
* emacs-lisp/macroexp.el (macroexpand-all-1): Expand defmacro forms.
* emacs-lisp/byte-lexbind.el (byte-compile-make-lvarinfo)
(byte-compile-lforminfo-add-var)
(byte-compile-lforminfo-note-closure)
(byte-compile-compute-lforminfo)
(byte-compile-lforminfo-from-lambda)
(byte-compile-lforminfo-analyze)
(byte-compile-heapenv-add-accessible-env)
(byte-compile-heapenv-ensure-access)
(byte-compile-rearrange-let-clauses, byte-compile-bind)
(byte-compile-unbind): Fix a bunch of typos.
2002-06-12 Miles Bader <miles@gnu.org>
* emacs-lisp/byte-lexbind.el, emacs-lisp/macroexp.el: New files.
* subr.el (functionp): Function removed (now a subr).
* help-fns.el (describe-function-1): Handle interpreted closures.
;; arch-tag: bd1b5b8b-fdb2-425d-9ac2-20689fb0ee70