1. 22 Aug, 2015 1 commit
    • Paul Eggert's avatar
      text-quoting-style in emacs-lisp diagnostics · c87523bd
      Paul Eggert authored
      * lisp/emacs-lisp/advice.el (ad-read-advised-function)
      (ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
      (ad-disable-advice, ad-remove-advice, ad-set-argument)
      (ad-set-arguments):
      * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
      (byte-compile-unfold-lambda, byte-optimize-form-code-walker)
      (byte-optimize-while, byte-optimize-apply):
      * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
      (byte-compile-log-file, byte-compile-format-warn)
      (byte-compile-nogroup-warn, byte-compile-arglist-warn)
      (byte-compile-cl-warn)
      (byte-compile-warn-about-unresolved-functions)
      (byte-compile-file, byte-compile-fix-header)
      (byte-compile--declare-var, byte-compile-file-form-defmumble)
      (byte-compile-form, byte-compile-normal-call)
      (byte-compile-variable-ref, byte-compile-variable-set)
      (byte-compile-subr-wrong-args, byte-compile-setq-default)
      (byte-compile-negation-optimizer)
      (byte-compile-condition-case--old)
      (byte-compile-condition-case--new, byte-compile-save-excursion)
      (byte-compile-defvar, byte-compile-autoload)
      (byte-compile-lambda-form)
      (byte-compile-make-variable-buffer-local, display-call-tree)
      (batch-byte-compile):
      * lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use)
      (cconv-analyze-form):
      * lisp/emacs-lisp/chart.el (chart-space-usage):
      * lisp/emacs-lisp/check-declare.el (check-declare-scan)
      (check-declare-warn, check-declare-file)
      (check-declare-directory):
      * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
      (checkdoc-message-text-engine):
      * lisp/emacs-lisp/cl-extra.el (cl-parse-integer):
      * lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
      (cl-symbol-macrolet):
      * lisp/emacs-lisp/cl.el (cl-unload-function, flet):
      * lisp/emacs-lisp/copyright.el (copyright)
      (copyright-update-directory):
      * lisp/emacs-lisp/edebug.el (edebug-read-list):
      * lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
      * lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
      (eieio-oref, eieio-oset-default):
      * lisp/emacs-lisp/eieio-speedbar.el:
      (eieio-speedbar-child-make-tag-lines)
      (eieio-speedbar-child-description):
      * lisp/emacs-lisp/eieio.el (defclass, change-class):
      * lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
      (elint-init-form, elint-check-defalias-form)
      (elint-check-let-form):
      * lisp/emacs-lisp/ert.el (ert-get-test):
      * lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
      (find-function-library):
      * lisp/emacs-lisp/generator.el (iter-yield):
      * lisp/emacs-lisp/gv.el (gv-define-simple-setter):
      * lisp/emacs-lisp/lisp-mnt.el (lm-verify):
      * lisp/emacs-lisp/package-x.el (package-upload-file):
      * lisp/emacs-lisp/package.el (package-version-join)
      (package-disabled-p, package-activate-1, package-activate)
      (package--download-one-archive)
      (package--download-and-read-archives)
      (package-compute-transaction, package-install-from-archive)
      (package-install, package-install-selected-packages)
      (package-delete, package-autoremove)
      (package-install-button-action, package-delete-button-action)
      (package-menu-hide-package, package-menu--list-to-prompt)
      (package-menu--perform-transaction)
      (package-menu--find-and-notify-upgrades):
      * lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
      * lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
      * lisp/emacs-lisp/ring.el (ring-next, ring-previous):
      * lisp/emacs-lisp/rx.el (rx-check, rx-anything):
      * lisp/emacs-lisp/smie.el (smie-config-save):
      * lisp/emacs-lisp/subr-x.el (internal--check-binding):
      * lisp/emacs-lisp/testcover.el (testcover-1value):
      Use curved quotes in diagnostic format strings.
      c87523bd
  2. 07 Jul, 2015 1 commit
    • Stefan Monnier's avatar
      Add online-help support to describe types · 59b5723c
      Stefan Monnier authored
      * lisp/help-fns.el (describe-symbol-backends): Move to help-mode.el.
      (describe-symbol): Improve the selection of default.
      
      * lisp/help-mode.el: Require cl-lib.
      (describe-symbol-backends): Move from help-fns.el.
      (help-make-xrefs): Use it.
      
      * lisp/emacs-lisp/cl-extra.el (describe-symbol-backends): Add entry
      for types.
      (cl--typedef-regexp): New const.
      (find-function-regexp-alist): Add entry for types.
      (cl-help-type, cl-type-definition): New buttons.
      (cl-find-class): New function.
      (cl-describe-type): New command.
      (cl--describe-class, cl--describe-class-slot)
      (cl--describe-class-slots): New functions, moved from eieio-opt.el.
      
      * lisp/emacs-lisp/cl-generic.el (cl--generic-method-documentation)
      (cl--generic-all-functions, cl--generic-specializers-apply-to-type-p):
      New functions.  Moved from eieio-opt.el.
      (cl--generic-class-parents): New function, extracted from
      cl--generic-struct-specializers.
      (cl--generic-struct-specializers): Use it.
      
      * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Use pcase-dolist.
      Improve constructor's docstrings.
      (cl-struct-unknown-slot): New error.
      (cl-struct-slot-offset): Use it.
      
      * lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Record the type
      definition in current-load-list.
      
      * lisp/emacs-lisp/eieio-core.el (eieio--known-slot-names): New var.
      (eieio--add-new-slot): Set it.
      (eieio-defclass-internal): Use new name for current-load-list.
      (eieio-oref): Add compiler-macro to warn about unknown slots.
      * lisp/emacs-lisp/eieio.el (defclass): Update eieio--known-slot-names
      as compile-time as well.  Improve constructor docstrings.
      
      * lisp/emacs-lisp/eieio-opt.el (eieio-help-class)
      (eieio--help-print-slot, eieio-help-class-slots): Move to cl-extra.el.
      (eieio-class-def): Remove button.
      (eieio-help-constructor): Use new name for load-history element.
      (eieio--specializers-apply-to-class-p, eieio-all-generic-functions)
      (eieio-method-documentation): Move to cl-generic.el.
      (eieio-display-method-list): Use new names.
      
      * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression):
      Add "define-linline".
      (lisp-fdefs): Remove "defsubst".
      (el-fdefs): Add "defsubst", "cl-defsubst", and "define-linline".
      
      * lisp/emacs-lisp/macroexp.el (macroexp--warned): New var.
      (macroexp--warn-and-return): Use it to avoid inf-loops.
      Add `compile-only' argument.
      59b5723c
  3. 27 Jun, 2015 1 commit
    • Paul Eggert's avatar
      Initialize cl--gensym-counter to 0 · efc262f5
      Paul Eggert authored
      Previously it was initialized to a random value, which made it
      harder to reproduce earlier Emacs runs.  The need for a random
      value went away when Emacs introduced and used the #: syntax for
      uninterned symbols (Bug#20862).
      * doc/misc/cl.texi (Creating Symbols, Common Lisp Compatibility):
      Document that cl--gensym-counter now starts with 0.
      * lisp/emacs-lisp/cl-lib.el (cl--gensym-counter): Remove.
      (cl--random-time): Move to near only remaining use.
      * lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Initialize to 0.
      efc262f5
  4. 25 May, 2015 1 commit
  5. 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
  6. 13 Apr, 2015 1 commit
  7. 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
  8. 10 Apr, 2015 1 commit
  9. 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
  10. 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
  11. 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
  12. 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
  13. 20 Mar, 2015 1 commit
  14. 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
  15. 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
  16. 16 Mar, 2015 1 commit
  17. 03 Mar, 2015 1 commit
  18. 23 Feb, 2015 1 commit
  19. 19 Feb, 2015 1 commit
  20. 16 Feb, 2015 1 commit
  21. 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
  22. 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
  23. 16 Jan, 2015 1 commit
  24. 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
  25. 01 Jan, 2015 2 commits
  26. 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
  27. 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
  28. 23 Oct, 2014 1 commit
  29. 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
  30. 21 Jul, 2014 1 commit
  31. 26 Jun, 2014 1 commit
  32. 05 Jun, 2014 2 commits
  33. 02 May, 2014 1 commit
  34. 23 Apr, 2014 1 commit
  35. 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
  36. 21 Apr, 2014 1 commit