1. 16 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      Remove bytecomp- prefix, plus misc changes. · ca105506
      Stefan Monnier authored
      * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Make it work to
      inline lexbind interpreted functions into lexbind code.
      (bytedecomp-bytes): Not a dynamic var any more.
      (disassemble-offset): Get the bytes via an argument instead.
      (byte-decompile-bytecode-1): Use push.
      * lisp/emacs-lisp/bytecomp.el: Remove the bytecomp- prefix now that we use
      lexical-binding.
      (byte-compile-outbuffer): Rename from bytecomp-outbuffer.
      * lisp/emacs-lisp/cl-macs.el (load-time-value):
      * lisp/emacs-lisp/cl.el (cl-compiling-file): Adjust to new name.
      * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
      Add byte-code-function-p.
      (pcase--u1): Remove left-over code from early development.
      Fix case of variable shadowing in guards and predicates.
      (pcase--u1): Add a new `let' pattern.
      * src/image.c (parse_image_spec): Use Ffunctionp.
      * src/lisp.h: Declare Ffunctionp.
      ca105506
  2. 15 Mar, 2011 1 commit
  3. 13 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      * src/eval.c (Ffunction): Use simpler format for closures. · 23aba0ea
      Stefan Monnier authored
      (Fcommandp, funcall_lambda):
      * src/doc.c (Fdocumentation, store_function_docstring):
      * src/data.c (Finteractive_form):
      * lisp/help-fns.el (help-function-arglist):
      * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
      * lisp/subr.el (apply-partially): Adjust to new closure format.
      * lisp/emacs-lisp/disass.el (disassemble-internal): Catch closures.
      23aba0ea
  4. 12 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      Try and fix w32 build; misc cleanup. · 2ec42da9
      Stefan Monnier authored
      * lisp/subr.el (apply-partially): Move from subr.el; don't use lexical-let.
      (eval-after-load): Obey lexical-binding.
      * lisp/simple.el (apply-partially): Move to subr.el.
      * lisp/makefile.w32-in: Match changes in Makefile.in.
      (BIG_STACK_DEPTH, BIG_STACK_OPTS, BYTE_COMPILE_FLAGS): New vars.
      (.el.elc, compile-CMD, compile-SH, compile-always-CMD)
      (compile-always-SH, compile-calc-CMD, compile-calc-SH): Use them.
      (COMPILE_FIRST): Add pcase, macroexp, and cconv.
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Silence warning about
      calling CL's `compiler-macroexpand'.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-preprocess): New function.
      (byte-compile-initial-macro-environment)
      (byte-compile-toplevel-file-form, byte-compile, byte-compile-sexp): Use it.
      (byte-compile-eval, byte-compile-eval-before-compile): Obey lexical-binding.
      (byte-compile--for-effect): Rename from `for-effect'.
      (display-call-tree): Use case.
      * lisp/emacs-lisp/byte-opt.el (for-effect): Don't declare as dynamic.
      (byte-optimize-form-code-walker, byte-optimize-form):
      Revert to old arg name.
      * lisp/Makefile.in (BYTE_COMPILE_FLAGS): New var.
      (compile-onefile, .el.elc, compile-calc, recompile): Use it.
      2ec42da9
  5. 11 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      Misc fixes, and use lexical-binding in more files. · ba83908c
      Stefan Monnier authored
      * lisp/subr.el (letrec): New macro.
      (with-wrapper-hook): Move from lisp/simple.el and don't use CL.
      * simple.el (with-wrapper-hook): Move with-wrapper-hook to subr.el.
      * lisp/help-fns.el (help-function-arglist): Handle subroutines as well.
      (describe-variable): Use special-variable-p to filter completions.
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Don't expand `declare'
      in defmacros.
      * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form):
      Handle `declare'.
      * lisp/emacs-lisp/cl.el (pushnew): Silence unfixable warning.
      * lisp/emacs-lisp/cl-macs.el (defstruct, define-compiler-macro):
      Mark unused arg as unused.
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Use memq.
      * lisp/emacs-lisp/autoload.el (make-autoload): Don't assume the macro's
      first sexp is a list.
      (autoload-generate-file-autoloads): Improve error message.
      * lisp/emacs-lisp/advice.el (ad-arglist): Use help-function-arglist
      to understand the new byte-code arg format.
      * lisp/vc/smerge-mode.el:
      * lisp/vc/log-view.el:
      * lisp/vc/log-edit.el:
      * lisp/vc/cvs-status.el:
      * lisp/uniquify.el:
      * lisp/textmodes/css-mode.el:
      * lisp/textmodes/bibtex-style.el:
      * lisp/reveal.el:
      * lisp/newcomment.el:
      * lisp/emacs-lisp/smie.el:
      * lisp/abbrev.el: Use lexical-binding.
      * src/eval.c (Fprog1, Fprog2): Simplify and use XCDR/XCAR.
      (Fdefvar): Remove redundant SYMBOLP check.
      (Ffunctionp): Don't signal an error for undefined aliases.
      * doc/lispref/variables.texi (Converting to Lexical Binding): New node.
      ba83908c
  6. 10 Mar, 2011 3 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/bytecomp.el: Use lexical-binding. · 9ace101c
      Stefan Monnier authored
      (byte-recompile-directory): Remove unused var `bytecomp-dest'.
      (byte-recompile-file): Use derived-mode-p.
      (byte-compile-from-buffer): Remove arg `bytecomp-filename'.
      Use byte-compile-current-file instead.
      (byte-compile-file): Adjust call accordingly.
      (bytecomp-outbuffer): Move declaration before first use.
      (for-effect): Declare dynamic.
      (byte-compile-file-form-defmumble): Use byte-compile-current-file.
      (byte-compile-top-level, byte-compile-out-toplevel, byte-compile-form):
      Move dyn-binding of for-effect from function argument to let binding.
      (byte-compile-out-toplevel): Don't both passing for-effect to
      byte-optimize-lapcode.
      (byte-compile-top-level-body, byte-compile-body):
      Rename for-effect -> for-effect-arg so it's lexical.
      * lisp/subr.el (functionp): Remove, now that it's in src/eval.c.
      9ace101c
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/byte-opt.el: Use lexical binding. · bba752f8
      Stefan Monnier authored
      (for-effectm byte-compile-tag-number): Declare dynamic.
      (byte-optimize-form-code-walker, byte-optimize-form): Move dynamic
      binding of for-effect from function argument to let binding.
      (byte-decompile-bytecode-1): Move dynamic binding of bytedecomp-bytes
      from function argument to let binding.
      bba752f8
    • Stefan Monnier's avatar
      Rewrite the cconv conversion algorithm, for clarity. · 6c075cd7
      Stefan Monnier authored
      * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Adjust check for
      new byte-code representation.
      * lisp/emacs-lisp/cconv.el (cconv--convert-function): Rename from
      cconv-closure-convert-function.
      (cconv-convert): Rename from cconv-closure-convert-rec.
      (cconv--analyse-use): Rename from cconv-analyse-use.
      (cconv--analyse-function): Rename from cconv-analyse-function.
      (cconv--analyse-use): Change some patterns to silence compiler.
      (cconv-convert, cconv--convert-function): Rewrite.
      * test/automated/lexbind-tests.el: New file.
      6c075cd7
  7. 06 Mar, 2011 32 commits