1. 20 Sep, 2012 1 commit
  2. 19 Sep, 2012 2 commits
  3. 04 Sep, 2012 1 commit
    • Stefan Monnier's avatar
      Macro-expand interpreted code during load. · 972debf2
      Stefan Monnier authored
      * src/lread.c (readevalloop): Call internal-macroexpand-for-load to perform
      eager (load-time) macro-expansion.
      * src/lisp.mk (lisp): Add macroexp.
      * lisp/loadup.el: Load macroexp.  Remove hack.
      * lisp/emacs-lisp/macroexp.el (macroexp--eval-if-compile): New function.
      (macroexp--expand-all): Use it to get better warnings.
      (macroexp--backtrace, macroexp--trim-backtrace-frame)
      (internal-macroexpand-for-load): New functions.
      (macroexp--pending-eager-loads): New var.
      (emacs-startup-hook): New hack to replace one in loadup.el.
      * lisp/emacs-lisp/cl-macs.el (cl--compiler-macro-list*)
      (cl--compiler-macro-cXXr): Move to top, before they can be used.
      (cl-psetf): Simplify.
      (cl-defstruct): Add indent rule.
      972debf2
  4. 26 Jul, 2012 1 commit
    • Stefan Monnier's avatar
      Autoload more carefully from Lisp. Follow aliases for function properties. · 7abaf5cc
      Stefan Monnier authored
      * lisp/subr.el (autoloadp): New function.
      (symbol-file): Use it.
      (function-get): New function.
      * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Use function-get and
      autoload-do-load.
      * lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-syntactic-face-function)
      (lisp-indent-function):
      * lisp/emacs-lisp/gv.el (gv-get):
      * lisp/emacs-lisp/edebug.el (get-edebug-spec, edebug-basic-spec):
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-form):
      * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
      * lisp/emacs-lisp/autoload.el (make-autoload, autoload-print-form):
      Use function-get.
      * lisp/emacs-lisp/cl.el: Don't propagate function properties any more.
      
      * src/eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
      add argument, tune behavior, and adjust all callers.
      
      * lisp/speedbar.el (speedbar-add-localized-speedbar-support):
      * lisp/emacs-lisp/disass.el (disassemble-internal):
      * lisp/desktop.el (desktop-load-file):
      * lisp/help-fns.el (help-function-arglist, find-lisp-object-file-name)
      (describe-function-1):
      * lisp/emacs-lisp/find-func.el (find-function-noselect):
      * lisp/emacs-lisp/elp.el (elp-instrument-function):
      * lisp/emacs-lisp/advice.el (ad-has-proper-definition):
      * lisp/apropos.el (apropos-safe-documentation, apropos-macrop):
      * lisp/emacs-lisp/debug.el (debug-on-entry):
      * lisp/emacs-lisp/cl-macs.el (cl-compiler-macroexpand):
      * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
      * lisp/calc/calc.el (name): Use autoloadp & autoload-do-load.
      7abaf5cc
  5. 17 Jul, 2012 1 commit
    • Stefan Monnier's avatar
      Misc minor changes. · f5695c9a
      Stefan Monnier authored
      * lisp/xt-mouse.el (xterm-mouse-translate-1, xterm-mouse-event-read):
      Use read-event since we don't really want to read chars but bytes.
      * lisp/emacs-lisp/macroexp.el (macroexp-let2): Use more informative names
      for uninterned vars.
      f5695c9a
  6. 23 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Miscellaneous minor cleanups and simplifications. · dc5d230c
      Stefan Monnier authored
      * lisp/help-fns.el (describe-variable): Don't croak when doc is not found.
      * lisp/vc/pcvs.el (cvs-retrieve-revision): Avoid toggle-read-only.
      * lisp/menu-bar.el (menu-bar-line-wrapping-menu): Purecopy a tiny bit more.
      * lisp/emacs-lisp/syntax.el (syntax-ppss): Simplify with new `if' place.
      * lisp/emacs-lisp/smie.el (smie-next-sexp): CSE.
      * lisp/emacs-lisp/macroexp.el (macroexp-let2): Fix edebug spec and avoid
      ((lambda ..) ..).
      * lisp/emacs-lisp/eieio.el (eieio-oref, slot-value): Use simpler defsetf.
      dc5d230c
  7. 22 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Provide generalized variables in core Elisp. · 2ee3d7f0
      Stefan Monnier authored
      * lisp/emacs-lisp/gv.el: New file.
      * lisp/subr.el (push, pop): Extend to generalized variables.
      * lisp/loadup.el (macroexp): Unload if preloaded and uncompiled.
      * lisp/emacs-lisp/cl-lib.el (cl-pop, cl-push, cl--set-nthcdr): Remove.
      * lisp/emacs-lisp/cl-macs.el: Require gv.  Use gv-define-setter,
      gv-define-simple-setter, and gv-define-expander.
      Remove setf-methods defined in gv.  Rename cl-setf -> setf.
      (cl-setf, cl-do-pop, cl-get-setf-method): Remove.
      (cl-letf, cl-letf*, cl-define-modify-macro, cl-defsetf)
      (cl-define-setf-expander, cl-struct-setf-expander): Move to cl.el.
      (cl-remf, cl-shiftf, cl-rotatef, cl-callf, cl-callf2): Rewrite with
      gv-letplace.
      (cl-defstruct): Don't define setf-method any more.
      * lisp/emacs-lisp/cl.el (flet): Don't autoload.
      (cl--letf, letf, cl--letf*, letf*, cl--gv-adapt)
      (define-setf-expander, defsetf, define-modify-macro)
      (cl-struct-setf-expander): Move from cl-lib.el.
      * lisp/emacs-lisp/syntax.el:
      * lisp/emacs-lisp/ewoc.el:
      * lisp/emacs-lisp/smie.el:
      * lisp/emacs-lisp/cconv.el:
      * lisp/emacs-lisp/timer.el: Rename cl-setf -> setf, cl-push -> push.
      (timer--time): Use gv-define-simple-setter.
      * lisp/emacs-lisp/macroexp.el (macroexp-let2): Rename from macroexp-let²
      to avoid coding-system problems in subr.el.  Adjust all users.
      (macroexp--maxsize, macroexp-small-p): New functions.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't use cl-letf.
      * lisp/scroll-bar.el (scroll-bar-mode):
      * lisp/simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode)
      (normal-erase-is-backspace-mode): Don't use the `eq' place.
      * lisp/winner.el (winner-configuration, winner-make-point-alist)
      (winner-set-conf, winner-get-point, winner-set): Don't abuse letf.
      * lisp/files.el (locate-file-completion-table): Avoid list*.
      
      Fixes: debbugs:11657
      2ee3d7f0
  8. 15 Jun, 2012 2 commits
  9. 09 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Don't autoload functions too eagerly during macroexpansion. · d9857e53
      Stefan Monnier authored
      * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Only autoload
      a function if there's a clear indication that it has a compiler-macro.
      * lisp/emacs-lisp/byte-run.el (defun-declarations-alist, defmacro, defun)
      (macro-declarations-alist): Add arglist to declaration functions.
      (defun-declarations-alist): Add `obsolete' and `compiler-macro'.
      * lisp/emacs-lisp/cl-seq.el (cl-member, cl-assoc):
      * lisp/emacs-lisp/cl-lib.el (cl-list*, cl-adjoin):
      * lisp/emacs-lisp/cl-extra.el (cl-get): Use the new `declare' statement.
      Also add autoload to find the compiler macro.
      * lisp/emacs-lisp/cl-macs.el (eql) [compiler-macro]: Remove.
      (cl--compiler-macro-member, cl--compiler-macro-assoc)
      (cl--compiler-macro-adjoin, cl--compiler-macro-list*)
      (cl--compiler-macro-get): New functions, replacing calls to
      cl-define-compiler-macro.
      (cl-typep) [compiler-macro]: Use macroexp-let².
      d9857e53
  10. 08 Jun, 2012 2 commits
    • Stefan Monnier's avatar
      Clean up scoping rule of predefined single-word vars. · 513749ee
      Stefan Monnier authored
      * lisp/startup.el (argv, argi): Make lexically scoped.
      * lisp/emacs-lisp/float-sup.el (pi): Use internal-make-var-non-special.
      * lisp/emacs-lisp/cl-macs.el: Use lexical-binding.
      Rename cl-bind-* to cl--bind-*.
      * lisp/files.el: Don't require `cl' since it doesn't use it.
      * lisp/emacs-lisp/pcase.el, lisp/emacs-lisp/macroexp.el: Add coding cookie.
      * src/eval.c (Fmake_var_non_special): New primitive.
      (syms_of_eval): Defsubr it.
      * src/lread.c (syms_of_lread): Mark `values' as lexically scoped.
      513749ee
    • Stefan Monnier's avatar
      Get rid of cl-lexical-let, keeping only lexical-let for compatibility. · de7e2b36
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-macs.el: Provide itself.
      (cl--labels-convert-cache): New var.
      (cl--labels-convert): New function.
      (cl-flet, cl-labels): New implementation with new semantics, relying on
      lexical-binding.
      * lisp/emacs-lisp/cl.el: Mark compatibility aliases as obsolete.
      (cl-closure-vars, cl--function-convert-cache)
      (cl--function-convert): Move from cl-macs.el.
      (lexical-let, lexical-let*, flet, labels): Move from cl-macs.el and
      rename by removing the "cl-" prefix.
      * lisp/emacs-lisp/macroexp.el (macroexp-unprogn): New function.
      de7e2b36
  11. 07 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Cleanup cl-macs namespace. Add macro helpers in macroexp.el. · 4dd1c416
      Stefan Monnier authored
      * emacs-lisp/macroexp.el (macroexp-progn, macroexp-let*, macroexp-if)
      (macroexp-let², macroexp--const-symbol-p, macroexp-const-p)
      (macroexp-copyable-p): New functions and macros.
      * emacs-lisp/edebug.el (edebug-unwrap):
      * emacs-lisp/disass.el (disassemble-internal): Use macroexp-progn.
      * emacs-lisp/pcase.el: Use macroexp-let*, macroexp-if, ...
      (pcase--let*): Remove.
      * emacs-lisp/bytecomp.el (byte-compile-const-symbol-p)
      (byte-compile-constp): Remove.  Use macroexp--const-symbol-p and
      macroexp-const-p instead.
      * emacs-lisp/byte-opt.el: Use macroexp-const-p and macroexp-progn.
      
      * emacs-lisp/cl-macs.el: Clean up the name space by using "cl--"
      instead of "cl-" for internal definitions.  Use macroexp-const-p.
      (cl-old-bc-file-form): Remove var.
      (cl-const-exprs-p): Remove fun.
      (cl-labels, cl-macrolet): Use backquote.
      (cl-lexical-let): Use cl-symbol-macrolet.  Don't use cl-defun-expander.
      (cl-defun-expander, cl-byte-compile-compiler-macro): Remove fun.
      (cl-define-setf-expander): Rename from cl-define-setf-method.
      * emacs-lisp/cl.el: Adjust alias for define-setf-method.
      
      * international/mule-cmds.el: Don't require CL.
      (view-hello-file): Don't use `letf'.
      4dd1c416
  12. 06 Jun, 2012 2 commits
  13. 05 Jun, 2012 2 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Tolerate errors during · 53aacf21
      Stefan Monnier authored
      compiler-macro expansion.
      53aacf21
    • Stefan Monnier's avatar
      Add native compiler-macro support. · 57a7d507
      Stefan Monnier authored
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1):
      Support compiler-macros directly.  Properly follow aliases and apply
      the compiler macros more thoroughly.
      * lisp/emacs-lisp/cl.el: Don't copy compiler-macro properties any more since
      macroexpand now properly follows aliases.
      * lisp/emacs-lisp/cl-macs.el (toplevel, cl-define-compiler-macro)
      (cl-compiler-macroexpand): Use new prop.
      * lisp/emacs-lisp/byte-opt.el (featurep): Optimize earlier.
      * lisp/emacs-lisp/cl-lib.el (custom-print-functions): Add compatibility alias.
      57a7d507
  14. 04 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/cl-lib.el: Rename from cl.el. · 7c1898a7
      Stefan Monnier authored
      * lisp/emacs-lisp/cl.el: New compatibility file.
      * emacs-lisp/cl-lib.el, lisp/emacs-lisp/cl-seq.el, lisp/emacs-lisp/cl-macs.el:
      * lisp/emacs-lisp/cl-extra.el: Rename all top-level functions and variables
      to obey the "cl-" prefix.
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Adjust to new name.
      7c1898a7
  15. 30 May, 2012 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/byte-run.el (defmacro, defun): Move from C. · 61b108cc
      Stefan Monnier authored
      (macro-declaration-function): Move var from C code.
      (macro-declaration-function): Define function with defalias.
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1):
      * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form):
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't handle
      defun/defmacro any more.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature):
      Provide fallback for unknown arglist.
      (byte-compile-arglist-warn): Change calling convention.
      (byte-compile-output-file-form): Move print-vars binding.
      (byte-compile-output-docform): Simplify accordingly.
      (byte-compile-file-form-defun, byte-compile-file-form-defmacro)
      (byte-compile-defmacro-declaration): Remove.
      (byte-compile-file-form-defmumble): Generalize to defalias.
      (byte-compile-output-as-comment): Return byte-positions.
      Simplify callers accordingly.
      (byte-compile-lambda): Use `assert'.
      (byte-compile-defun, byte-compile-defmacro): Remove.
      (byte-compile-file-form-defalias):
      Use byte-compile-file-form-defmumble.
      (byte-compile-defalias-warn): Remove.
      * src/eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
      Move to byte-run.el.
      (Fautoload): Do the hash-doc more carefully.
      * src/data.c (Fdefalias): Purify definition, except for keymaps.
      (Qdefun): Move from eval.c.
      * src/lisp.h (Qdefun): Remove.
      * src/lread.c (read1): Tiny simplification.
      * lib-src/make-docfile.c: Improve comment style.
      (search_lisp_doc_at_eol): New function.
      (scan_lisp_file): Use it.
      61b108cc
  16. 11 Jan, 2012 1 commit
  17. 05 Jan, 2012 1 commit
  18. 22 May, 2011 1 commit
  19. 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
  20. 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
  21. 06 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      Fix pcase memoizing; change lexbound byte-code marker. · e2abe5a1
      Stefan Monnier authored
      * src/bytecode.c (exec_byte_code): Remove old lexical binding slot handling
      and replace it with the a integer args-desc handling.
      * eval.c (funcall_lambda): Adjust arglist test accordingly.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature):
      Handle integer arglist descriptor.
      (byte-compile-make-args-desc): Make integer arglist descriptor.
      (byte-compile-lambda): Use integer arglist descriptor to mark lexical
      byte-coded functions instead of an extra slot.
      * lisp/help-fns.el (help-add-fundoc-usage): Don't add a dummy doc.
      (help-split-fundoc): Return a nil doc if there was no actual doc.
      (help-function-arglist): Generate an arglist from an integer arg-desc.
      * lisp/emacs-lisp/pcase.el (pcase--memoize): Rename from pcase-memoize;
      Make only the key weak.
      (pcase): Change the key used in the memoization table, so it does not
      always get GC'd away.
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Slight change to the
      pcase pattern to generate slightly better code.
      e2abe5a1
  22. 26 Feb, 2011 1 commit
    • Stefan Monnier's avatar
      Compute freevars in cconv-analyse. · a9de04fa
      Stefan Monnier authored
      * lisp/emacs-lisp/cconv.el: Compute freevars in cconv-analyse.
      (cconv-mutated, cconv-captured): Remove.
      (cconv-captured+mutated, cconv-lambda-candidates): Don't give them
      a global value.
      (cconv-freevars-alist): New var.
      (cconv-freevars): Remove.
      (cconv--lookup-let): Remove.
      (cconv-closure-convert-function): Extract from cconv-closure-convert-rec.
      (cconv-closure-convert-rec): Adjust to above changes.
      (fboundp): New function.
      (cconv-analyse-function, form): Rewrite.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
      Handle declare-function here.
      (byte-compile-obsolete): Remove.
      (byte-compile-arglist-warn): Check late defsubst here.
      (byte-compile-file-form): Simplify.
      (byte-compile-file-form-defsubst): Remove.
      (byte-compile-macroexpand-declare-function): Rename from
      byte-compile-declare-function, turn it into a macro-expander.
      (byte-compile-normal-call): Check obsolescence.
      (byte-compile-quote-form): Remove.
      (byte-compile-defmacro): Revert to trunk's definition which seems to
      work just as well and handles `declare'.
      * lisp/emacs-lisp/byte-run.el (make-obsolete): Don't modify byte-compile.
      * lisp/Makefile.in (BIG_STACK_DEPTH): Increase to 1200.
      (compile-onefile): Pass $(BIG_STACK_OPTS) before "-l bytecomp".
      * lisp/emacs-lisp/macroexp.el: Use lexbind.
      (macroexpand-all-1): Check macro obsolescence.
      * lisp/vc/diff-mode.el: Use lexbind.
      * lisp/follow.el (follow-calc-win-end): Simplify.
      a9de04fa
  23. 25 Feb, 2011 1 commit
    • Stefan Monnier's avatar
      Get rid of funvec. · 876c194c
      Stefan Monnier authored
      * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): Handle new form of
      `byte-constant'.
      (byte-compile-close-variables, displaying-byte-compile-warnings):
      Add edebug spec.
      (byte-compile-toplevel-file-form): New fun, split out of
      byte-compile-file-form.
      (byte-compile-from-buffer): Use it to avoid applying cconv
      multiple times.
      (byte-compile): Only strip `function' if it's present.
      (byte-compile-lambda): Add `reserved-csts' argument.
      Use new lexenv arg of byte-compile-top-level.
      (byte-compile-reserved-constants): New var.
      (byte-compile-constants-vector): Obey it.
      (byte-compile-constants-vector): Handle new `byte-constant' form.
      (byte-compile-top-level): Add args `lexenv' and `reserved-csts'.
      (byte-compile-form): Don't check callargs here.
      (byte-compile-normal-call): Do it here instead.
      (byte-compile-push-unknown-constant)
      (byte-compile-resolve-unknown-constant): Remove, unused.
      (byte-compile-make-closure): Use `make-byte-code' rather than `curry',
      putting the environment into the "constant" pool.
      (byte-compile-get-closed-var): Use special byte-constant.
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Handle new
      intermediate special form `internal-make-vector'.
      (byte-optimize-lapcode): Handle new form of `byte-constant'.
      * lisp/help-fns.el (describe-function-1): Don't handle funvecs.
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Only convert quote to
      function if the content is a lambda expression, not if it's a closure.
      * emacs-lisp/eieio-come.el: Remove.
      * lisp/emacs-lisp/eieio.el: Don't require eieio-comp.
      (defmethod): Do a bit more work to find the body and wrap it into
      a function before passing it to eieio-defmethod.
      (eieio-defmethod): New arg `code' for it.
      * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Don't hide things in
      debugger backtrace.
      * lisp/emacs-lisp/cl-extra.el (cl-macroexpand-all): Use backquotes, and be
      more careful when quoting a function value.
      * lisp/emacs-lisp/cconv.el (cconv-freevars): Accept defvar/defconst.
      (cconv-closure-convert-rec): Catch stray `internal-make-closure'.
      * lisp/Makefile.in (COMPILE_FIRST): Compile pcase and cconv early.
      
      * src/eval.c (Qcurry): Remove.
      (funcall_funvec): Remove.
      (funcall_lambda): Move new byte-code handling to reduce impact.
      Treat all args as lexical in the case of lexbind.
      (Fcurry): Remove.
      * src/data.c (Qfunction_vector): Remove.
      (Ffunvecp): Remove.
      * src/lread.c (read1): Revert to calling make_byte_code here.
      (read_vector): Don't call make_byte_code any more.
      * src/lisp.h (enum pvec_type): Rename back to PVEC_COMPILED.
      (XSETCOMPILED): Rename back from XSETFUNVEC.
      (FUNVEC_SIZE): Remove.
      (FUNVEC_COMPILED_TAG_P, FUNVEC_COMPILED_P): Remove.
      (COMPILEDP): Rename back from FUNVECP.
      * src/fns.c (Felt): Remove unexplained FUNVEC check.
      * src/doc.c (Fdocumentation): Don't handle funvec.
      * src/alloc.c (make_funvec, Ffunvec): Remove.
      * doc/lispref/vol2.texi (Top):
      * doc/lispref/vol1.texi (Top):
      * doc/lispref/objects.texi (Programming Types, Funvec Type, Type Predicates):
      * doc/lispref/functions.texi (Functions, What Is a Function, FunctionCurrying):
      * doc/lispref/elisp.texi (Top): Remove mentions of funvec and curry.
      876c194c
  24. 11 Feb, 2011 1 commit
    • Stefan Monnier's avatar
      Make cconv-analyse understand the need for closures. · 43e67019
      Stefan Monnier authored
      * lisp/emacs-lisp/byte-lexbind.el (byte-compile-lforminfo-analyze):
      Understand the :fun-body case for catch, save-window-excursion, and
      condition-case.
      (byte-compile-maybe-push-heap-environment): No need when nclosures is
      zero and byte-compile-current-num-closures is -1.
      
      * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Fix `fun' that was not
      renamed to `bytecomp-fun'.
      
      * lisp/emacs-lisp/cconv.el (cconv-not-lexical-var-p): New function.
      (cconv-freevars): Use it.
      (cconv-closure-convert-rec): Avoid `position'.
      (cconv-analyse-function): New function.
      (cconv-analyse-form): Use it.  `inclosure' can't be nil any more.
      Check lexical vars at let-binding time rather than when referenced.
      For defuns to be in an empty environment and lambdas to take lexical args.
      Pay attention to the need to build closures in catch, unwind-protect,
      save-window-excursion, condition-case, and track-mouse.
      Fix defconst/defvar handling.
      43e67019
  25. 25 Jan, 2011 1 commit
  26. 15 Jan, 2011 1 commit
  27. 02 Jan, 2011 1 commit
  28. 28 Aug, 2010 1 commit
  29. 17 Jun, 2010 1 commit
  30. 16 Jun, 2010 1 commit
  31. 13 Jan, 2010 1 commit
  32. 05 Jan, 2009 1 commit
  33. 06 May, 2008 1 commit
  34. 10 Apr, 2008 1 commit
  35. 07 Jan, 2008 1 commit