1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-16 10:50:49 -08:00
emacs/lisp/cedet/semantic
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
..
analyze * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
bovine ; Fix typos: emacs lisp -> Emacs Lisp 2021-04-16 14:54:02 +02:00
decorate * lisp/**/*.el: Avoid positional args to define-minor-mode 2021-04-11 23:47:14 -04:00
symref Support old BSD find and "root dir symlink" better 2021-06-07 04:52:30 +03:00
wisent Avoid lowering gc-cons-threshold 2021-04-22 04:11:02 +02:00
analyze.el * lisp/cedet/semantic/analyze*.el: Use lexical-binding 2021-02-26 15:19:31 -05:00
bovine.el * lisp/cedet/semantic/bovine.el: Fix recent regression 2021-03-07 19:03:36 -05:00
chart.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
complete.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
ctxt.el
db-debug.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
db-ebrowse.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
db-el.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
db-file.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
db-find.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
db-global.el Remove redundant #' before lambda in cedet 2021-03-30 23:52:50 +02:00
db-javascript.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
db-mode.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
db-ref.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
db-typecache.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
db.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
debug.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
decorate.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
dep.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
doc.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
ede-grammar.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
edit.el Remove redundant #' before lambda in cedet 2021-03-30 23:52:50 +02:00
find.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
format.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
fw.el Remove redundant #' before lambda in cedet 2021-03-30 23:52:50 +02:00
grammar.el Don't version-control generated file grammat-wy.el 2021-04-12 22:10:38 -04:00
grm-wy-boot.el ; Auto-commit of loaddefs files. 2021-05-01 06:29:15 -07:00
html.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
ia-sb.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
ia.el * lisp/cedet/semantic/ia.el (semantic-ia-complete-symbol): Simplify 2021-03-20 20:39:01 -04:00
idle.el * lisp/**/*.el: Avoid positional args to define-minor-mode 2021-04-11 23:47:14 -04:00
imenu.el Remove redundant #' before lambda in cedet 2021-03-30 23:52:50 +02:00
java.el Remove redundant #' before lambda in cedet 2021-03-30 23:52:50 +02:00
lex-spp.el Remove redundant #' before lambda in cedet 2021-03-30 23:52:50 +02:00
lex.el Remove redundant #' before lambda in cedet 2021-03-30 23:52:50 +02:00
mru-bookmark.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
sb.el Prefer declare over a put of list-indent-function. 2021-02-22 11:54:17 -05:00
scope.el * lisp/cedet: Remove always-nil variables 2021-03-11 13:21:22 -05:00
senator.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
sort.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
symref.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
tag-file.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
tag-ls.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
tag-write.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
tag.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
texi.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
util-modes.el Remove redundant #' before lambda in cedet 2021-03-30 23:52:50 +02:00
util.el * lisp/cedet: Convert remaining files to lexical-binding 2021-03-15 00:08:34 -04:00
wisent.el Delete empty "History" sections 2021-03-30 15:50:26 +02:00