1. 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
  2. 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
  3. 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
  4. 20 Mar, 2015 1 commit
  5. 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
  6. 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
  7. 16 Mar, 2015 1 commit
  8. 03 Mar, 2015 1 commit
  9. 23 Feb, 2015 1 commit
  10. 19 Feb, 2015 1 commit
  11. 16 Feb, 2015 1 commit
  12. 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
  13. 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
  14. 16 Jan, 2015 1 commit
  15. 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
  16. 01 Jan, 2015 2 commits
  17. 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
  18. 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
  19. 23 Oct, 2014 1 commit
  20. 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
  21. 21 Jul, 2014 1 commit
  22. 26 Jun, 2014 1 commit
  23. 05 Jun, 2014 2 commits
  24. 02 May, 2014 1 commit
  25. 23 Apr, 2014 1 commit
  26. 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
  27. 21 Apr, 2014 3 commits
  28. 20 Apr, 2014 2 commits
  29. 24 Mar, 2014 2 commits
  30. 23 Mar, 2014 2 commits
  31. 21 Feb, 2014 1 commit