1. 28 Mar, 2015 2 commits
  2. 26 Mar, 2015 2 commits
  3. 25 Mar, 2015 3 commits
  4. 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
  5. 23 Mar, 2015 5 commits
  6. 22 Mar, 2015 1 commit
  7. 21 Mar, 2015 2 commits
  8. 20 Mar, 2015 3 commits
  9. 19 Mar, 2015 3 commits
    • Stefan Monnier's avatar
      8aa13d07
    • Stefan Monnier's avatar
      Fixes: debbugs:20141 · 29f7f98b
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio.el (object-slots): Return slot names as before.
      29f7f98b
    • Stefan Monnier's avatar
      EIEIO: Change class's representation to unify instance & class slots · 50c117fe
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-core.el (eieio--class): Change field names and order
      to match those of cl--class; use cl--slot for both instance slots and
      class slots.
      (eieio--object-num-slots): Use cl-struct-slot-info.
      (eieio--object-class): Rename from eieio--object-class-object.
      (eieio--object-class-name): Remove.
      (eieio-defclass-internal): Adjust to new slot representation.
      Store doc in class rather than in `variable-documentation'.
      (eieio--perform-slot-validation-for-default): Change API to take
      a slot object.
      (eieio--slot-override): New function.
      (eieio--add-new-slot): Rewrite.
      (eieio-copy-parents-into-subclass): Rewrite.
      (eieio--validate-slot-value, eieio--validate-class-slot-value)
      (eieio-oref-default, eieio-oset-default)
      (eieio--class-slot-name-index, eieio-set-defaults): Adjust to new
      slot representation.
      (eieio--c3-merge-lists): Simplify.
      (eieio--class/struct-parents): New function.
      (eieio--class-precedence-bfs): Use it.
      
      * lisp/emacs-lisp/eieio.el (with-slots): Use macroexp-let2.
      (object-class-fast): Change recommend replacement.
      (eieio-object-class): Rewrite.
      (slot-exists-p): Adjust to new slot representation.
      (initialize-instance): Adjust to new slot representation.
      (object-write): Adjust to new slot representation.
      
      * lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
      Manually map initargs to slot names.
      (eieio-persistent-validate/fix-slot-value): Adjust to new
      slot representation.
      
      * lisp/emacs-lisp/eieio-compat.el (eieio--generic-static-symbol-specializers):
      Extract from eieio--generic-static-symbol-generalizer.
      (eieio--generic-static-symbol-generalizer): Use it.
      
      * lisp/emacs-lisp/eieio-custom.el (eieio-object-value-create)
      (eieio-object-value-get): Adjust to new slot representation.
      
      * lisp/emacs-lisp/eieio-datadebug.el (data-debug/eieio-insert-slots):
      Declare to silence warnings.
      (data-debug-insert-object-button): Avoid `object-slots'.
      (data-debug/eieio-insert-slots): Adjust to new slot representation.
      
      * lisp/emacs-lisp/eieio-opt.el (eieio--help-print-slot): New function
      extracted from eieio-help-class-slots.
      (eieio-help-class-slots): Use it.  Adjust to new slot representation.
      
      * test/automated/eieio-test-methodinvoke.el (make-instance): Use new-style
      `subclass' specializer for a change.
      
      * test/automated/eieio-test-persist.el (persist-test-save-and-compare):
      Adjust to new slot representation.
      
      * test/automated/eieio-tests.el (eieio-test-17-virtual-slot): Don't use
      initarg in `oset'.
      (eieio-test-32-slot-attribute-override-2): Adjust to new
      slot representation.
      
      * lisp/emacs-lisp/cl-preloaded.el (cl--class): Fix type of `parents'.
      50c117fe
  10. 18 Mar, 2015 3 commits
    • Stefan Monnier's avatar
    • 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
    • Tassilo Horn's avatar
      Improve dynamic elisp keyword font-locking · 9fdc166e
      Tassilo Horn authored
      * emacs-lisp/byte-run.el (macro-declarations-alist): New
      declaration no-font-lock-keyword.
      (defmacro): Flush font-lock in existing elisp buffers.
      
      * emacs-lisp/lisp-mode.el (lisp--el-update-after-load)
      (lisp--el-update-macro-regexp, lisp--el-macro-regexp): Delete
      functions and defconst.
      (lisp--el-match-keyword): Rename from lisp--el-match-macro.
      (lisp--el-font-lock-flush-elisp-buffers): New function.
      (lisp-mode-variables): Remove code for updating
      lisp--el-macro-regexp, and add
      lisp--el-font-lock-flush-elisp-buffers to after-load-functions.
      9fdc166e
  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 3 commits
  13. 15 Mar, 2015 2 commits
    • Tassilo Horn's avatar
      Font-lock elisp macros/special forms dynamically · 51e7e463
      Tassilo Horn authored
      * emacs-lisp/lisp-mode.el (lisp--el-macro-regexp): New defconst.
      (lisp--el-update-macro-regexp, lisp--el-update-after-load)
      (lisp--el-match-macro): New functions.
      (lisp-mode-variables): Update lisp--el-macro-regexp and add
      lisp--el-update-after-load to after-load-functions.
      51e7e463
    • Daniel Colascione's avatar
      Support indenting backquote substitutions in cl-indent · 99416824
      Daniel Colascione authored
      * lisp/emacs-lisp/cl-indent.el
      (lisp-indent-backquote-substitution-mode): New user option.
      (common-lisp-indent-function-1, common-lisp-loop-part-indentation)
      (common-lisp-indent-function): Support normally indenting
      backquote substitutions.
      (extended-loop-p): Rename to `lisp-extended-loop-p'.
      99416824
  14. 10 Mar, 2015 1 commit
  15. 09 Mar, 2015 1 commit
    • NicolasPetton's avatar
      Add seq-into as a public function · b7ed48c3
      NicolasPetton authored
      * lisp/emacs-lisp/seq.el: Make seq-into a public function (replacing
      seq--into)
      * test/automated/seq-tests.el: Add tests for seq-into
      * doc/lispref/sequences.texi: Add documentation for seq-into
      b7ed48c3
  16. 07 Mar, 2015 1 commit
  17. 05 Mar, 2015 2 commits
    • Artur Malabarba's avatar
      17ecfea3
    • Stefan Monnier's avatar
      Replace *-function vars with generic functions in cl-generic. · 21c54786
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-generic.el (cl--generic-generalizer): New struct.
      (cl-generic-tagcode-function, cl-generic-tag-types-function): Remove.
      (cl--generic-t-generalizer): New const.
      (cl--generic-make-method): Rename from `cl--generic-method-make'.
      (cl--generic-make): Change calling convention.
      (cl--generic): Add `options' field.
      (cl-generic-function-options): New function.
      (cl-defgeneric): Rewrite handling of options.  Add support for :method
      options and allow the use of a default body.
      (cl-generic-define): Save options in the corresponding new field.
      (cl-defmethod): Fix ordering of qualifiers.
      (cl-generic-define-method): Use cl-generic-generalizers.
      (cl--generic-get-dispatcher): Change calling convention, and change
      calling convention of the returned function as well so as to take the
      list of methods separately from the generic function object, so that it
      can receive the original generic function object.
      (cl--generic-make-next-function): New function, extracted from
      cl--generic-make-function.
      (cl--generic-make-function): Use it.
      (cl-generic-method-combination-function): Remove.
      (cl--generic-cyclic-definition): New error.
      (cl-generic-call-method): Take a generic function object rather than
      its name.
      (cl-method-qualifiers): New alias.
      (cl--generic-build-combined-method): Use cl-generic-combine-methods,
      don't segregate by qualifiers here any more.
      (cl--generic-standard-method-combination): Segregate by qualifiers
      here instead.  Add support for the `:extra' qualifier.
      (cl--generic-cache-miss): Move earlier, adjust to new calling convention.
      (cl-generic-generalizers, cl-generic-combine-methods):
      New generic functions.
      (cl-no-next-method, cl-no-applicable-method, cl-no-primary-method):
      Use the new "default method in defgeneric" functionality, change
      calling convention to receive a generic function object.
      (cl--generic-head-used): New var.
      (cl--generic-head-generalizer, cl--generic-eql-generalizer)
      (cl--generic-struct-generalizer, cl--generic-typeof-generalizer):
      New consts.
      * lisp/emacs-lisp/eieio-core.el (eieio--generic-generalizer)
      (eieio--generic-subclass-generalizer): New consts.
      (cl-generic-generalizers): New methods.
      * lisp/emacs-lisp/eieio-compat.el (eieio--generic-static-symbol-generalizer)
      (eieio--generic-static-object-generalizer): New consts.
      (cl-generic-generalizers) <(head eieio--static)>: New method.
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
      Unfold closures like lambdas.
      21c54786
  18. 03 Mar, 2015 4 commits
    • Paul Eggert's avatar
      Spelling fixes · 5d9b1e10
      Paul Eggert authored
      5d9b1e10
    • Daniel Colascione's avatar
      Use `macroexp-parse-body' · 8b38d30e
      Daniel Colascione authored
      * lisp/emacs-lisp/generator.el: (iter-defun): Use `macroexp-parse-body'.
      
      * test/automated/generator-tests.el (cps-testcase): Use
      (cps-test-declarations-preserved): New test.
      8b38d30e
    • Stefan Monnier's avatar
      * lisp/progmodes/gud.el: Use lexical-binding. · 7133f262
      Stefan Monnier authored
      Fixes: debbugs:19966
      
      * lisp/emacs-lisp/gv.el (gv-ref): Warn about likely problematic cases.
      7133f262
    • Daniel Colascione's avatar
      Address generator feedback · cecf4afe
      Daniel Colascione authored
      * doc/lispref/control.texi (Generators): Correct missing word.  Clarify which
      forms are legal in which parts of `unwind-protect'.  Fix orphaned
      close parenthesis.
      
      * lisp/emacs-lisp/generator.el: Make globals conform to elisp
      style throughout.  Use more efficient font-lock patterns.
      (cps-inhibit-atomic-optimization): Rename from
      `cps-disable-atomic-optimization'.
      (cps--gensym): New macro; replaces `cl-gensym' throughout.
      (cps-generate-evaluator): Move the `iter-yield' local macro
      definition here
      (iter-defun, iter-lambda): from here.
      
      * test/automated/generator-tests.el (cps-test-iter-close-finalizer):
      Rename `gc-precise-p' to `gc-precise'.
      
      * test/automated/generator-tests.el (cps-testcase): Use
      `cps-inhibit-atomic-optimization' instead of
      `cps-disable-atomic-optimization'.
      cecf4afe