1. 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
      (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
  2. 11 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Use lexical-binding for all of CL, and clean up its namespace. · bb3faf5b
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-lib.el: Use lexical-binding.
      (cl-map-extents, cl-maclisp-member): Remove.
      (cl--set-elt, cl--set-nthcdr, cl--set-buffer-substring)
      (cl--set-substring, cl--block-wrapper, cl--block-throw)
      (cl--compiling-file, cl--mapcar-many, cl--do-subst): Use "cl--" prefix.
      * lisp/emacs-lisp/cl-extra.el: Use lexical-binding.
      (cl--mapcar-many, cl--map-keymap-recursively, cl--map-intervals)
      (cl--map-overlays, cl--set-frame-visible-p, cl--progv-save)
      (cl--progv-before, cl--progv-after, cl--finite-do, cl--set-getf)
      (cl--do-remf, cl--do-prettyprint): Use "cl--" prefix.
      * lisp/emacs-lisp/cl-seq.el: Use lexical-binding.
      (cl--parsing-keywords, cl--check-key, cl--check-test-nokey)
      (cl--check-test, cl--check-match): Use "cl--" prefix and backquotes.
      (cl--alist, cl--sublis-rec, cl--nsublis-rec, cl--tree-equal-rec):
      * lisp/emacs-lisp/cl-macs.el (cl--lambda-list-keywords): Use "cl--" prefix.
      * lisp/edmacro.el (edmacro-mismatch): Simplify to remove dependence on
      CL's internals.
  3. 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-typep) [compiler-macro]: Use macroexp-let².
  4. 07 Jun, 2012 1 commit
    • Stefan Monnier's avatar
      Move old compatiblity to cl.el. Remove cl-macroexpand-all. · 6fa6c4ae
      Stefan Monnier authored
      * emacs-lisp/cl-extra.el (cl-map-keymap, cl-copy-tree)
      (cl-not-hash-table, cl-builtin-gethash, cl-builtin-remhash)
      (cl-builtin-clrhash, cl-builtin-maphash, cl-gethash, cl-puthash)
      (cl-remhash, cl-clrhash, cl-maphash, cl-make-hash-table)
      (cl-hash-table-p, cl-hash-table-count): Move to cl.el.
      (cl-macroexpand-cmacs): Remove var.
      (cl-macroexpand-all, cl-macroexpand-body): Remove funs.
      Use macroexpand-all instead.
      * emacs-lisp/cl-lib.el (cl-macro-environment): Remove decl.
      (cl-macroexpand): Move to cl-macs.el and rename to cl--sm-macroexpand.
      (cl-member): Remove old alias.
      * emacs-lisp/cl-macs.el (cl-macro-environment): Remove var.
      Use macroexpand-all-environment instead.
      (cl--old-macroexpand): New var.
      (cl--sm-macroexpand): New function.
      (cl-symbol-macrolet): Use it during macro expansion.
      (cl--function-convert-cache): New var.
      (cl--function-convert): New function, extracted from
      (cl-lexical-let): Use it.
      * emacs-lisp/cl.el (cl-macroexpand, cl-macro-environment)
      (cl-macroexpand-all, cl-not-hash-table, cl-builtin-gethash)
      (cl-builtin-remhash, cl-builtin-clrhash, cl-builtin-maphash)
      (cl-map-keymap, cl-copy-tree, cl-gethash, cl-puthash, cl-remhash)
      (cl-clrhash, cl-maphash, cl-make-hash-table, cl-hash-table-p)
      (cl-hash-table-count): Add old compatibility aliases.
  5. 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.
  6. 17 May, 2012 1 commit
    • Stefan Monnier's avatar
      Minor renaming of internal CL functions and variables. · 4735906a
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-seq.el (cl--adjoin): Rename from cl-adjoin.
      (cl--position): Rename from cl-position.
      (cl--delete-duplicates): Rename from cl-delete-duplicates.
      * lisp/emacs-lisp/cl.el (cl--gensym-counter): Rename from *gensym-counter*.
      (cl--random-state): Rename from *random-state*.
  7. 16 Apr, 2012 1 commit
  8. 11 Jan, 2012 1 commit
  9. 05 Jan, 2012 1 commit
  10. 27 Oct, 2011 1 commit
    • Glenn Morris's avatar
      Add doc-strings to some cl float parameters. · 416a2c45
      Glenn Morris authored
      * lisp/emacs-lisp/cl-extra.el (cl-float-limits): Add doc string.
      * lisp/emacs-lisp/cl.el (most-positive-float, most-negative-float)
      (least-positive-float, least-negative-float)
      (least-positive-normalized-float, least-negative-normalized-float)
      (float-epsilon, float-negative-epsilon): Add doc-strings,
      based on those in cl.texi.
      * lisp/emacs-lisp/cl-extra.el (most-positive-float, most-negative-float)
      (least-positive-float, least-negative-float)
      (least-positive-normalized-float, least-negative-normalized-float)
      (float-epsilon, float-negative-epsilon):
      Remove unnecessary declarations.
  11. 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-compile-close-variables, displaying-byte-compile-warnings):
      Add edebug spec.
      (byte-compile-toplevel-file-form): New fun, split out of
      (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-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.
      (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.
  12. 21 Feb, 2011 1 commit
  13. 25 Jan, 2011 1 commit
  14. 15 Jan, 2011 1 commit
  15. 02 Jan, 2011 1 commit
  16. 29 Aug, 2010 1 commit
  17. 25 May, 2010 1 commit
    • Stefan Monnier's avatar
      Replace Lisp calls to delete-backward-char by delete-char. · d355a0b7
      Stefan Monnier authored
      * bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el,
      skeleton.el, term.el, time.el, wid-edit.el, woman.el,
      calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el,
      calc/calc.el, emacs-cl-extra.el, emacs-cl-loaddefs.el,
      emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el,
      eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el,
      gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el,
      language/ethio-util.el, mh-e/mh-alias.el, mh-e/mh-search.el,
      net/imap.el, net/rcirc.el, obsolete/complete.el, play/decipher.el,
      progmodes/ada-mode.el, progmodes/cc-awk.el, progmodes/dcl-mode.el,
      progmodes/ps-mode.el, progmodes/verilog-mode.el,
      progmodes/vhdl-mode.el, textmodes/bibtex.el, textmodes/fill.el,
      textmodes/reftex-auc.el, textmodes/rst.el, textmodes/sgml-mode.el,
      textmodes/table.el, textmodes/texinfmt.el: Replace Lisp calls to
      delete-backward-char by calls to delete-char.
  18. 13 Jan, 2010 1 commit
  19. 25 Aug, 2009 1 commit
  20. 05 Jan, 2009 1 commit
  21. 06 May, 2008 1 commit
  22. 07 Jan, 2008 1 commit
  23. 25 Jul, 2007 1 commit
  24. 27 Jun, 2007 1 commit
  25. 21 Jan, 2007 1 commit
  26. 07 Dec, 2006 1 commit
  27. 06 Feb, 2006 1 commit
  28. 19 Dec, 2005 1 commit
  29. 06 Aug, 2005 1 commit
  30. 29 Jul, 2005 1 commit
  31. 04 Jul, 2005 1 commit
  32. 22 May, 2005 1 commit
  33. 16 May, 2005 1 commit
  34. 16 Apr, 2004 1 commit
  35. 08 Sep, 2003 1 commit
  36. 01 Sep, 2003 1 commit
  37. 16 Jun, 2003 1 commit
  38. 04 May, 2003 1 commit
  39. 27 Sep, 2002 1 commit
  40. 08 Jun, 2002 1 commit