2009-09-28 00:49:54 +00:00
|
|
|
|
;;; eieio-opt.el -- eieio optional functions (debug, printing, speedbar)
|
|
|
|
|
|
2015-01-08 00:24:24 -05:00
|
|
|
|
;; Copyright (C) 1996, 1998-2003, 2005, 2008-2015 Free Software
|
2013-01-01 09:11:05 +00:00
|
|
|
|
;; Foundation, Inc.
|
2009-09-28 00:49:54 +00:00
|
|
|
|
|
2009-10-01 02:50:00 +00:00
|
|
|
|
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
2009-09-28 00:49:54 +00:00
|
|
|
|
;; Keywords: OO, lisp
|
2010-08-29 12:17:13 -04:00
|
|
|
|
;; Package: eieio
|
2009-09-28 00:49:54 +00:00
|
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
;;
|
|
|
|
|
;; This contains support functions to eieio. These functions contain
|
|
|
|
|
;; some small class browser and class printing functions.
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
(require 'eieio)
|
2012-10-02 02:10:29 +08:00
|
|
|
|
(require 'find-func)
|
2012-10-25 22:13:16 +02:00
|
|
|
|
(require 'speedbar)
|
2009-09-28 00:49:54 +00:00
|
|
|
|
|
|
|
|
|
;;; Code:
|
2011-02-18 00:00:08 -08:00
|
|
|
|
;;;###autoload
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(defun eieio-browse (&optional root-class)
|
|
|
|
|
"Create an object browser window to show all objects.
|
|
|
|
|
If optional ROOT-CLASS, then start with that, otherwise start with
|
|
|
|
|
variable `eieio-default-superclass'."
|
|
|
|
|
(interactive (if current-prefix-arg
|
|
|
|
|
(list (read (completing-read "Class: "
|
|
|
|
|
(eieio-build-class-alist)
|
|
|
|
|
nil t)))
|
|
|
|
|
nil))
|
|
|
|
|
(if (not root-class) (setq root-class 'eieio-default-superclass))
|
EIEIO: Simplify help hyperlinks; Try and reduce hardcoding in .elc
* lisp/emacs-lisp/cl-generic.el (cl--generic-search-method): Fix regexp.
* lisp/emacs-lisp/eieio-core.el (eieio--check-type): Remove.
Use cl-check-type everywhere instead.
(eieio-class-object): Remove, use find-class instead when needed.
(class-p): Don't inline.
(eieio-object-p): Check more thoroughly, so we don't treat cl-structs,
such as eieio classes, as objects. Don't inline.
(object-p): Mark as obsolete.
(eieio-defclass-autoload, eieio-defclass-internal, eieio-oref)
(eieio--generic-tagcode): Avoid `class-p'.
(eieio-make-class-predicate, eieio-make-child-predicate): New functions.
(eieio-defclass-internal): Use current-load-list rather than
`class-location'.
* lisp/emacs-lisp/eieio-opt.el (eieio-help-class, eieio-help-constructor):
Use find-lisp-object-file-name, help-fns-short-filename and new calling
convention for eieio-class-def.
(eieio-build-class-list): Remove function, unused.
(eieio-method-def): Remove button type, unused.
(eieio-class-def): Inherit from help-function-def.
(eieio--defclass-regexp): New constant.
(find-function-regexp-alist): Use it.
(eieio--specializers-apply-to-class-p): Handle eieio--static as well.
(eieio-help-find-method-definition, eieio-help-find-class-definition):
Remove functions.
* lisp/emacs-lisp/eieio.el (defclass): Use new eieio-make-class-predicate
and eieio-make-child-predicate.
(eieio-class-parents): Use eieio--class-object.
(slot-boundp, find-class, eieio-override-prin1): Avoid class-p.
(slot-exists-p): Use find-class.
* test/automated/eieio-tests.el (eieio-test-23-inheritance-check): Simplify.
2015-01-31 00:48:14 -05:00
|
|
|
|
(cl-check-type root-class class)
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(display-buffer (get-buffer-create "*EIEIO OBJECT BROWSE*") t)
|
* textmodes/two-column.el (2C-split):
* textmodes/texnfo-upd.el (texinfo-multi-file-included-list):
* textmodes/tex-mode.el (tex-set-buffer-directory):
* textmodes/spell.el (spell-region, spell-string):
* textmodes/reftex.el (reftex-erase-buffer):
(reftex-get-file-buffer-force, reftex-kill-temporary-buffers):
* textmodes/reftex-toc.el (reftex-toc-promote-action):
* textmodes/reftex-sel.el (reftex-get-offset, reftex-insert-docstruct)
(reftex-select-item):
* textmodes/reftex-ref.el (reftex-label-info-update)
(reftex-offer-label-menu):
* textmodes/reftex-index.el (reftex-index-change-entry)
(reftex-index-phrases-info):
* textmodes/reftex-global.el (reftex-create-tags-file)
(reftex-save-all-document-buffers, reftex-ensure-write-access):
* textmodes/reftex-dcr.el (reftex-echo-ref, reftex-echo-cite)
(reftex-view-crossref-from-bibtex):
* textmodes/reftex-cite.el (reftex-bibtex-selection-callback)
(reftex-extract-bib-entries-from-thebibliography)
(reftex-all-used-citation-keys, reftex-create-bibtex-file):
* textmodes/refbib.el (r2b-capitalize-title):
(r2b-convert-buffer, r2b-help):
* textmodes/page-ext.el (pages-directory)
(pages-directory-goto-with-mouse):
* textmodes/bibtex.el (bibtex-validate-globally):
* textmodes/bib-mode.el (bib-capitalize-title):
* textmodes/artist.el (artist-clear-buffer, artist-system):
* progmodes/xscheme.el (global-set-scheme-interaction-buffer):
(local-set-scheme-interaction-buffer, xscheme-process-filter)
(verify-xscheme-buffer, xscheme-enter-interaction-mode)
(xscheme-enter-debugger-mode, xscheme-debugger-mode-p)
(xscheme-send-control-g-interrupt, xscheme-start-process)
(xscheme-process-sentinel, xscheme-cd):
* progmodes/verilog-mode.el (verilog-read-always-signals)
(verilog-set-define, verilog-getopt-file)
(verilog-module-inside-filename-p):
* progmodes/sh-script.el:
* progmodes/python.el (python-pdbtrack-get-source-buffer)
(python-pdbtrack-grub-for-buffer, python-execute-file):
* progmodes/octave-inf.el (inferior-octave):
* progmodes/idlwave.el (idlwave-scan-user-lib-files)
(idlwave-shell-compile-helper-routines, idlwave-set-local)
(idlwave-display-completion-list-xemacs, idlwave-list-abbrevs)
(idlwave-display-completion-list-emacs, idlwave-list-load-path-shadows)
(idlwave-completion-fontify-classes, idlwave-display-calling-sequence):
* progmodes/idlw-shell.el (idlwave-shell-examine-display-clear)
(idlwave-shell-filter, idlwave-shell-examine-highlight)
(idlwave-shell-sentinel, idlwave-shell-filter-directory)
(idlwave-shell-display-line, idlwave-shell-set-bp-in-module)
(idlwave-shell-examine-display, idlwave-shell-run-region)
(idlwave-shell-filter-bp, idlwave-shell-save-and-action)
(idlwave-shell-sources-filter, idlwave-shell-goto-next-error):
* progmodes/idlw-help.el (idlwave-help-get-special-help)
(idlwave-help-get-help-buffer):
* progmodes/gud.el (gud-basic-call, gud-find-class)
(gud-tooltip-activate-mouse-motions-if-enabled):
* progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe):
* progmodes/ebrowse.el (ebrowse-member-table, ebrowse-save-tree-as)
(ebrowse-view-exit-fn, ebrowse-tags-list-members-in-file)
(ebrowse-tags-next-file):
* progmodes/ebnf2ps.el (ebnf-generate-eps, ebnf-generate-eps)
(ebnf-eps-production-list, ebnf-begin-file, ebnf-log)
(ebnf-eps-finish-and-write):
* progmodes/cpp.el (cpp-edit-save):
* progmodes/cperl-mode.el (cperl-pod-to-manpage):
* progmodes/cc-defs.el (c-emacs-features):
* progmodes/antlr-mode.el (antlr-invalidate-context-cache)
(antlr-directory-dependencies):
* progmodes/ada-xref.el (ada-gnat-parse-gpr, ada-get-ali-file-name)
(ada-run-application, ada-find-in-src-path, ada-goto-parent)
(ada-find-any-references, ada-make-filename-from-adaname)
(ada-make-body-gnatstub):
* obsolete/rnews.el (news-list-news-groups):
* obsolete/resume.el (resume-suspend-hook,resume-write-buffer-to-file):
* obsolete/iso-acc.el (iso-acc-minibuf-setup):
* net/rcirc.el (rcirc-debug):
* net/newst-treeview.el (newsticker--treeview-list-add-item)
(newsticker--treeview-list-clear, newsticker-treeview-browse-url)
(newsticker--treeview-list-update-faces, newsticker-treeview-save)
(newsticker--treeview-item-show-text, newsticker--treeview-item-show)
(newsticker--treeview-tree-update-tag,newsticker--treeview-buffer-init)
(newsticker-treeview-show-item, newsticker--treeview-unfold-node)
(newsticker--treeview-list-clear-highlight)
(newsticker--treeview-list-update-highlight)
(newsticker--treeview-list-highlight-start)
(newsticker--treeview-tree-update-highlight)
(newsticker--treeview-get-selected-item)
(newsticker-treeview-mark-list-items-old)
(newsticker--treeview-set-current-node):
* net/newst-plainview.el (newsticker--buffer-set-uptodate):
* net/newst-backend.el (newsticker--get-news-by-funcall)
(newsticker--get-news-by-wget, newsticker--image-get)
(newsticker--image-sentinel):
* net/mairix.el (mairix-rmail-fetch-field, mairix-gnus-fetch-field):
* net/eudcb-ph.el (eudc-ph-do-request, eudc-ph-open-session):
(eudc-ph-close-session):
* net/eudc.el (eudc-save-options):
* language/thai-word.el (thai-update-word-table):
* language/japan-util.el (japanese-string-conversion):
* international/titdic-cnv.el (tsang-quick-converter)
(ziranma-converter, ctlau-converter):
* international/mule-cmds.el (describe-language-environment):
* international/ja-dic-cnv.el (skkdic-convert-okuri-ari)
(skkdic-convert-postfix, skkdic-convert-prefix):
(skkdic-convert-okuri-nasi, skkdic-convert):
* emacs-lisp/re-builder.el (reb-update-overlays):
* emacs-lisp/pp.el (pp-to-string, pp-display-expression):
* emacs-lisp/gulp.el (gulp-send-requests):
* emacs-lisp/find-gc.el (trace-call-tree):
* emacs-lisp/eieio-opt.el (eieio-browse, eieio-describe-class)
(eieio-describe-generic):
* emacs-lisp/eieio-base.el (eieio-persistent-read):
* emacs-lisp/edebug.el (edebug-outside-excursion):
* emacs-lisp/debug.el (debugger-make-xrefs):
* emacs-lisp/cust-print.el (custom-prin1-to-string):
* emacs-lisp/chart.el (chart-new-buffer):
* emacs-lisp/authors.el (authors-scan-el, authors-scan-change-log):
Use with-current-buffer.
* textmodes/artist.el (artist-system): Don't call
copy-sequence on a fresh string.
* progmodes/idlw-shell.el (easymenu setup): Use dolist.
2009-10-31 02:38:34 +00:00
|
|
|
|
(with-current-buffer (get-buffer "*EIEIO OBJECT BROWSE*")
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(erase-buffer)
|
|
|
|
|
(goto-char 0)
|
|
|
|
|
(eieio-browse-tree root-class "" "")
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
(defun eieio-browse-tree (this-root prefix ch-prefix)
|
2009-10-05 15:32:08 +00:00
|
|
|
|
"Recursively draw the children of the given class on the screen.
|
2009-09-28 00:49:54 +00:00
|
|
|
|
Argument THIS-ROOT is the local root of the tree.
|
|
|
|
|
Argument PREFIX is the character prefix to use.
|
|
|
|
|
Argument CH-PREFIX is another character prefix to display."
|
EIEIO: Simplify help hyperlinks; Try and reduce hardcoding in .elc
* lisp/emacs-lisp/cl-generic.el (cl--generic-search-method): Fix regexp.
* lisp/emacs-lisp/eieio-core.el (eieio--check-type): Remove.
Use cl-check-type everywhere instead.
(eieio-class-object): Remove, use find-class instead when needed.
(class-p): Don't inline.
(eieio-object-p): Check more thoroughly, so we don't treat cl-structs,
such as eieio classes, as objects. Don't inline.
(object-p): Mark as obsolete.
(eieio-defclass-autoload, eieio-defclass-internal, eieio-oref)
(eieio--generic-tagcode): Avoid `class-p'.
(eieio-make-class-predicate, eieio-make-child-predicate): New functions.
(eieio-defclass-internal): Use current-load-list rather than
`class-location'.
* lisp/emacs-lisp/eieio-opt.el (eieio-help-class, eieio-help-constructor):
Use find-lisp-object-file-name, help-fns-short-filename and new calling
convention for eieio-class-def.
(eieio-build-class-list): Remove function, unused.
(eieio-method-def): Remove button type, unused.
(eieio-class-def): Inherit from help-function-def.
(eieio--defclass-regexp): New constant.
(find-function-regexp-alist): Use it.
(eieio--specializers-apply-to-class-p): Handle eieio--static as well.
(eieio-help-find-method-definition, eieio-help-find-class-definition):
Remove functions.
* lisp/emacs-lisp/eieio.el (defclass): Use new eieio-make-class-predicate
and eieio-make-child-predicate.
(eieio-class-parents): Use eieio--class-object.
(slot-boundp, find-class, eieio-override-prin1): Avoid class-p.
(slot-exists-p): Use find-class.
* test/automated/eieio-tests.el (eieio-test-23-inheritance-check): Simplify.
2015-01-31 00:48:14 -05:00
|
|
|
|
(cl-check-type this-root class)
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(let ((myname (symbol-name this-root))
|
2015-07-02 10:59:32 -04:00
|
|
|
|
(chl (eieio--class-children (cl--find-class this-root)))
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(fprefix (concat ch-prefix " +--"))
|
|
|
|
|
(mprefix (concat ch-prefix " | "))
|
|
|
|
|
(lprefix (concat ch-prefix " ")))
|
|
|
|
|
(insert prefix myname "\n")
|
|
|
|
|
(while (cdr chl)
|
|
|
|
|
(eieio-browse-tree (car chl) fprefix mprefix)
|
|
|
|
|
(setq chl (cdr chl)))
|
|
|
|
|
(if chl
|
|
|
|
|
(eieio-browse-tree (car chl) fprefix lprefix))
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
;;; CLASS COMPLETION / DOCUMENTATION
|
|
|
|
|
|
2015-05-07 22:42:12 -07:00
|
|
|
|
;; Called via help-fns-describe-function-functions.
|
|
|
|
|
(declare-function help-fns-short-filename "help-fns" (filename))
|
|
|
|
|
|
2011-02-18 00:00:08 -08:00
|
|
|
|
;;;###autoload
|
2015-07-07 02:14:16 -04:00
|
|
|
|
(define-obsolete-function-alias 'eieio-help-class 'cl--describe-class "25.1")
|
2009-09-28 00:49:54 +00:00
|
|
|
|
|
|
|
|
|
(defun eieio-build-class-alist (&optional class instantiable-only buildlist)
|
|
|
|
|
"Return an alist of all currently active classes for completion purposes.
|
|
|
|
|
Optional argument CLASS is the class to start with.
|
|
|
|
|
If INSTANTIABLE-ONLY is non nil, only allow names of classes which
|
|
|
|
|
are not abstract, otherwise allow all classes.
|
|
|
|
|
Optional argument BUILDLIST is more list to attach and is used internally."
|
2015-01-08 15:47:32 -05:00
|
|
|
|
(let* ((cc (or class 'eieio-default-superclass))
|
2015-07-02 10:59:32 -04:00
|
|
|
|
(sublst (eieio--class-children (cl--find-class cc))))
|
2012-10-02 02:10:29 +08:00
|
|
|
|
(unless (assoc (symbol-name cc) buildlist)
|
|
|
|
|
(when (or (not instantiable-only) (not (class-abstract-p cc)))
|
* lisp/emacs-lisp/eieio*.el: Use hashtables rather than obarrays
* lisp/emacs-lisp/eieio-core.el (class): Rename field symbol-obarray to
symbol-hashtable. It contains a hashtable instead of an obarray.
(generic-p): Use symbol property `eieio-method-hashtable' instead of
`eieio-method-obarray'.
(generic-primary-only-p, generic-primary-only-one-p):
Slight optimization.
(eieio-defclass-autoload-map): Use a hashtable instead of an obarray.
(eieio-defclass-autoload, eieio-defclass): Adjust/simplify accordingly.
(eieio-class-un-autoload): Use autoload-do-load.
(eieio-defclass): Use dolist, cl-pushnew, cl-callf.
Use new cl-deftype-satisfies. Adjust to use of hashtables.
Don't hardcode the value of eieio--object-num-slots.
(eieio-defgeneric-form-primary-only-one): Remove `doc-string' arg.
Use a closure rather than a backquoted lambda.
(eieio--defmethod): Adjust call accordingly. Set doc-string via the
function-documentation property.
(eieio-slot-originating-class-p, eieio-slot-name-index)
(eieiomt--optimizing-hashtable, eieiomt-install, eieiomt-add)
(eieio-generic-form): Adjust to use of hashtables.
(eieiomt--sym-optimize): Rename from eieiomt-sym-optimize; take
additional class argument.
(eieio-generic-call-methodname): Remove, unused.
* lisp/emacs-lisp/eieio-custom.el: Use lexical-binding.
(eieio-object-value-to-abstract): Simplify.
* lisp/emacs-lisp/eieio-datadebug.el: Use lexical-binding.
* lisp/emacs-lisp/eieio-opt.el (eieio-build-class-list): Use cl-mapcan.
(eieio-build-class-alist): Use dolist.
(eieio-all-generic-functions): Adjust to use of hashtables.
* lisp/emacs-lisp/eieio.el (child-of-class-p): Fix case where `class' is
`eieio-default-superclass'.
* test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
Remove use of eieio-generic-call-methodname.
(eieio-test-method-order-list-3, eieio-test-method-order-list-6)
(eieio-test-method-order-list-7, eieio-test-method-order-list-8):
Adjust the expected result accordingly.
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
Prefer \' to $.
2014-12-22 15:13:02 -05:00
|
|
|
|
;; FIXME: Completion tables don't need alists, and ede/generic.el needs
|
|
|
|
|
;; the symbols rather than their names.
|
2012-10-02 02:10:29 +08:00
|
|
|
|
(setq buildlist (cons (cons (symbol-name cc) 1) buildlist))))
|
* lisp/emacs-lisp/eieio*.el: Use hashtables rather than obarrays
* lisp/emacs-lisp/eieio-core.el (class): Rename field symbol-obarray to
symbol-hashtable. It contains a hashtable instead of an obarray.
(generic-p): Use symbol property `eieio-method-hashtable' instead of
`eieio-method-obarray'.
(generic-primary-only-p, generic-primary-only-one-p):
Slight optimization.
(eieio-defclass-autoload-map): Use a hashtable instead of an obarray.
(eieio-defclass-autoload, eieio-defclass): Adjust/simplify accordingly.
(eieio-class-un-autoload): Use autoload-do-load.
(eieio-defclass): Use dolist, cl-pushnew, cl-callf.
Use new cl-deftype-satisfies. Adjust to use of hashtables.
Don't hardcode the value of eieio--object-num-slots.
(eieio-defgeneric-form-primary-only-one): Remove `doc-string' arg.
Use a closure rather than a backquoted lambda.
(eieio--defmethod): Adjust call accordingly. Set doc-string via the
function-documentation property.
(eieio-slot-originating-class-p, eieio-slot-name-index)
(eieiomt--optimizing-hashtable, eieiomt-install, eieiomt-add)
(eieio-generic-form): Adjust to use of hashtables.
(eieiomt--sym-optimize): Rename from eieiomt-sym-optimize; take
additional class argument.
(eieio-generic-call-methodname): Remove, unused.
* lisp/emacs-lisp/eieio-custom.el: Use lexical-binding.
(eieio-object-value-to-abstract): Simplify.
* lisp/emacs-lisp/eieio-datadebug.el: Use lexical-binding.
* lisp/emacs-lisp/eieio-opt.el (eieio-build-class-list): Use cl-mapcan.
(eieio-build-class-alist): Use dolist.
(eieio-all-generic-functions): Adjust to use of hashtables.
* lisp/emacs-lisp/eieio.el (child-of-class-p): Fix case where `class' is
`eieio-default-superclass'.
* test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
Remove use of eieio-generic-call-methodname.
(eieio-test-method-order-list-3, eieio-test-method-order-list-6)
(eieio-test-method-order-list-7, eieio-test-method-order-list-8):
Adjust the expected result accordingly.
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
Prefer \' to $.
2014-12-22 15:13:02 -05:00
|
|
|
|
(dolist (elem sublst)
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(setq buildlist (eieio-build-class-alist
|
* lisp/emacs-lisp/eieio*.el: Use hashtables rather than obarrays
* lisp/emacs-lisp/eieio-core.el (class): Rename field symbol-obarray to
symbol-hashtable. It contains a hashtable instead of an obarray.
(generic-p): Use symbol property `eieio-method-hashtable' instead of
`eieio-method-obarray'.
(generic-primary-only-p, generic-primary-only-one-p):
Slight optimization.
(eieio-defclass-autoload-map): Use a hashtable instead of an obarray.
(eieio-defclass-autoload, eieio-defclass): Adjust/simplify accordingly.
(eieio-class-un-autoload): Use autoload-do-load.
(eieio-defclass): Use dolist, cl-pushnew, cl-callf.
Use new cl-deftype-satisfies. Adjust to use of hashtables.
Don't hardcode the value of eieio--object-num-slots.
(eieio-defgeneric-form-primary-only-one): Remove `doc-string' arg.
Use a closure rather than a backquoted lambda.
(eieio--defmethod): Adjust call accordingly. Set doc-string via the
function-documentation property.
(eieio-slot-originating-class-p, eieio-slot-name-index)
(eieiomt--optimizing-hashtable, eieiomt-install, eieiomt-add)
(eieio-generic-form): Adjust to use of hashtables.
(eieiomt--sym-optimize): Rename from eieiomt-sym-optimize; take
additional class argument.
(eieio-generic-call-methodname): Remove, unused.
* lisp/emacs-lisp/eieio-custom.el: Use lexical-binding.
(eieio-object-value-to-abstract): Simplify.
* lisp/emacs-lisp/eieio-datadebug.el: Use lexical-binding.
* lisp/emacs-lisp/eieio-opt.el (eieio-build-class-list): Use cl-mapcan.
(eieio-build-class-alist): Use dolist.
(eieio-all-generic-functions): Adjust to use of hashtables.
* lisp/emacs-lisp/eieio.el (child-of-class-p): Fix case where `class' is
`eieio-default-superclass'.
* test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
Remove use of eieio-generic-call-methodname.
(eieio-test-method-order-list-3, eieio-test-method-order-list-6)
(eieio-test-method-order-list-7, eieio-test-method-order-list-8):
Adjust the expected result accordingly.
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
Prefer \' to $.
2014-12-22 15:13:02 -05:00
|
|
|
|
elem instantiable-only buildlist)))
|
2009-09-28 00:49:54 +00:00
|
|
|
|
buildlist))
|
|
|
|
|
|
|
|
|
|
(defvar eieio-read-class nil
|
|
|
|
|
"History of the function `eieio-read-class' prompt.")
|
|
|
|
|
|
|
|
|
|
(defun eieio-read-class (prompt &optional histvar instantiable-only)
|
|
|
|
|
"Return a class chosen by the user using PROMPT.
|
|
|
|
|
Optional argument HISTVAR is a variable to use as history.
|
|
|
|
|
If INSTANTIABLE-ONLY is non nil, only allow names of classes which
|
|
|
|
|
are not abstract."
|
|
|
|
|
(intern (completing-read prompt (eieio-build-class-alist nil instantiable-only)
|
|
|
|
|
nil t nil
|
|
|
|
|
(or histvar 'eieio-read-class))))
|
|
|
|
|
|
|
|
|
|
(defun eieio-read-subclass (prompt class &optional histvar instantiable-only)
|
|
|
|
|
"Return a class chosen by the user using PROMPT.
|
|
|
|
|
CLASS is the base class, and completion occurs across all subclasses.
|
|
|
|
|
Optional argument HISTVAR is a variable to use as history.
|
|
|
|
|
If INSTANTIABLE-ONLY is non nil, only allow names of classes which
|
|
|
|
|
are not abstract."
|
|
|
|
|
(intern (completing-read prompt
|
|
|
|
|
(eieio-build-class-alist class instantiable-only)
|
|
|
|
|
nil t nil
|
|
|
|
|
(or histvar 'eieio-read-class))))
|
|
|
|
|
|
|
|
|
|
;;; METHOD COMPLETION / DOC
|
|
|
|
|
|
EIEIO: Simplify help hyperlinks; Try and reduce hardcoding in .elc
* lisp/emacs-lisp/cl-generic.el (cl--generic-search-method): Fix regexp.
* lisp/emacs-lisp/eieio-core.el (eieio--check-type): Remove.
Use cl-check-type everywhere instead.
(eieio-class-object): Remove, use find-class instead when needed.
(class-p): Don't inline.
(eieio-object-p): Check more thoroughly, so we don't treat cl-structs,
such as eieio classes, as objects. Don't inline.
(object-p): Mark as obsolete.
(eieio-defclass-autoload, eieio-defclass-internal, eieio-oref)
(eieio--generic-tagcode): Avoid `class-p'.
(eieio-make-class-predicate, eieio-make-child-predicate): New functions.
(eieio-defclass-internal): Use current-load-list rather than
`class-location'.
* lisp/emacs-lisp/eieio-opt.el (eieio-help-class, eieio-help-constructor):
Use find-lisp-object-file-name, help-fns-short-filename and new calling
convention for eieio-class-def.
(eieio-build-class-list): Remove function, unused.
(eieio-method-def): Remove button type, unused.
(eieio-class-def): Inherit from help-function-def.
(eieio--defclass-regexp): New constant.
(find-function-regexp-alist): Use it.
(eieio--specializers-apply-to-class-p): Handle eieio--static as well.
(eieio-help-find-method-definition, eieio-help-find-class-definition):
Remove functions.
* lisp/emacs-lisp/eieio.el (defclass): Use new eieio-make-class-predicate
and eieio-make-child-predicate.
(eieio-class-parents): Use eieio--class-object.
(slot-boundp, find-class, eieio-override-prin1): Avoid class-p.
(slot-exists-p): Use find-class.
* test/automated/eieio-tests.el (eieio-test-23-inheritance-check): Simplify.
2015-01-31 00:48:14 -05:00
|
|
|
|
|
2011-02-18 00:00:08 -08:00
|
|
|
|
;;;###autoload
|
2014-01-08 22:30:12 +01:00
|
|
|
|
(defun eieio-help-constructor (ctr)
|
|
|
|
|
"Describe CTR if it is a class constructor."
|
|
|
|
|
(when (class-p ctr)
|
|
|
|
|
(erase-buffer)
|
2015-07-07 02:14:16 -04:00
|
|
|
|
(let ((location (find-lisp-object-file-name ctr 'define-type))
|
2014-01-08 22:30:12 +01:00
|
|
|
|
(def (symbol-function ctr)))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(prin1 ctr)
|
|
|
|
|
(insert (format " is an %s object constructor function"
|
|
|
|
|
(if (autoloadp def)
|
|
|
|
|
"autoloaded"
|
|
|
|
|
"")))
|
|
|
|
|
(when (and (autoloadp def)
|
|
|
|
|
(null location))
|
|
|
|
|
(setq location
|
|
|
|
|
(find-lisp-object-file-name ctr def)))
|
|
|
|
|
(when location
|
2015-08-23 13:42:04 +02:00
|
|
|
|
(insert (substitute-command-keys " in ‘"))
|
2014-01-08 22:30:12 +01:00
|
|
|
|
(help-insert-xref-button
|
EIEIO: Simplify help hyperlinks; Try and reduce hardcoding in .elc
* lisp/emacs-lisp/cl-generic.el (cl--generic-search-method): Fix regexp.
* lisp/emacs-lisp/eieio-core.el (eieio--check-type): Remove.
Use cl-check-type everywhere instead.
(eieio-class-object): Remove, use find-class instead when needed.
(class-p): Don't inline.
(eieio-object-p): Check more thoroughly, so we don't treat cl-structs,
such as eieio classes, as objects. Don't inline.
(object-p): Mark as obsolete.
(eieio-defclass-autoload, eieio-defclass-internal, eieio-oref)
(eieio--generic-tagcode): Avoid `class-p'.
(eieio-make-class-predicate, eieio-make-child-predicate): New functions.
(eieio-defclass-internal): Use current-load-list rather than
`class-location'.
* lisp/emacs-lisp/eieio-opt.el (eieio-help-class, eieio-help-constructor):
Use find-lisp-object-file-name, help-fns-short-filename and new calling
convention for eieio-class-def.
(eieio-build-class-list): Remove function, unused.
(eieio-method-def): Remove button type, unused.
(eieio-class-def): Inherit from help-function-def.
(eieio--defclass-regexp): New constant.
(find-function-regexp-alist): Use it.
(eieio--specializers-apply-to-class-p): Handle eieio--static as well.
(eieio-help-find-method-definition, eieio-help-find-class-definition):
Remove functions.
* lisp/emacs-lisp/eieio.el (defclass): Use new eieio-make-class-predicate
and eieio-make-child-predicate.
(eieio-class-parents): Use eieio--class-object.
(slot-boundp, find-class, eieio-override-prin1): Avoid class-p.
(slot-exists-p): Use find-class.
* test/automated/eieio-tests.el (eieio-test-23-inheritance-check): Simplify.
2015-01-31 00:48:14 -05:00
|
|
|
|
(help-fns-short-filename location)
|
2015-07-07 02:14:16 -04:00
|
|
|
|
'cl-type-definition ctr location 'define-type)
|
2015-08-23 13:42:04 +02:00
|
|
|
|
(insert (substitute-command-keys "’")))
|
2014-01-08 22:30:12 +01:00
|
|
|
|
(insert ".\nCreates an object of class " (symbol-name ctr) ".")
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(if (autoloadp def)
|
|
|
|
|
(insert "\n\n[Class description not available until class definition is loaded.]\n")
|
|
|
|
|
(save-excursion
|
|
|
|
|
(insert (propertize "\n\nClass description:\n" 'face 'bold))
|
|
|
|
|
(eieio-help-class ctr))
|
|
|
|
|
))))
|
|
|
|
|
|
2009-09-28 00:49:54 +00:00
|
|
|
|
|
|
|
|
|
;;; METHOD STATS
|
|
|
|
|
;;
|
|
|
|
|
;; Dump out statistics about all the active methods in a session.
|
|
|
|
|
(defun eieio-display-method-list ()
|
|
|
|
|
"Display a list of all the methods and what features are used."
|
|
|
|
|
(interactive)
|
2015-07-07 02:14:16 -04:00
|
|
|
|
(let* ((meth1 (cl--generic-all-functions))
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(meth (sort meth1 (lambda (a b)
|
|
|
|
|
(string< (symbol-name a)
|
|
|
|
|
(symbol-name b)))))
|
|
|
|
|
(buff (get-buffer-create "*EIEIO Method List*"))
|
|
|
|
|
(methidx 0)
|
|
|
|
|
(standard-output buff)
|
|
|
|
|
(slots '(method-static
|
|
|
|
|
method-before
|
|
|
|
|
method-primary
|
|
|
|
|
method-after
|
|
|
|
|
method-generic-before
|
|
|
|
|
method-generic-primary
|
|
|
|
|
method-generic-after))
|
|
|
|
|
(slotn '("static"
|
|
|
|
|
"before"
|
|
|
|
|
"primary"
|
|
|
|
|
"after"
|
|
|
|
|
"G bef"
|
|
|
|
|
"G prim"
|
|
|
|
|
"G aft"))
|
|
|
|
|
(idxarray (make-vector (length slots) 0))
|
|
|
|
|
(primaryonly 0)
|
|
|
|
|
(oneprimary 0)
|
|
|
|
|
)
|
|
|
|
|
(switch-to-buffer-other-window buff)
|
|
|
|
|
(erase-buffer)
|
|
|
|
|
(dolist (S slotn)
|
|
|
|
|
(princ S)
|
|
|
|
|
(princ "\t")
|
|
|
|
|
)
|
|
|
|
|
(princ "Method Name")
|
|
|
|
|
(terpri)
|
|
|
|
|
(princ "--------------------------------------------------------------------")
|
|
|
|
|
(terpri)
|
|
|
|
|
(dolist (M meth)
|
|
|
|
|
(let ((mtree (get M 'eieio-method-tree))
|
|
|
|
|
(P nil) (numP)
|
|
|
|
|
(!P nil))
|
|
|
|
|
(dolist (S slots)
|
|
|
|
|
(let ((num (length (aref mtree (symbol-value S)))))
|
|
|
|
|
(aset idxarray (symbol-value S)
|
|
|
|
|
(+ num (aref idxarray (symbol-value S))))
|
|
|
|
|
(prin1 num)
|
|
|
|
|
(princ "\t")
|
|
|
|
|
(when (< 0 num)
|
|
|
|
|
(if (eq S 'method-primary)
|
|
|
|
|
(setq P t numP num)
|
|
|
|
|
(setq !P t)))
|
|
|
|
|
))
|
|
|
|
|
;; Is this a primary-only impl method?
|
|
|
|
|
(when (and P (not !P))
|
|
|
|
|
(setq primaryonly (1+ primaryonly))
|
|
|
|
|
(when (= numP 1)
|
|
|
|
|
(setq oneprimary (1+ oneprimary))
|
|
|
|
|
(princ "*"))
|
|
|
|
|
(princ "* ")
|
|
|
|
|
)
|
|
|
|
|
(prin1 M)
|
|
|
|
|
(terpri)
|
|
|
|
|
(setq methidx (1+ methidx))
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
(princ "--------------------------------------------------------------------")
|
|
|
|
|
(terpri)
|
|
|
|
|
(dolist (S slots)
|
|
|
|
|
(prin1 (aref idxarray (symbol-value S)))
|
|
|
|
|
(princ "\t")
|
|
|
|
|
)
|
|
|
|
|
(prin1 methidx)
|
|
|
|
|
(princ " Total symbols")
|
|
|
|
|
(terpri)
|
|
|
|
|
(dolist (S slotn)
|
|
|
|
|
(princ S)
|
|
|
|
|
(princ "\t")
|
|
|
|
|
)
|
|
|
|
|
(terpri)
|
|
|
|
|
(terpri)
|
|
|
|
|
(princ "Methods Primary Only: ")
|
|
|
|
|
(prin1 primaryonly)
|
|
|
|
|
(princ "\t")
|
2015-07-31 10:12:37 -07:00
|
|
|
|
(princ (format "%d" (floor (* 100.0 primaryonly) methidx)))
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(princ "% of total methods")
|
|
|
|
|
(terpri)
|
|
|
|
|
(princ "Only One Primary Impl: ")
|
|
|
|
|
(prin1 oneprimary)
|
|
|
|
|
(princ "\t")
|
2015-07-31 10:12:37 -07:00
|
|
|
|
(princ (format "%d" (floor (* 100.0 oneprimary) primaryonly)))
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(princ "% of total primary methods")
|
|
|
|
|
(terpri)
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
;;; SPEEDBAR SUPPORT
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
(defvar eieio-class-speedbar-key-map nil
|
|
|
|
|
"Keymap used when working with a project in speedbar.")
|
|
|
|
|
|
|
|
|
|
(defun eieio-class-speedbar-make-map ()
|
2009-10-05 15:32:08 +00:00
|
|
|
|
"Make a keymap for EIEIO under speedbar."
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(setq eieio-class-speedbar-key-map (speedbar-make-specialized-keymap))
|
|
|
|
|
|
|
|
|
|
;; General viewing stuff
|
|
|
|
|
(define-key eieio-class-speedbar-key-map "\C-m" 'speedbar-edit-line)
|
|
|
|
|
(define-key eieio-class-speedbar-key-map "+" 'speedbar-expand-line)
|
|
|
|
|
(define-key eieio-class-speedbar-key-map "-" 'speedbar-contract-line)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
(if eieio-class-speedbar-key-map
|
|
|
|
|
nil
|
|
|
|
|
(if (not (featurep 'speedbar))
|
|
|
|
|
(add-hook 'speedbar-load-hook (lambda ()
|
|
|
|
|
(eieio-class-speedbar-make-map)
|
|
|
|
|
(speedbar-add-expansion-list
|
|
|
|
|
'("EIEIO"
|
|
|
|
|
eieio-class-speedbar-menu
|
|
|
|
|
eieio-class-speedbar-key-map
|
|
|
|
|
eieio-class-speedbar))))
|
|
|
|
|
(eieio-class-speedbar-make-map)
|
|
|
|
|
(speedbar-add-expansion-list '("EIEIO"
|
|
|
|
|
eieio-class-speedbar-menu
|
|
|
|
|
eieio-class-speedbar-key-map
|
|
|
|
|
eieio-class-speedbar))))
|
|
|
|
|
|
|
|
|
|
(defvar eieio-class-speedbar-menu
|
|
|
|
|
()
|
|
|
|
|
"Menu part in easymenu format used in speedbar while in `eieio' mode.")
|
|
|
|
|
|
* lisp/emacs-lisp/eieio*.el: Use hashtables rather than obarrays
* lisp/emacs-lisp/eieio-core.el (class): Rename field symbol-obarray to
symbol-hashtable. It contains a hashtable instead of an obarray.
(generic-p): Use symbol property `eieio-method-hashtable' instead of
`eieio-method-obarray'.
(generic-primary-only-p, generic-primary-only-one-p):
Slight optimization.
(eieio-defclass-autoload-map): Use a hashtable instead of an obarray.
(eieio-defclass-autoload, eieio-defclass): Adjust/simplify accordingly.
(eieio-class-un-autoload): Use autoload-do-load.
(eieio-defclass): Use dolist, cl-pushnew, cl-callf.
Use new cl-deftype-satisfies. Adjust to use of hashtables.
Don't hardcode the value of eieio--object-num-slots.
(eieio-defgeneric-form-primary-only-one): Remove `doc-string' arg.
Use a closure rather than a backquoted lambda.
(eieio--defmethod): Adjust call accordingly. Set doc-string via the
function-documentation property.
(eieio-slot-originating-class-p, eieio-slot-name-index)
(eieiomt--optimizing-hashtable, eieiomt-install, eieiomt-add)
(eieio-generic-form): Adjust to use of hashtables.
(eieiomt--sym-optimize): Rename from eieiomt-sym-optimize; take
additional class argument.
(eieio-generic-call-methodname): Remove, unused.
* lisp/emacs-lisp/eieio-custom.el: Use lexical-binding.
(eieio-object-value-to-abstract): Simplify.
* lisp/emacs-lisp/eieio-datadebug.el: Use lexical-binding.
* lisp/emacs-lisp/eieio-opt.el (eieio-build-class-list): Use cl-mapcan.
(eieio-build-class-alist): Use dolist.
(eieio-all-generic-functions): Adjust to use of hashtables.
* lisp/emacs-lisp/eieio.el (child-of-class-p): Fix case where `class' is
`eieio-default-superclass'.
* test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
Remove use of eieio-generic-call-methodname.
(eieio-test-method-order-list-3, eieio-test-method-order-list-6)
(eieio-test-method-order-list-7, eieio-test-method-order-list-8):
Adjust the expected result accordingly.
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
Prefer \' to $.
2014-12-22 15:13:02 -05:00
|
|
|
|
(defun eieio-class-speedbar (_dir-or-object _depth)
|
2009-09-28 00:49:54 +00:00
|
|
|
|
"Create buttons in speedbar that represents the current project.
|
2009-10-05 15:32:08 +00:00
|
|
|
|
DIR-OR-OBJECT is the object to expand, or nil, and DEPTH is the
|
|
|
|
|
current expansion depth."
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(when (eq (point-min) (point-max))
|
|
|
|
|
;; This function is only called once, to start the whole deal.
|
2014-01-05 22:25:30 -08:00
|
|
|
|
;; Create and expand the default object.
|
2015-01-08 15:47:32 -05:00
|
|
|
|
(eieio-class-button 'eieio-default-superclass 0)
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(forward-line -1)
|
|
|
|
|
(speedbar-expand-line)))
|
|
|
|
|
|
|
|
|
|
(defun eieio-class-button (class depth)
|
|
|
|
|
"Draw a speedbar button at the current point for CLASS at DEPTH."
|
EIEIO: Simplify help hyperlinks; Try and reduce hardcoding in .elc
* lisp/emacs-lisp/cl-generic.el (cl--generic-search-method): Fix regexp.
* lisp/emacs-lisp/eieio-core.el (eieio--check-type): Remove.
Use cl-check-type everywhere instead.
(eieio-class-object): Remove, use find-class instead when needed.
(class-p): Don't inline.
(eieio-object-p): Check more thoroughly, so we don't treat cl-structs,
such as eieio classes, as objects. Don't inline.
(object-p): Mark as obsolete.
(eieio-defclass-autoload, eieio-defclass-internal, eieio-oref)
(eieio--generic-tagcode): Avoid `class-p'.
(eieio-make-class-predicate, eieio-make-child-predicate): New functions.
(eieio-defclass-internal): Use current-load-list rather than
`class-location'.
* lisp/emacs-lisp/eieio-opt.el (eieio-help-class, eieio-help-constructor):
Use find-lisp-object-file-name, help-fns-short-filename and new calling
convention for eieio-class-def.
(eieio-build-class-list): Remove function, unused.
(eieio-method-def): Remove button type, unused.
(eieio-class-def): Inherit from help-function-def.
(eieio--defclass-regexp): New constant.
(find-function-regexp-alist): Use it.
(eieio--specializers-apply-to-class-p): Handle eieio--static as well.
(eieio-help-find-method-definition, eieio-help-find-class-definition):
Remove functions.
* lisp/emacs-lisp/eieio.el (defclass): Use new eieio-make-class-predicate
and eieio-make-child-predicate.
(eieio-class-parents): Use eieio--class-object.
(slot-boundp, find-class, eieio-override-prin1): Avoid class-p.
(slot-exists-p): Use find-class.
* test/automated/eieio-tests.el (eieio-test-23-inheritance-check): Simplify.
2015-01-31 00:48:14 -05:00
|
|
|
|
(cl-check-type class class)
|
2015-07-02 10:59:32 -04:00
|
|
|
|
(let ((subclasses (eieio--class-children (cl--find-class class))))
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(if subclasses
|
|
|
|
|
(speedbar-make-tag-line 'angle ?+
|
|
|
|
|
'eieio-sb-expand
|
|
|
|
|
class
|
|
|
|
|
(symbol-name class)
|
|
|
|
|
'eieio-describe-class-sb
|
|
|
|
|
class
|
|
|
|
|
'speedbar-directory-face
|
|
|
|
|
depth)
|
|
|
|
|
(speedbar-make-tag-line 'angle ? nil nil
|
|
|
|
|
(symbol-name class)
|
|
|
|
|
'eieio-describe-class-sb
|
|
|
|
|
class
|
|
|
|
|
'speedbar-directory-face
|
|
|
|
|
depth))))
|
|
|
|
|
|
|
|
|
|
(defun eieio-sb-expand (text class indent)
|
|
|
|
|
"For button TEXT, expand CLASS at the current location.
|
|
|
|
|
Argument INDENT is the depth of indentation."
|
|
|
|
|
(cond ((string-match "+" text) ;we have to expand this file
|
|
|
|
|
(speedbar-change-expand-button-char ?-)
|
|
|
|
|
(speedbar-with-writable
|
|
|
|
|
(save-excursion
|
|
|
|
|
(end-of-line) (forward-char 1)
|
2015-07-02 10:59:32 -04:00
|
|
|
|
(let ((subclasses (eieio--class-children (cl--find-class class))))
|
2009-09-28 00:49:54 +00:00
|
|
|
|
(while subclasses
|
|
|
|
|
(eieio-class-button (car subclasses) (1+ indent))
|
|
|
|
|
(setq subclasses (cdr subclasses)))))))
|
|
|
|
|
((string-match "-" text) ;we have to contract this node
|
|
|
|
|
(speedbar-change-expand-button-char ?+)
|
|
|
|
|
(speedbar-delete-subblock indent))
|
|
|
|
|
(t (error "Ooops... not sure what to do")))
|
|
|
|
|
(speedbar-center-buffer-smartly))
|
|
|
|
|
|
* lisp/emacs-lisp/eieio*.el: Use hashtables rather than obarrays
* lisp/emacs-lisp/eieio-core.el (class): Rename field symbol-obarray to
symbol-hashtable. It contains a hashtable instead of an obarray.
(generic-p): Use symbol property `eieio-method-hashtable' instead of
`eieio-method-obarray'.
(generic-primary-only-p, generic-primary-only-one-p):
Slight optimization.
(eieio-defclass-autoload-map): Use a hashtable instead of an obarray.
(eieio-defclass-autoload, eieio-defclass): Adjust/simplify accordingly.
(eieio-class-un-autoload): Use autoload-do-load.
(eieio-defclass): Use dolist, cl-pushnew, cl-callf.
Use new cl-deftype-satisfies. Adjust to use of hashtables.
Don't hardcode the value of eieio--object-num-slots.
(eieio-defgeneric-form-primary-only-one): Remove `doc-string' arg.
Use a closure rather than a backquoted lambda.
(eieio--defmethod): Adjust call accordingly. Set doc-string via the
function-documentation property.
(eieio-slot-originating-class-p, eieio-slot-name-index)
(eieiomt--optimizing-hashtable, eieiomt-install, eieiomt-add)
(eieio-generic-form): Adjust to use of hashtables.
(eieiomt--sym-optimize): Rename from eieiomt-sym-optimize; take
additional class argument.
(eieio-generic-call-methodname): Remove, unused.
* lisp/emacs-lisp/eieio-custom.el: Use lexical-binding.
(eieio-object-value-to-abstract): Simplify.
* lisp/emacs-lisp/eieio-datadebug.el: Use lexical-binding.
* lisp/emacs-lisp/eieio-opt.el (eieio-build-class-list): Use cl-mapcan.
(eieio-build-class-alist): Use dolist.
(eieio-all-generic-functions): Adjust to use of hashtables.
* lisp/emacs-lisp/eieio.el (child-of-class-p): Fix case where `class' is
`eieio-default-superclass'.
* test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
Remove use of eieio-generic-call-methodname.
(eieio-test-method-order-list-3, eieio-test-method-order-list-6)
(eieio-test-method-order-list-7, eieio-test-method-order-list-8):
Adjust the expected result accordingly.
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
Prefer \' to $.
2014-12-22 15:13:02 -05:00
|
|
|
|
(defun eieio-describe-class-sb (_text token _indent)
|
2009-09-28 00:49:54 +00:00
|
|
|
|
"Describe the class TEXT in TOKEN.
|
|
|
|
|
INDENT is the current indentation level."
|
Small speedbar-related clean-up
* lisp/dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape):
Remove unnecessary declarations.
(dframe-message): Doc fix.
* lisp/info.el (dframe-select-attached-frame, dframe-current-frame):
Declare.
* lisp/speedbar.el (speedbar-message): Make it an obsolete alias.
Update all callers.
(speedbar-with-attached-buffer)
(speedbar-maybee-jump-to-attached-frame): Make these aliases obsolete.
(speedbar-with-writable): Use backquote.
* lisp/emacs-lisp/eieio-opt.el (eieio-describe-class-sb):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-handle-click):
Use dframe-with-attached-buffer, dframe-maybee-jump-to-attached-frame
rather than speedbar- aliases.
* lisp/mail/rmail.el: Load dframe rather than speedbar when compiling.
(speedbar-make-specialized-keymap, speedbar-insert-button)
(dframe-select-attached-frame, dframe-maybee-jump-to-attached-frame)
(speedbar-do-function-pointer): Declare.
(rmail-speedbar-button, rmail-speedbar-find-file)
(rmail-speedbar-move-message):
Use dframe-with-attached-buffer rather than speedbar- alias.
* lisp/progmodes/gud.el: Load dframe rather than speedbar when compiling.
(dframe-message, speedbar-make-specialized-keymap)
(speedbar-add-expansion-list, speedbar-mode-functions-list)
(speedbar-make-tag-line, speedbar-remove-localized-speedbar-support)
(speedbar-insert-button, dframe-select-attached-frame)
(dframe-maybee-jump-to-attached-frame)
(speedbar-change-initial-expansion-list)
(speedbar-previously-used-expansion-list-name): Declare.
(gud-speedbar-item-info, gud-gdb-goto-stackframe):
Use dframe-message, dframe-with-attached-buffer rather than
speedbar- aliases.
(gud-sentinel): Silence compiler.
* lisp/progmodes/vhdl-mode.el (speedbar-refresh)
(speedbar-do-function-pointer, speedbar-add-supported-extension)
(speedbar-add-mode-functions-list, speedbar-make-specialized-keymap)
(speedbar-change-initial-expansion-list, speedbar-add-expansion-list)
(speedbar-extension-list-to-regex, speedbar-directory-buttons)
(speedbar-file-lists, speedbar-make-tag-line)
(speedbar-line-directory, speedbar-goto-this-file)
(speedbar-center-buffer-smartly, speedbar-change-expand-button-char)
(speedbar-delete-subblock, speedbar-position-cursor-on-line)
(speedbar-make-button, speedbar-reset-scanners)
(speedbar-files-item-info, speedbar-line-text)
(speedbar-find-file-in-frame, speedbar-set-timer)
(dframe-maybee-jump-to-attached-frame, speedbar-line-file): Declare.
(speedbar-with-writable): Do not (re)define it.
(vhdl-speedbar-find-file): Use dframe-maybee-jump-to-attached-frame
rather than speedbar- alias.
* lisp/cedet/ede/speedbar.el (ede-file-find, ede-tag-find):
* lisp/cedet/semantic/sb.el (semantic-sb-token-jump):
Use dframe-maybee-jump-to-attached-frame rather than speedbar- alias.
* lisp/mh-e/mh-speed.el (mh-speed-view):
Use dframe-with-attached-buffer rather than speedbar- alias.
2013-05-21 20:13:56 -07:00
|
|
|
|
(dframe-with-attached-buffer
|
2014-01-08 22:30:12 +01:00
|
|
|
|
(describe-function token))
|
Small speedbar-related clean-up
* lisp/dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape):
Remove unnecessary declarations.
(dframe-message): Doc fix.
* lisp/info.el (dframe-select-attached-frame, dframe-current-frame):
Declare.
* lisp/speedbar.el (speedbar-message): Make it an obsolete alias.
Update all callers.
(speedbar-with-attached-buffer)
(speedbar-maybee-jump-to-attached-frame): Make these aliases obsolete.
(speedbar-with-writable): Use backquote.
* lisp/emacs-lisp/eieio-opt.el (eieio-describe-class-sb):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-handle-click):
Use dframe-with-attached-buffer, dframe-maybee-jump-to-attached-frame
rather than speedbar- aliases.
* lisp/mail/rmail.el: Load dframe rather than speedbar when compiling.
(speedbar-make-specialized-keymap, speedbar-insert-button)
(dframe-select-attached-frame, dframe-maybee-jump-to-attached-frame)
(speedbar-do-function-pointer): Declare.
(rmail-speedbar-button, rmail-speedbar-find-file)
(rmail-speedbar-move-message):
Use dframe-with-attached-buffer rather than speedbar- alias.
* lisp/progmodes/gud.el: Load dframe rather than speedbar when compiling.
(dframe-message, speedbar-make-specialized-keymap)
(speedbar-add-expansion-list, speedbar-mode-functions-list)
(speedbar-make-tag-line, speedbar-remove-localized-speedbar-support)
(speedbar-insert-button, dframe-select-attached-frame)
(dframe-maybee-jump-to-attached-frame)
(speedbar-change-initial-expansion-list)
(speedbar-previously-used-expansion-list-name): Declare.
(gud-speedbar-item-info, gud-gdb-goto-stackframe):
Use dframe-message, dframe-with-attached-buffer rather than
speedbar- aliases.
(gud-sentinel): Silence compiler.
* lisp/progmodes/vhdl-mode.el (speedbar-refresh)
(speedbar-do-function-pointer, speedbar-add-supported-extension)
(speedbar-add-mode-functions-list, speedbar-make-specialized-keymap)
(speedbar-change-initial-expansion-list, speedbar-add-expansion-list)
(speedbar-extension-list-to-regex, speedbar-directory-buttons)
(speedbar-file-lists, speedbar-make-tag-line)
(speedbar-line-directory, speedbar-goto-this-file)
(speedbar-center-buffer-smartly, speedbar-change-expand-button-char)
(speedbar-delete-subblock, speedbar-position-cursor-on-line)
(speedbar-make-button, speedbar-reset-scanners)
(speedbar-files-item-info, speedbar-line-text)
(speedbar-find-file-in-frame, speedbar-set-timer)
(dframe-maybee-jump-to-attached-frame, speedbar-line-file): Declare.
(speedbar-with-writable): Do not (re)define it.
(vhdl-speedbar-find-file): Use dframe-maybee-jump-to-attached-frame
rather than speedbar- alias.
* lisp/cedet/ede/speedbar.el (ede-file-find, ede-tag-find):
* lisp/cedet/semantic/sb.el (semantic-sb-token-jump):
Use dframe-maybee-jump-to-attached-frame rather than speedbar- alias.
* lisp/mh-e/mh-speed.el (mh-speed-view):
Use dframe-with-attached-buffer rather than speedbar- alias.
2013-05-21 20:13:56 -07:00
|
|
|
|
(dframe-maybee-jump-to-attached-frame))
|
2009-09-28 00:49:54 +00:00
|
|
|
|
|
|
|
|
|
(provide 'eieio-opt)
|
|
|
|
|
|
2014-01-09 21:31:21 +01:00
|
|
|
|
;; Local variables:
|
|
|
|
|
;; generated-autoload-file: "eieio.el"
|
|
|
|
|
;; End:
|
|
|
|
|
|
2009-09-28 00:49:54 +00:00
|
|
|
|
;;; eieio-opt.el ends here
|