1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-03 11:33:37 +00:00
emacs/lisp/cedet/ede
Stefan Monnier 4c6554413d EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior
Change docs to advertize `slot-value` rather than `oref`.
Change the implementation of `:initform` to better match the CLOS semantics,
while preserving the EIEIO semantics, but warn when encountering cases
where the two diverge.
Demote the mostly unused special semantics of `oref-default`
on non-class allocated slots.

* doc/misc/eieio.texi (Quick Start): Use `slot-value`.
(Accessing Slots): Move `slot-value` before `oref`.
Fix paren-typo in example (reported by pillule <pillule@riseup.net>).
(Introspection): Remove mention of `class-slot-initarg`.

* lisp/transient.el (transient--parse-group, transient--parse-suffix):
Don't use `oref-default` to get the default value.
(transient-lisp-variable): Init forms are evaluated.

* lisp/emacs-lisp/eieio.el (defclass): Warn about inapplicable
`:initarg` and about uses of init forms that are ambiguous.
(oref): Don't advertize the deprecated use of initargs as slot names.
(oref-default): Don't advertize the deprecated case where it returns the
initform's value.
(initialize-instance): Use `macroexp-const-p`.
* lisp/emacs-lisp/eieio-core.el (eieio--unbound): Rename from
`eieio-unbound`.
(eieio--unbound-form): New var.
(eieio--slot-override): Use it.
(eieio-defclass-internal): Use it.  Change `init` so it should always
be evaluated.
(eieio--known-class-slot-names): New var.
(eieio--eval-default-p): Rename from `eieio-eval-default-p`.
(eieio--perform-slot-validation-for-default): Use `macroexp-const-p` to
decide whether to skip the test.
(eieio--add-new-slot): Register slot in `eieio--known-class-slot-names`
when applicable.
(eieio-oref-default, eieio-oset-default): Add warning for unknown slots
and slots not known to be allocated to the class.
(eieio-default-eval-maybe): Delete function.  Use just `eval` instead.
(eieio-declare-slots): Allow slots to specify their allocation class.

* lisp/cedet/srecode/insert.el (point): Declare the slot instead of
moving the class definition before the slot's first use.
(srecode-template-inserter-point, srecode-insert-fcn):
Use nil instead of unbound for the `point` slot.

* lisp/cedet/srecode/compile.el (srecode-template-inserter):
Declare the `key` slot that all children should have.

* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar)
(eieio-speedbar-directory-button, eieio-speedbar-file-button):
* lisp/emacs-lisp/eieio-custom.el (eieio-widget-test-class):
* lisp/emacs-lisp/chart.el (chart-bar):
* lisp/cedet/semantic/ede-grammar.el (semantic-ede-proj-target-grammar):
* lisp/cedet/semantic/db.el (semanticdb-project-database):
* lisp/cedet/semantic/db-javascript.el (semanticdb-table-javascript)
(semanticdb-project-database-javascript):
* lisp/cedet/semantic/db-el.el (semanticdb-table-emacs-lisp)
(semanticdb-project-database-emacs-lisp):
* lisp/cedet/semantic/db-ebrowse.el (semanticdb-table-ebrowse)
(semanticdb-project-database-ebrowse):
* lisp/cedet/ede/proj.el (ede-proj-project):
* lisp/cedet/ede/proj-obj.el (ede-proj-target-makefile-objectcode):
* lisp/cedet/ede/generic.el (ede-generic-project):
* lisp/cedet/ede/config.el (ede-project-with-config):
* lisp/cedet/ede/base.el (ede-target, ede-project):
* lisp/auth-source.el (auth-source-backend): Init forms are evaluated,
so quote them accordingly.
2021-06-12 16:22:03 -04:00
..
auto.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
autoconf-edit.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
base.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
config.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
cpp-root.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
custom.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
detect.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
dired.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
emacs.el Drop XEmacs and SXEmacs support from EDE 2021-02-11 21:41:58 +01:00
files.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
generic.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
linux.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
locate.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
make.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
makefile-edit.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
pconf.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
pmake.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
proj-archive.el Use lexical-binding in various ede files 2021-02-11 21:41:58 +01:00
proj-aux.el Use lexical-binding in various ede files 2021-02-11 21:41:58 +01:00
proj-comp.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
proj-elisp.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
proj-info.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
proj-misc.el Use lexical-binding in various ede files 2021-02-11 21:41:58 +01:00
proj-obj.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
proj-prog.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
proj-scheme.el Use lexical-binding in various ede files 2021-02-11 21:41:58 +01:00
proj-shared.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
proj.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
project-am.el * lisp/cedet: Remove always-nil variables 2021-03-11 13:21:22 -05:00
shell.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
simple.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
source.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
speedbar.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00
srecode.el Use lexical-binding in various ede files 2021-02-11 21:41:58 +01:00
system.el Use lexical-binding in various ede files 2021-02-11 21:41:58 +01:00
util.el * lisp/cedet/{*.el,ede/*.el}: Use lexical-binding 2021-03-12 11:32:42 -05:00