1. 20 May, 2015 1 commit
    • Paul Eggert's avatar
      Don't require help-fns when not needed · 00ec2dd7
      Paul Eggert authored
      * lisp/emacs-lisp/autoload.el, lisp/emacs-lisp/advice.el:
      * lisp/emacs-lisp/elint.el:
      Don't require help-fns at the top level.
      * lisp/emacs-lisp/advice.el (ad-arglist):
      * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
      Don't require help-fns.  (Bug#17001)
      00ec2dd7
  2. 13 Apr, 2015 1 commit
  3. 12 Apr, 2015 1 commit
    • Johan Bockgård's avatar
      Support debug declarations in pcase macros · 2e47de36
      Johan Bockgård authored
      * lisp/emacs-lisp/pcase.el (pcase-MACRO): New edebug spec.
      (pcase-UPAT): Use it.  Remove "`".
      (pcase--edebug-match-macro): New function.
      (pcase-defmacro): Support debug declarations.
      
      * lisp/emacs-lisp/cl-macs.el (cl-struct) <pcase-defmacro>:
      * lisp/emacs-lisp/eieio.el (eieio) <pcase-defmacro>:
      * lisp/emacs-lisp/pcase.el (\`): <pcase-defmacro>: Add debug declaration.
      2e47de36
  4. 10 Apr, 2015 1 commit
  5. 05 Apr, 2015 1 commit
    • Alan Mackenzie's avatar
      Rationalize use of c[ad]+r, expunging cl-c[ad]\{3,4\}r. · 2056db3f
      Alan Mackenzie authored
      Also expunge eudc-c[ad]+r.
      
      * subr.el (internal--compiler-macro-cXXr): "New" function, copied
      from cl--compiler-macro-cXXr.
      (caar, cadr, cdar, cddr): Change from defsubsts to defuns with
      the above compiler-macro.
      
      * net/eudc.el (eudc-cadr, eudc-cdar, eudc-caar, eudc-cdaar): Remove.
      
      * emacs-lisp/cl.el (Top level dolist doing defaliases): Remove
      caaar, etc., from list of new alias functions.
      
      * emacs-lisp/cl-lib.el (cl-caaar, etc): Rename to caaar, etc.
      (gen-cXXr--rawname, gen-cXXr-all-cl-aliases): New function/macro
      which generate obsolete cl- aliases for caaar, etc.  Invoke them.
      
      * desktop.el:
      * edmacro.el:
      * emacs-lisp/cl-macs.el:
      * frameset.el:
      * ibuffer.el:
      * mail/footnote.el:
      * net/dbus.el:
      * net/eudc-export.el:
      * net/eudc.el:
      * net/eudcb-ph.el:
      * net/rcirc.el:
      * net/secrets.el:
      * play/5x5.el:
      * play/decipher.el:
      * play/hanoi.el:
      * progmodes/hideif.el:
      * ses.el: Replace cl-caaar, eudc-cadr, etc. with caaar and cadr, etc.
      2056db3f
  6. 26 Mar, 2015 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/cl|eieio: Minor tweaks · 8fd527eb
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-macs.el (cl-dolist, cl-dotimes): Silence byte-compiler.
      
      * lisp/emacs-lisp/eieio.el (defclass): Change internal name so as to make
      sure only EIEIO files should have "eieio--" prefixes in their .elc.
      8fd527eb
  7. 24 Mar, 2015 1 commit
    • Stefan Monnier's avatar
      Add cl-struct specific optimizations to pcase. · d7d72624
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-macs.el (cl--struct-all-parents)
      (cl--pcase-mutually-exclusive-p): New functions.
      (pcase--mutually-exclusive-p): Advise to optimize cl-struct patterns.
      
      * lisp/emacs-lisp/pcase.el (pcase--split-pred): Handle quoted string.
      d7d72624
  8. 23 Mar, 2015 1 commit
    • Stefan Monnier's avatar
      Add new `cl-struct' and `eieio' pcase patterns. · ae277259
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-macs.el (cl-struct): New pcase pattern.
      * lisp/emacs-lisp/eieio.el (eieio-pcase-slot-index-table)
      (eieio-pcase-slot-index-from-index-table): New functions.
      (eieio): New pcase pattern.
      * lisp/emacs-lisp/pcase.el (pcase--make-docstring): New function.
      (pcase): Use it to build the docstring.
      (pcase-defmacro): Make sure the macro is lazy-loaded.
      (\`): Move its docstring from `pcase'.
      ae277259
  9. 20 Mar, 2015 1 commit
  10. 18 Mar, 2015 1 commit
    • Stefan Monnier's avatar
      Add classes as run-time descriptors of cl-structs. · 872481d9
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-preloaded.el (cl--struct-get-class): New function.
      (cl--make-slot-desc): New constructor.
      (cl--plist-remove, cl--struct-register-child): New functions.
      (cl-struct-define): Rewrite.
      (cl-structure-class, cl-structure-object, cl-slot-descriptor)
      (cl--class): New structs.
      (cl--struct-default-parent): Initialize it here.
      * lisp/emacs-lisp/cl-macs.el (cl--find-class): New macro.
      (cl-defsubst, cl--defsubst-expand, cl--sublis): Move before first use.
      (cl--struct-default-parent): New var.
      (cl-defstruct): Adjust to new representation of classes; add
      default parent.  In accessors, signal `wrong-type-argument' rather than
      a generic error.
      (cl-struct-sequence-type, cl-struct-slot-info)
      (cl-struct-slot-offset): Rewrite.
      * lisp/emacs-lisp/cl-generic.el (cl--generic-struct-specializers)
      (cl-generic-generalizers): Rewrite.
      * src/alloc.c (purecopy): Handle hash-tables.
      
      * lisp/emacs-lisp/debug.el (debug--implement-debug-on-entry):
      Bind inhibit-debug-on-entry here...
      (debug): Instead of here.
      
      * lisp/emacs-lisp/macroexp.el (macroexp--debug-eager): New var.
      (internal-macroexpand-for-load): Use it.
      
      * lwlib/xlwmenu.c (pop_up_menu): Remove debugging code.
      872481d9
  11. 17 Mar, 2015 1 commit
    • Stefan Monnier's avatar
      * cl-macs.el (cl--transform-lambda): Refine last change. · 6f73c465
      Stefan Monnier authored
      Fixes: debbugs:20125
      
      * test/automated/cl-lib-tests.el: Use lexical-binding.
      (cl-lib-arglist-performance): Refine test to the case where one of the
      fields has a non-nil default value.  Use existing `mystruct' defstruct.
      (cl-lib-struct-accessors): Use `pcase' to be a bit more flexible in the
      accepted outputs.
      6f73c465
  12. 16 Mar, 2015 1 commit
  13. 03 Mar, 2015 1 commit
  14. 23 Feb, 2015 1 commit
  15. 19 Feb, 2015 1 commit
  16. 16 Feb, 2015 1 commit
  17. 14 Feb, 2015 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/cl*.el: Use define-inline and move some code · 61b4c22c
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-lib.el: Move autoloaded code to cl-preload.
      
      * lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Register as children
      of the parent.
      (cl--assertion-failed): New function.
      (cl-assertion-failed): Move in from cl-lib.el.
      
      * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't generate code to register
      as children of its parents.
      (cl--make-type-test, cl--compiler-macro-typep): Remove functions.
      (cl-typep): Reimplement using define-inline.
      (cl-assert): Use cl--assertion-failed.
      (cl-struct-slot-value): Use define-inline.
      61b4c22c
  18. 28 Jan, 2015 1 commit
    • Stefan Monnier's avatar
      Tighten up the tagcode used for eieio and cl-struct objects · 2668ac1a
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal): Set the function
      slot of the tag symbol to :quick-object-witness-check.
      (eieio-object-p): Use :quick-object-witness-check.
      (eieio--generic-tagcode): Use cl--generic-struct-tag.
      * lisp/emacs-lisp/cl-preloaded.el: New file.
      * lisp/emacs-lisp/cl-macs.el (cl--bind-inits): Remove, unused.
      (cl--transform-lambda, cl-destructuring-bind): Remove cl--bind-inits.
      (cl--make-usage-args): Strip away &aux args.
      (cl-case, cl-typecase, cl--parse-loop-clause): Use macroexp-let2.
      (cl-the, cl-check-type): Use macroexp-let2 and cl-typep.
      (cl-defstruct): Use `declare' and cl-struct-define.
      * lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): New function.
      (cl--generic-struct-tagcode): Use it to tighten the tagcode.
      * lisp/loadup.el: Load cl-preloaded.
      * src/lisp.mk (lisp): Add cl-preloaded.
      2668ac1a
  19. 16 Jan, 2015 1 commit
  20. 14 Jan, 2015 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/cl-generic.el: New file. · 9def17e9
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-macs.el (cl-flet): Allow (FUN EXP) forms.
      (cl-load-time-value, cl-labels): Use closures rather than
      backquoted lambdas.
      (cl-macrolet): Use `eval' to create the function value, and support CL
      style arguments in for the defined macros.
      * test/automated/cl-generic-tests.el: New file.
      9def17e9
  21. 01 Jan, 2015 2 commits
  22. 24 Nov, 2014 1 commit
    • Leo Liu's avatar
      New macro macroexp-let2* · 6dbaf047
      Leo Liu authored
      * emacs-lisp/macroexp.el (macroexp-let2*): New macro.
      
      * window.el (with-temp-buffer-window)
      (with-current-buffer-window, with-displayed-buffer-window):
      * emacs-lisp/cl-macs.el (cl--compiler-macro-adjoin):
      * emacs-lisp/cl-lib.el (substring):
      * emacs-lisp/cl-extra.el (cl-getf): Use it.
      6dbaf047
  23. 09 Nov, 2014 1 commit
    • Stefan Monnier's avatar
      Fix bootstrap failure after last change to eval-and-compile. · 57db3f3a
      Stefan Monnier authored
      * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
      Don't call byte-compile-preprocess since the result will go through cconv.
      (byte-compile-output-docform): Handle uninterned `name' correctly.
      * lisp/emacs-lisp/cl-macs.el (cl-define-compiler-macro): Use interned name
      to circumvent byte-compiler bug.
      
      * lisp/emacs-lisp/cl-extra.el (cl-get): Silence compiler warning.
      
      * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Fix typo.
      (macroexp--compiler-macro): Remove left-over debug code.
      57db3f3a
  24. 23 Oct, 2014 1 commit
  25. 17 Oct, 2014 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/eieio-base.el: Use lexical-binding and cl-lib. · 94250173
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-core.el: Use lexical-binding and cl-lib.
      (list-of): New type.
      (eieio--typep): Remove.
      (eieio-perform-slot-validation): Use cl-typep instead.
      * lisp/emacs-lisp/eieio.el: Use lexical-binding drop non-GV fallback.
      (defclass, defgeneric, defmethod): Add doc-string position.
      (with-slots): Require cl-lib.
      * lisp/emacs-lisp/cl-macs.el (cl--make-type-test): Avoid ((lambda ..) ..).
      94250173
  26. 21 Jul, 2014 1 commit
  27. 26 Jun, 2014 1 commit
  28. 05 Jun, 2014 2 commits
  29. 02 May, 2014 1 commit
  30. 23 Apr, 2014 1 commit
  31. 22 Apr, 2014 3 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/byte-run.el (function-put): New function. · 67c477ae
      Stefan Monnier authored
      (defun-declarations-alist): Use it.  Add `pure' and `side-effect-free'.
      * lisp/emacs-lisp/cl-macs.el (cl-defstruct, cl-struct-sequence-type)
      (cl-struct-slot-info, cl-struct-slot-offset, cl-struct-slot-value):
      Use them.
      67c477ae
    • Daniel Colascione's avatar
      Optimize cl-struct-slot-value; fix test · 66fda794
      Daniel Colascione authored
      2014-04-22  Daniel Colascione  <dancol@dancol.org>
      
      	* emacs-lisp/cl-macs.el
      	(cl-struct-sequence-type,cl-struct-slot-info): Declare pure.
      	(cl-struct-slot-value): Conditionally use aref or nth so that the
      	compiler produces optimal code.
      
      2014-04-22  Daniel Colascione  <dancol@dancol.org>
      
      	* automated/cl-lib.el (cl-lib-struct-accessors): Fix test to
      	account for removal of `cl-struct-set-slot-value'.
      66fda794
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/cl-macs.el (cl-struct-slot-offset): Mark as pure. · d6f14ca7
      Stefan Monnier authored
      (cl--set-elt): Don't proclaim as inline.
      (cl-struct-slot-value): Remove explicit gv-setter and compiler-macro.
      Define as inlinable instead.
      (cl-struct-set-slot-value): Remove.
      * doc/misc/cl.texi (Structures): Remove cl-struct-set-slot-value.
      * lisp/emacs-lisp/cl-lib.el (cl--set-elt): Remove.
      * lisp/emacs-lisp/cl-seq.el (cl-replace, cl-substitute, cl-nsubstitute):
      Use setf instead.
      d6f14ca7
  32. 21 Apr, 2014 3 commits
  33. 20 Apr, 2014 2 commits