emacs/lisp/emacs-lisp
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
..
advice.el Rename feature nativecomp' into native-compile' 2021-05-05 22:27:29 +02:00
autoload.el Merge remote-tracking branch 'savannah/master' into native-comp 2021-02-17 22:26:28 +01:00
avl-tree.el Doc fixes in avl-tree.el 2021-04-28 19:36:42 +03:00
backquote.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
backtrace.el (backtrace-goto-source-functions): Make it a normal abnormal hook 2021-02-13 10:41:45 -05:00
benchmark.el * lisp/emacs-lisp/benchmark.el (benchmark-elapse): Tweak 2021-06-11 14:06:29 -04:00
bindat.el * lisp/emacs-lisp/bindat.el: Allow non-fixed size of strz 2021-04-15 11:28:06 -04:00
byte-opt.el Constant-propagate (function SYMBOL) 2021-06-03 21:28:10 +02:00
byte-run.el Merge commit '9cbdf20316' into native-comp 2021-03-09 10:03:47 +01:00
bytecomp.el Rename batch-byte-native-compile-for-bootstrap (bug#48743) 2021-06-01 18:11:37 +02:00
cconv.el ; Fix typos: emacs lisp -> Emacs Lisp 2021-04-16 14:54:02 +02:00
chart.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
check-declare.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
checkdoc.el * lisp/**/*.el: Avoid positional args to define-minor-mode 2021-04-11 23:47:14 -04:00
cl-extra.el Fix misuses of byte-compile-macro-environment 2021-03-01 12:18:49 -05:00
cl-generic.el ; Fix some typos in doc strings and manuals 2021-04-24 18:26:07 +02:00
cl-indent.el ; Fix typos: emacs lisp -> Emacs Lisp 2021-04-16 14:54:02 +02:00
cl-lib.el * lisp/emacs-lisp/macroexp.el (macroexp-file-name): New function. 2021-02-24 13:52:45 -05:00
cl-macs.el * lisp/emacs-lisp/cl-macs.el (cl-loop): Add missing 'when' to spec 2021-05-22 13:17:00 +02:00
cl-preloaded.el Fix copyright years by hand 2021-01-01 00:33:28 -08:00
cl-print.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
cl-seq.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
comp-cstr.el * Improve `comp-normalize-valset' reproducibility (bug#48021) 2021-04-29 21:07:07 +02:00
comp.el * Add `native-compile-target-directory' (bug#48743) 2021-06-01 18:12:20 +02:00
copyright.el Allow years in a copyright range to be separated by en dashes. 2021-05-25 14:04:06 +02:00
crm.el Use lexical-binding in all of lisp/emacs-lisp 2021-01-28 14:42:21 -05:00
cursor-sensor.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
debug.el * lisp/emacs-lisp/debug.el (debug): Fix (bug#47588) 2021-04-18 01:03:43 -04:00
derived.el Introduce an :interactive keyword for `defined-derived-mode' 2021-02-14 12:58:20 +01:00
disass.el Merge remote-tracking branch 'savannah/master' into HEAD 2021-01-02 10:11:15 +01:00
easy-mmode.el * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix bug#47925 2021-04-20 19:40:09 -04:00
easymenu.el Clarify obsoletion messages for easy-menu-{add,remove} 2021-04-07 14:33:10 +02:00
edebug.el Reintroduce autoloads for edebug-all-defs/edebug-all-forms 2021-05-09 11:47:01 +02:00
eieio-base.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
eieio-compat.el * lisp/emacs-lisp/edebug.el (edebug--handle-&-spec-op <&name>): New method 2021-02-13 16:21:53 -05:00
eieio-core.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
eieio-custom.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
eieio-datadebug.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
eieio-opt.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
eieio-speedbar.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
eieio.el EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior 2021-06-12 16:22:03 -04:00
eldoc.el Look for ElDoc buffer in all visible frames 2021-05-18 16:31:19 +01:00
elint.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
elp.el ; End recently added sentences with a period. 2021-06-01 20:21:51 +01:00
ert-x.el Fix a few Edebug specifications where code is wrapped in lambdas. 2021-05-17 10:09:43 +02:00
ert.el Fix duplicate ":" in ert-find-test-other-window prompt 2021-03-10 04:34:53 +01:00
ewoc.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
faceup.el ; Remove some useless comments 2021-04-16 14:54:02 +02:00
find-func.el * lisp/emacs-lisp/package.el: Fix use of find-library-name 2021-04-26 18:40:09 -04:00
float-sup.el * lisp/emacs-lisp/float-sup.el (pi): Actually mark it as obsolete 2021-04-12 12:53:53 -04:00
generator.el Fix copyright lines mistakenly treated as outline headers 2021-03-18 23:32:57 -04:00
generic.el Prefer defvar-local in emacs-lisp/*.el 2021-01-31 14:55:53 +01:00
gv.el Fix a few Edebug specifications where code is wrapped in lambdas. 2021-05-17 10:09:43 +02:00
helper.el Use lexical-binding in all of lisp/emacs-lisp 2021-01-28 14:42:21 -05:00
hierarchy.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
inline.el * lisp/emacs-lisp/cconv.el: Improve line-nb info of unused var warnings 2021-02-26 20:24:52 -05:00
let-alist.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
lisp-mnt.el ; Remove some useless comments 2021-04-16 14:54:02 +02:00
lisp-mode.el * lisp/emacs-lisp/lisp-mode.el (lisp-outline-level): Fix imprecise numbers. 2021-05-18 23:35:57 +03:00
lisp.el Don't signal scan-error in interactive sexp-based commands 2021-04-30 17:31:20 +02:00
macroexp.el * lisp/**/*.el: Avoid positional args to define-minor-mode 2021-04-11 23:47:14 -04:00
map-ynp.el Merge from origin/emacs-27 2021-04-25 09:16:09 -07:00
map.el Make (setf (map-elt ...)) return the value in the alist/plist cases 2021-05-06 13:32:04 +02:00
memory-report.el * lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Simplify 2021-04-12 12:55:52 -04:00
nadvice.el Fix a few Edebug specifications where code is wrapped in lambdas. 2021-05-17 10:09:43 +02:00
package-x.el * lisp/gnus/gnus-art.el: Fix misuse of standard-value. 2021-02-02 14:39:28 -05:00
package.el Fix a few Edebug specifications where code is wrapped in lambdas. 2021-05-17 10:09:43 +02:00
pcase.el * lisp/emacs-lisp/pcase.el (pcase-compile-patterns): New function (bug#47261) 2021-03-19 17:42:22 -04:00
pp.el Merge from origin/emacs-27 2021-05-04 07:50:25 -07:00
radix-tree.el * lisp/emacs-lisp/pcase.el (pcase-defmacro): Fix pcase-tests-macro 2021-03-03 18:40:03 -05:00
re-builder.el ; Fix recent re-builder doc changes. 2021-05-08 15:07:38 +01:00
regexp-opt.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
regi.el Use lexical-binding in all of lisp/emacs-lisp 2021-01-28 14:42:21 -05:00
ring.el ; Remove some useless comments 2021-04-16 14:54:02 +02:00
rmc.el Fix a recent change in rmc.el 2021-05-07 17:09:44 +03:00
rx.el ; * lisp/emacs-lisp/rx.el (rx--pcase-macroexpander): slight rephrase 2021-05-29 09:18:01 +02:00
seq.el Remove local uniquify functions in favour of seq-uniq 2021-04-05 15:14:19 +02:00
shadow.el Use lexical-binding in all of lisp/emacs-lisp 2021-01-28 14:42:21 -05:00
shortdoc.el Add a new documentation group for overlays 2021-05-30 06:41:52 +02:00
smie.el * lisp/emacs-lisp/smie.el: Fix URL. Remove redundant :group args 2021-04-12 13:01:06 -04:00
subr-x.el * lisp/emacs-lisp/subr-x.el (if-let*, if-let): Use looser Edebug spec 2021-05-22 10:21:59 -04:00
syntax.el Give 'syntax-propertize-wholelines' a docstring. 2021-05-30 22:38:48 +02:00
tabulated-list.el Don't preserve window-line in tabulated-list-print 2021-04-09 18:25:08 +02:00
tcover-ses.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
testcover.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
text-property-search.el Even further `text-property-search-forward' clarifications 2021-05-12 19:01:53 +02:00
thunk.el Fix a few Edebug specifications where code is wrapped in lambdas. 2021-05-17 10:09:43 +02:00
timer-list.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
timer.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
tq.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
trace.el * lisp/emacs-lisp/trace.el (trace-values): Work outside of traced function 2021-03-02 09:13:57 -05:00
unsafep.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
warnings.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00