1. 30 Jan, 2015 3 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/backquote.el: Fix bug with unoptimized exp. · d5e3922e
      Stefan Monnier authored
      Fixes: debbugs:19734
      * lisp/emacs-lisp/backquote.el (backquote-delay-process): Don't reuse `s'
      since it may be "equivalent" in some sense, yet different.
      * test/automated/core-elisp-tests.el (core-elisp-tests-3-backquote): New test.
    • Glenn Morris's avatar
      # ChangeLog fix · 8ebc20d0
      Glenn Morris authored
      If you revert a change a few days after making it,
      don't delete the ChangeLog entry.
    • Glenn Morris's avatar
      # ChangeLog fixes · 2b9b98bd
      Glenn Morris authored
      Merged ChangeLog entries go to the top, with the date of the merge.
      It's a simple rule.
  2. 28 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Merge from gnulib and try to repair bad merge · 39c2fa3f
      Paul Eggert authored
      This attempts to repair problems introduced by the bad merge
      5491fd10.  The easiest way for me
      to fix the badly-merged gnulib files was to run
      'admin/merge-gnulib', so I did that, which also imported the
      following changes:
      * build-aux/update-copyright, m4/gnulib.m4:
      Update from gnulib, incorporating:
      2015-01-15 time: port to MinGW32 3.21
      2015-01-15 update-copyright: apply to self
      2015-01-11 update-copyright: recognize groff's \(co marker
  3. 27 Jan, 2015 2 commits
    • Fabián Ezequiel Gallina's avatar
    • Fabián Ezequiel Gallina's avatar
      python.el: New non-global state dependent indentation engine. · 5485e3e5
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:18319
      Fixes: debbugs:19595
      * lisp/progmodes/python.el (python-syntax-comment-or-string-p): Accept
      PPSS as argument.
      (python-syntax-closing-paren-p): New function.
      (python-indent-levels): Mark obsolete.
      (python-indent-context): Return more context cases.
      (python-indent--calculate-levels): New functions.
      (python-indent-calculate-levels): Use them.
      (python-indent-calculate-indentation, python-indent-line):
      (python-indent-line-function): Rewritten to use new API.
      (python-indent-dedent-line): Simplify logic.
      (python-indent-dedent-line-backspace): Use `unless`.
      (python-indent-toggle-levels): Delete function.
      * test/automated/python-tests.el (python-indent-pep8-1)
      (python-indent-pep8-2, python-indent-pep8-3)
      (python-indent-after-comment-1, python-indent-after-comment-2)
      (python-indent-inside-paren-1, python-indent-inside-paren-2)
      (python-indent-after-block-1, python-indent-after-block-2)
      (python-indent-after-backslash-1, python-indent-after-backslash-2)
      (python-indent-after-backslash-3, python-indent-block-enders-1)
      (python-indent-block-enders-2, python-indent-block-enders-3)
      (python-indent-block-enders-4, python-indent-block-enders-5)
      (python-indent-dedenters-1, python-indent-dedenters-2)
      (python-indent-dedenters-3, python-indent-dedenters-4)
      (python-indent-dedenters-5, python-indent-dedenters-6)
      (python-indent-dedenters-7, python-indent-dedenters-8): Fix tests.
      (python-indent-base-case, python-indent-after-block-3)
      (python-indent-after-backslash-5, python-indent-inside-paren-3)
      (python-indent-inside-paren-4, python-indent-inside-paren-5)
      (python-indent-inside-paren-6, python-indent-inside-string-1)
      (python-indent-inside-string-2, python-indent-inside-string-3)
      (python-indent-dedent-line-backspace-1): New Tests.
  4. 26 Jan, 2015 2 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/cl-generic.el (cl--generic-method): New struct. · a9a3d429
      Stefan Monnier authored
      (cl--generic): The method-table is now a (list-of cl--generic-method).
      (cl--generic-member-method): New function.
      (cl-generic-define-method): Use it.
      (cl--generic-build-combined-method, cl--generic-cache-miss):
      Adapt to new method-table.
      (cl--generic-no-next-method-function): Add `method' argument.
      (cl-generic-call-method): Adapt to new method representation.
      (cl--generic-cnm-sample, cl--generic-nnm-sample): Adjust.
      (cl-find-method, cl-method-qualifiers): New functions.
      (cl--generic-method-info): Adapt to new method representation.
      Return a string for the qualifiers.
      * lisp/emacs-lisp/eieio-opt.el (eieio-help-class): Adjust accordingly.
      (eieio-all-generic-functions, eieio-method-documentation):
      Adjust to new method representation.
      * lisp/emacs-lisp/eieio-compat.el (eieio--defmethod): Use cl-find-method.
      * test/automated/cl-generic-tests.el: Try and make sure cl-lib is not
      required at run-time.
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/cl-generic.el: Add a method-combination hook. · 4cdde919
      Stefan Monnier authored
      (cl-generic-method-combination-function): New var.
      (cl--generic-lambda): Remove `with-cnm' arg.
      (cl-defmethod): Change accordingly.
      (cl-generic-define-method): Don't check qualifiers validity.
      Preserve all qualifiers in `method-table'.
      (cl-generic-call-method): New function.
      (cl--generic-nest): Remove (morph into cl-generic-call-method).
      (cl--generic-build-combined-method): Adjust to new format of method-table
      and use cl-generic-method-combination-function.
      (cl--generic-standard-method-combination): New function, extracted from
      (cl--generic-cnm-sample): Adjust to new format of method-table.
      * lisp/emacs-lisp/eieio-compat.el (eieio--defmethod): Use () qualifiers
      instead of :primary.
      * lisp/emacs-lisp/eieio-datadebug.el (eieio-debug-methodinvoke):
      Remove obsolete function.
      * test/automated/cl-generic-tests.el (cl-generic-test-11-next-method-p):
      New test.
  5. 25 Jan, 2015 1 commit
  6. 24 Jan, 2015 1 commit
  7. 23 Jan, 2015 2 commits
    • Dmitry Gutov's avatar
      Backport: Fix package tests when TMPDIR is in HOME · 81fb8ab0
      Dmitry Gutov authored
      Fixes: debbugs:19657
      * test/automated/package-test.el (with-package-test):
      Bind `abbreviated-home-dir' to nil.
      (package-test-describe-package, package-test-signed):
      Expect abbreviated directory names.
      (cherry picked from commit f02406c7)
    • Dmitry Gutov's avatar
      Fix package tests when TMPDIR is in HOME · f02406c7
      Dmitry Gutov authored
      Fixes: debbugs:19657
      * test/automated/package-test.el (with-package-test):
      Bind `abbreviated-home-dir' to nil.
      (package-test-describe-package, package-test-signed):
      Expect abbreviated directory names.
  8. 22 Jan, 2015 3 commits
  9. 21 Jan, 2015 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/eieio*.el: Fix up warnings and improve compatibility · 59e7fe6d
      Stefan Monnier authored
      Fixes: debbugs:19645
      * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Add support for `declare'.
      (cl--generic-setf-rewrite): Setup the setf expander right away.
      (cl-defmethod): Make sure the setf expander is setup before we expand
      the body.
      (cl-defmethod): Silence byte-compiler warnings.
      (cl-generic-define-method): Shuffle code to change return value.
      (cl--generic-method-info): New function, extracted from
      (cl--generic-describe): Use it.
      * lisp/emacs-lisp/eieio-speedbar.el:
      * lisp/emacs-lisp/eieio-datadebug.el:
      * lisp/emacs-lisp/eieio-custom.el:
      * lisp/emacs-lisp/eieio-base.el: Use cl-defmethod.
      * lisp/emacs-lisp/eieio-compat.el (eieio--defmethod): Avoid no-next-method
      errors when there's a `before' but no `primary'.
      (next-method-p): Return nil rather than signal an error.
      (eieio-defgeneric): Remove bogus (fboundp 'method).
      * lisp/emacs-lisp/eieio-opt.el: Adapt to cl-generic.
      (eieio--specializers-apply-to-class-p):	New function.
      (eieio-all-generic-functions): Use it.
      (eieio-method-documentation): Use it as well as cl--generic-method-info.
      Change format of return value.
      (eieio-help-class): Adapt accordingly.
      * lisp/emacs-lisp/eieio.el: Use cl-defmethod.
      (defclass): Generate cl-defmethod calls; use setf methods for :accessor.
      (eieio-object-name-string): Declare as obsolete.
      * test/automated/cl-generic-tests.el (setf cl--generic-2): Make sure
      the setf can be used already in the body of the method.
  10. 20 Jan, 2015 5 commits
    • Jorgen Schaefer's avatar
      Removed test with spurious failures. · db5d4115
      Jorgen Schaefer authored
      * automated/package-test.el (package-test-install-prioritized):
      Removed test due to unreproducable failures.
    • Michal Nazarewicz's avatar
      descr-text: add `describe-char-eldoc' describing character at point · 81681ed9
      Michal Nazarewicz authored
      * lisp/descr-text.el (describe-char-eldoc): New function returning
      basic Unicode codepoint information (e.g. name) about character
      at point.  It is meant to be used as a default value of the
      `eldoc-documentation-function' variable.
      (describe-char-eldoc--format, describe-char-eldoc--truncate):
      New helper functions for `describe-char-eldoc' function.
      * tests/automated/descr-text-test.el: New file with tests for
      `describe-char-eldoc--truncate', `describe-char-eldoc--format',
      and `describe-char-eldoc'.
    • Michal Nazarewicz's avatar
    • Michal Nazarewicz's avatar
      tildify: add `tildify-double-space-undos' · d9af6e01
      Michal Nazarewicz authored
      * lisp/textmodes/tildify.el (tildify-double-space-undos): A new
      variable specifying whether pressing space in `tildify-mode' after
      a space has been replaced with hard space undos the substitution.
      (tildify-space): Add code branch for handling `tildify-doule-space'.
      * tests/automated/tildify-tests.el (tildify-space-undo-test--test):
      A new helper function for testing `tildify-double-space-undos'
      behaviour in the `tildify-space' function.
      (tildify-space-undo-test-html, tildify-space-undo-test-html-nbsp)
      (tildify-space-undo-test-xml, tildify-space-undo-test-tex): New
      tests for `tildify-doule-space-undos' behaviour.
    • Michal Nazarewicz's avatar
      tildify: add `tildify-space' and `tildify-mode' · 571441fc
      Michal Nazarewicz authored
      * lisp/textmodes/tildify.el (tildify-space): A new function
      which can be used as a `post-self-insert-hook' to automatically
      convert spaces into hard spaces.
      (tildify-space-pattern): A new variable specifying pattern where
      `tildify-space' should take effect.
      (tildify-space-predicates): A new variable specifying list of
      predicate functions that all must return non-nil for
      `tildify-space' to take effect.
      (tildify-space-region-predicate): A new functions meant to be
      used as a predicate in `tildify-space-predicates' list.
      (tildify-mode): A new minor mode enabling `tildify-space' as a
      * tests/automated/tildify-tests.el (tildify-space-test--test):
      A new helper function for testing `tildify-space' function.
      (tildify-space-test-html, tildify-space-test-html-nbsp)
      (tildify-space-test-xml, tildify-space-test-tex): New tests for
      `tildify-space' function.
  11. 18 Jan, 2015 3 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/eieio-core.el: Add `subclass' specializer for cl-generic. · 1f545d33
      Stefan Monnier authored
      (eieio--generic-subclass-tagcode, eieio--generic-subclass-tag-types):
      New functions.
      (cl-generic-tagcode-function, cl-generic-tag-types-function): Use them.
      * test/automated/eieio-test-methodinvoke.el (eieio-test-cl-generic-1):
      Test `subclass' specializer.
    • Stefan Monnier's avatar
      EIEIO&cl-generic: Add obsolescence warnings and fix corner case · 2a61bd00
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Correctly handle
      introduction of a new dispatch argument.
      (cl--generic-cache-miss): Handle dispatch on an argument which was not
      considered as dispatchable for this method.
      (cl-defmethod): Warn when adding a method to an obsolete generic function.
      (cl--generic-lambda): Make sure it works if cl-lib is not yet loaded.
      * lisp/emacs-lisp/eieio-generic.el (eieio--defgeneric-init-form):
      Use autoloadp.
      * lisp/emacs-lisp/eieio.el (defclass): Add obsolescence warning for the
      `newname' argument.
      * test/automated/cl-generic-tests.el (cl-generic-test-10-weird): New test.
      Rename other tests to preserve ordering.
    • Leo Liu's avatar
      Fix seq-subseq and cl-subseq for bad bounding indices · 253d44bd
      Leo Liu authored
      Fixes: debbugs:19434 debbugs:19519
      * lisp/emacs-lisp/cl-extra.el (cl-subseq): Use seq-subseq and fix
      multiple evaluation.
      * lisp/emacs-lisp/seq.el (seq-subseq): Throw bad bounding indices
      * test/automated/seq-tests.el (test-seq-subseq): Add more tests.
  12. 17 Jan, 2015 3 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/eieio.el: Improve `constructor' compatibility. · 4610ce96
      Stefan Monnier authored
      Fixes: debbugs:19620
      (eieio-constructor): Handle obsolete object name argument here...
      (defclass): ...instead of in the constructor here.
      * test/automated/eieio-tests.el
      (eieio-test-37-obsolete-name-in-constructor): New test.
    • Stefan Monnier's avatar
      Don't enforce :protection in EIEIO objects any more · d48c98cd
      Stefan Monnier authored
      * doc/misc/eieio.texi (Slot Options): Document :protection as unsupported.
      * lisp/emacs-lisp/eieio-core.el (eieio--scoped-class-stack): Remove var.
      (eieio--scoped-class): Remove function.
      (eieio--with-scoped-class): Remove macro.  Replace uses with `progn'.
      (eieio--slot-name-index): Don't check the :protection anymore.
      (eieio-initializing-object): Remove var.
      (eieio-set-defaults): Don't let-bind eieio-initializing-object.
      * lisp/emacs-lisp/eieio-generic.el (call-next-method): Don't bother checking
      eieio--scoped-class any more.
      * test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
      Use an explicit arg instead of eieio--scoped-class.  Update all callers.
      * test/automated/eieio-tests.el (eieio-test-25-slot-tests)
      (eieio-test-26-default-inheritance, eieio-test-28-slot-protection)
      (eieio-test-31-slot-attribute-override-class-allocation): Don't check
      that we enforce :protection since we don't any more.
    • Stefan Monnier's avatar
      Improve handling of doc-strings and describe-function for cl-generic · 24b7f775
      Stefan Monnier authored
      * lisp/help-fns.el (find-lisp-object-file-name): Accept any `type' as long
      as it's a symbol.
      (help-fns-short-filename): New function.
      (describe-function-1): Use it.  Use autoload-do-load.
      * lisp/help-mode.el (help-function-def): Add optional arg `type'.
      * lisp/emacs-lisp/cl-generic.el (cl-generic-ensure-function): It's OK to
      override an autoload.
      (cl-generic-current-method-specializers): Replace dyn-bind variable
      with a lexically-scoped macro.
      (cl--generic-lambda): Update accordingly.
      (cl-generic-define-method): Record manually in the load-history with
      type `cl-defmethod'.
      (cl--generic-get-dispatcher): Minor optimization.
      (cl--generic-search-method): New function.
      (find-function-regexp-alist): Add entry for `cl-defmethod' type.
      (cl--generic-search-method): Add hyperlinks for methods.  Merge the
      specializers and the function's arguments.
      * lisp/emacs-lisp/eieio-core.el (eieio--defalias): Move to eieio-generic.el.
      (eieio-defclass-autoload): Don't record the superclasses any more.
      (eieio-defclass-internal): Reuse the old class object if it was just an
      autoload stub.
      (eieio--class-precedence-list): Load the class if it's autoloaded.
      * lisp/emacs-lisp/eieio-generic.el (eieio--defalias): Move from eieio-core.
      (eieio--defgeneric-init-form): Don't throw away a previous docstring.
      (eieio--method-optimize-primary): Don't mess with the docstring.
      (defgeneric): Keep the `args' in the docstring.
      (defmethod): Don't use the method's docstring for the generic
      function's docstring.
      * lisp/emacs-lisp/find-func.el: Use lexical-binding.
      (find-function-regexp): Don't rule out `defgeneric'.
      (find-function-regexp-alist): Document new possibility of including
      a function instead of a regexp.
      (find-function-search-for-symbol): Implement that new possibility.
      (find-function-library): Don't assume that `function' is a symbol.
      (find-function-do-it): Remove unused var `orig-buf'.
      * test/automated/cl-generic-tests.el (cl-generic-test-8-after/before):
      Rename from cl-generic-test-7-after/before.
      (cl--generic-test-advice): New function.
      (cl-generic-test-9-advice): New test.
      * test/automated/eieio-test-methodinvoke.el (eieio-test-cl-generic-1): Reset
  13. 16 Jan, 2015 4 commits
  14. 15 Jan, 2015 4 commits
    • Wolfgang Jenkner's avatar
      Handle the `neg' operator in some calc-units functions. · 2290000e
      Wolfgang Jenkner authored
      * lisp/calc/calc-units.el (math-units-in-expr-p)
      (math-single-units-in-expr-p, math-find-compatible-unit-rec)
      (math-extract-units): Handle the `neg' operator.  (Bug#19582)
      * test/automated/calc-tests.el (calc-tests-equal, calc-tests-simple):
      New functions.
      (test-calc-remove-units, test-calc-extract-units)
      (test-calc-convert-units): New tests.
    • Wolfgang Jenkner's avatar
      Use POSIX redirection. · b577fe28
      Wolfgang Jenkner authored
      * test/automated/Makefile.in (WRITE_LOG): Use POSIX redirection.
    • Glenn Morris's avatar
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/eieio-core.el: Provide support for cl-generic. · 483c98a0
      Stefan Monnier authored
      (eieio--generic-tagcode): New function.
      (cl-generic-tagcode-function): Use it.
      (eieio--generic-tag-types): New function.
      (cl-generic-tag-types-function): Use it.
      (eieio-object-p): Tighten up the test.
      * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Fix paren typo.
      * test/automated/eieio-test-methodinvoke.el (eieio-test-method-store): Add
      keysym arg instead of relying on internal var eieio--generic-call-key.
      Update all callers.
      (eieio-test-cl-generic-1): New tests.
  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.
  16. 08 Jan, 2015 2 commits
    • Stefan Monnier's avatar
      * emacs-lisp/eieio-generic.el: New file. · 54181569
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-core.el: Move all generic function code to
      (eieio--defmethod): Declare.
      * lisp/emacs-lisp/eieio.el: Require eieio-generic.  Move all generic
      function code to eieio-generic.el.
      * lisp/emacs-lisp/eieio-opt.el (eieio-help-generic): Move to
      * lisp/emacs-lisp/eieio-datadebug.el (eieio-debug-methodinvoke): Update call
      to eieio--generic-call.
      * lisp/emacs-lisp/eieio-base.el (eieio-instance-inheritor): Don't use
      <class>-child type.
      * test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
      Update reference to eieio--generic-call-key.
      * test/automated/eieio-tests.el (eieio-test-23-inheritance-check): Don't use
    • Stefan Monnier's avatar
      lisp/emacs-lisp/eieio-core.el (eieio-backward-compatibility): New var. · 1599688e
      Stefan Monnier authored
      * lisp/cedet/ede/speedbar.el (ede-speedbar-compile-line)
      * lisp/cedet/ede.el (ede-buffer-belongs-to-target-p)
      (ede-buffer-belongs-to-project-p, ede-build-forms-menu)
      * lisp/cedet/semantic/db-typecache.el (semanticdb-get-typecache):
      * lisp/cedet/semantic/db-file.el (semanticdb-load-database):
      * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym->tag):
      * lisp/cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-load-helper):
      * lisp/cedet/ede/project-am.el (project-am-preferred-target-type):
      * lisp/cedet/ede/proj.el (ede-proj-load):
      * lisp/cedet/ede/custom.el (ede-customize-current-target, ede-customize-target):
      * lisp/cedet/semantic/ede-grammar.el ("semantic grammar"):
      * lisp/cedet/semantic/scope.el (semantic-scope-reset-cache)
      * lisp/cedet/srecode/map.el (srecode-map-update-map):
      * lisp/cedet/srecode/insert.el (srecode-insert-show-error-report)
      (srecode-insert-method, srecode-insert-include-lookup)
      * lisp/cedet/srecode/fields.el (srecode-active-template-region):
      * lisp/cedet/srecode/compile.el (srecode-flush-active-templates)
      (srecode-compile-inserter): Don't use <class> as a variable.
      Use `oref-default' for class slots.
      * lisp/cedet/semantic/grammar.el (semantic-grammar-eldoc-last-data): New var.
      (semantic-grammar-eldoc-get-macro-docstring): Use it instead of
      * lisp/cedet/semantic/fw.el (semantic-exit-on-input): Use `declare'.
      (semantic-throw-on-input): Use `with-current-buffer'.
      * lisp/cedet/semantic/db.el (semanticdb-abstract-table-list): Define if not
      * lisp/cedet/semantic/db-find.el (semanticdb-find-tags-collector):
      Use save-current-buffer.
      (semanticdb-find-tags-collector): Don't use <class> as a variable.
      * lisp/cedet/semantic/complete.el (semantic-complete-active-default)
      (semantic-complete-current-matched-tag): Declare.
      (semantic-complete-inline-custom-type): Don't use <class> as a variable.
      * lisp/cedet/semantic/bovine/make.el (semantic-analyze-possible-completions):
      Use with-current-buffer.
      * lisp/cedet/semantic.el (semantic-parser-warnings): Declare.
      * lisp/cedet/ede/base.el (ede-target-list): Define if not pre-defined.
      (ede-with-projectfile): Prefer find-file-noselect over
      * lisp/emacs-lisp/chart.el (chart-add-sequence, chart-bar-quickie):
      Don't use <class> as a variable.
      * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
      Improve error messages.
      (eieio-persistent-slot-type-is-class-p): Handle `list-of' types, as
      well as user-defined types.  Emit errors for legacy types like
      <class>-child and <class>-list, if not eieio-backward-compatibility.
      * lisp/emacs-lisp/eieio-core.el (eieio-backward-compatibility): New var.
      (eieio-defclass-autoload): Obey it.
      (eieio--class-object): Improve error behavior.
      (eieio-class-children-fast, same-class-fast-p): Remove.  Inline at
      every use site.
      (eieio--defgeneric-form-primary-only): Rename from
      eieio-defgeneric-form-primary-only; update all callers.
      (eieio--defgeneric-form-primary-only-one): Rename from
      eieio-defgeneric-form-primary-only-one; update all callers.
      (eieio-defgeneric-reset-generic-form-primary-only-one): Remove.
      (eieio--method-optimize-primary): New function to replace them.
      (eieio--defmethod, eieio-defmethod): Use it.
      (eieio--perform-slot-validation): Rename from
      eieio-perform-slot-validation; update all callers.
      (eieio--validate-slot-value): Rename from eieio-validate-slot-value.
      Change `class' to be a class object.  Update all callers.
      (eieio--validate-class-slot-value): Rename from
      eieio-validate-class-slot-value.  Change `class' to be a class object.
      Update all callers.
      (eieio-oset-default): Accept class object as well.
      (eieio--generic-call-primary-only): Rename from
      eieio-generic-call-primary-only.  Update all callers.
      * lisp/emacs-lisp/eieio-opt.el (eieio-read-generic-p): Remove.
      (eieio-read-generic): Use `generic-p' instead.
      * lisp/emacs-lisp/eieio.el (same-class-p): Accept class object as well.
      (call-next-method): Simplify.
      (clone): Obey eieio-backward-compatibility.
      * lisp/gnus/registry.el: Don't use <class> as a variable.
      * test/automated/eieio-test-methodinvoke.el
      Don't use <class> as a variable.
      * test/automated/eieio-test-persist.el (persistent-with-objs-list-slot):
      Don't use <class>-list type.
      * test/automated/eieio-tests.el: Use cl-lib.  Don't use <class> as a variable.
      Don't use <class>-list types and <class>-list-p predicates.
  17. 05 Jan, 2015 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/eieio*.el: Use class objects in `parent' field. · cb4db863
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-core.el (eieio-class-object): New function.
      (eieio-class-parents-fast): Remove macro.
      (eieio--class-option-assoc): Rename from class-option-assoc.
      Update all callers.
      (eieio--class-option): Rename from class-option.  Change `class' arg to
      be a class object.  Update all callers.
      (eieio--class-method-invocation-order): Rename from
      class-method-invocation-order.  Change `class' arg to be a class
      object.  Update all callers.
      (eieio-defclass-autoload, eieio-defclass): Set the `parent' field to
      a list of class objects rather than names.
      (eieio-defclass): Remove redundant quotes.  Use `eieio-oref-default'
      for accessors to class allocated slots.
      (eieio--perform-slot-validation-for-default): Rename from
      eieio-perform-slot-validation-for-default.  Update all callers.
      (eieio--add-new-slot): Rename from eieio-add-new-slot.
      Update all callers.  Use push.
      (eieio-copy-parents-into-subclass): Adjust to new content of
      `parent' field.  Use dolist.
      (eieio-oref): Remove support for providing a class rather than
      an object.
      (eieio-oref-default): Prefer class objects over class names.
      (eieio--slot-originating-class-p): Rename from
      eieio-slot-originating-class-p.  Update all callers.  Use `or'.
      (eieio--slot-name-index): Turn check into assertion.
      (eieio--class-slot-name-index): Rename from
      eieio-class-slot-name-index.  Change `class' arg to be a class object.
      Update all callers.
      (eieio-attribute-to-initarg): Move to eieio-test-persist.el.
      (eieio--c3-candidate): Rename from eieio-c3-candidate.
      Update all callers.
      (eieio--c3-merge-lists): Rename from eieio-c3-merge-lists.
      Update all callers.
      (eieio--class-precedence-c3): Rename from eieio-class-precedence-c3.
      Update all callers.
      (eieio--class-precedence-dfs): Rename from eieio-class-precedence-dfs.
      Update all callers.
      (eieio--class-precedence-bfs): Rename from eieio-class-precedence-bfs.
      Update all callers.  Adjust to new `parent' content.
      (eieio--class-precedence-list): Rename from -class-precedence-list.
      Update all callers.
      (eieio-generic-call): Use autoloadp and autoload-do-load.
      Slight simplification.
      (eieio-generic-call, eieio-generic-call-primary-only): Adjust to new
      return value of `eieio-generic-form'.
      (eieiomt-add): Index the hashtable with class objects rather than
      class names.
      (eieio-generic-form): Accept class objects as well.
      * lisp/emacs-lisp/eieio.el (eieio-class-parents): Accept class objects.
      (eieio--class-slot-initarg): Rename from class-slot-initarg.
      Change `class' arg to be a class object.  Update all callers.
      (call-next-method): Adjust to new return value of `eieio-generic-form'.
      (eieio-default-superclass): Set var to the class object.
      (eieio-edebug-prin1-to-string): Fix recursive call for lists.
      Change print behavior to affect class objects rather than
      class symbols.
      * lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
      Adjust to new convention for eieio-persistent-validate/fix-slot-value.
      Change `class' arg to be a class object.  Update all callers.
      * test/automated/eieio-test-persist.el (eieio--attribute-to-initarg):
      Move from eieio-core.el.  Rename from eieio-attribute-to-initarg.
      Change arg to be a class object.  Update all callers.
      * test/automated/eieio-tests.el (eieio-test-04-static-method)
      (eieio-test-05-static-method-2): Use oref-default to access
      class slots.
      (eieio-test-23-inheritance-check): Don't assume that
      eieio-class-parents returns class names, or that a class can only have
      a single name.
  18. 01 Jan, 2015 1 commit