emacs/lisp/emacs-lisp
Stefan Monnier bd017175d4 Simplify type hierarchy operations
Now that built-in types have classes that describe their
relationships exactly like struct/eieio/oclosure classes,
we can the code that navigates that DAG.

* lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): Move to
`eieio-core.el`.
(cl--generic-type-specializers): Rename from
`cl--generic-struct-specializers`.  Make it work for any class.
(cl--generic-typeof-generalizer, cl--generic-oclosure-generalizer): Use it.
(cl--generic-struct-generalizer): Delete generalizer.
(cl-generic-generalizers :extra "cl-struct"): Delete method.
(prefill 0 cl--generic-generalizer): Move to after the typeof.
(cl-generic-generalizers :extra "typeof"): Rewrite to use
classes rather than `cl--all-builtin-types`.
(cl-generic--oclosure-specializers): Delete function.

* lisp/emacs-lisp/cl-preloaded.el (cl--direct-supertypes-of-type)
(cl--typeof-types, cl--all-builtin-types): Delete constants.

* lisp/emacs-lisp/comp-cstr.el (comp--typeof-builtin-types):
Delete constant.
(comp--cl-class-hierarchy): Simplify.
(comp--compute-typeof-types): Simplify now that
`comp--cl-class-hierarchy` and `comp--all-classes` work for built-in
types as well.
(comp--direct-supertypes): Just use `cl--class-parents`.
(comp-supertypes): Simplify since typeof-types should now be complete.

* lisp/emacs-lisp/eieio-core.el (eieio-defclass-autoload):
Use `superclasses` argument, so we can find parents before it's loaded.
(eieio--class-precedence-c3, eieio--class-precedence-dfs):
Don't add a `eieio-default-superclass` parent any more.
(eieio--class/struct-parents): Delete function.
(eieio--class-precedence-bfs): Use `eieio--class-parents` instead.
Don't stop when reaching `eieio-default-superclass`.
(cl--generic-struct-tag): Move from `cl-generic.el`.
2024-03-08 02:04:59 -05:00
..
advice.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
avl-tree.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
backquote.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
backtrace.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
benchmark.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
bindat.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
byte-opt.el Repair miscompilation of single-arg apply (bug#69533) 2024-03-04 14:13:26 +01:00
byte-run.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
bytecomp.el Single string literal in body is return value only, not doc string 2024-03-07 13:47:53 +01:00
cconv.el Grudgingly accept function values in the function position 2024-02-05 18:02:19 +01:00
chart.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
check-declare.el Do not attempt to check declarations in lock files 2024-02-20 22:49:07 +01:00
checkdoc.el Use obarray-make instead of make-vector to create obarrays 2024-02-23 13:02:27 +01:00
cl-extra.el cl-preloaded.el (built-in-class): New type 2024-03-08 02:03:55 -05:00
cl-generic.el Simplify type hierarchy operations 2024-03-08 02:04:59 -05:00
cl-indent.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-lib.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-macs.el * lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Add 'symbol-with-pos'. 2024-02-28 20:44:32 +01:00
cl-preloaded.el Simplify type hierarchy operations 2024-03-08 02:04:59 -05:00
cl-print.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-seq.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
comp-common.el Add a proper type for obarrays 2024-02-23 13:02:27 +01:00
comp-cstr.el Simplify type hierarchy operations 2024-03-08 02:04:59 -05:00
comp-run.el Improve documentation of recent changes in comp-run.el 2024-02-29 15:37:19 +02:00
comp.el * lisp/emacs-lisp/comp.el (comp-known-predicates): Add 'symbol-with-pos-p'. 2024-02-28 20:44:24 +01:00
compat.el Add the public API of Compat to the core 2024-02-11 22:50:29 +01:00
copyright.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
crm.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cursor-sensor.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
debug-early.el (backtrace-on-redisplay-error): Use handler-bind 2024-01-04 16:37:01 -05:00
debug.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
derived.el derived.el: Delete old code (bug#68625) 2024-01-29 19:04:59 -05:00
disass.el disass.el (disassemble-1): Minor simplification 2024-03-04 23:42:50 -05:00
easy-mmode.el * lisp/emacs-lisp/easy-mmode.el (easy-mmode--mode-docstring): Add comment 2024-02-03 18:22:41 -05:00
easymenu.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
edebug.el (edebug-signal): Simplify 2024-02-05 10:13:56 -05:00
eieio-base.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio-core.el Simplify type hierarchy operations 2024-03-08 02:04:59 -05:00
eieio-custom.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio-datadebug.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio-opt.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio-speedbar.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio.el eieio-core.el: Always put a parent in the parents of a class 2024-03-08 02:04:59 -05:00
eldoc.el Use obarray-make instead of make-vector to create obarrays 2024-02-23 13:02:27 +01:00
elint.el Take file-local variables into account in elint-file (bug#69076) 2024-02-14 08:54:04 +01:00
elp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ert-font-lock.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
ert-x.el Complete change of ert-remote-temporary-file-directory 2024-01-06 18:15:23 +01:00
ert.el ert.el: Use handler-bind to record backtraces 2024-01-04 16:33:25 -05:00
ewoc.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
faceup.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
find-func.el Make find-function-regexp also find transient-define-* 2024-02-20 13:58:32 +01:00
float-sup.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
generate-lisp-file.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
generator.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
generic.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
gv.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
helper.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
hierarchy.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
icons.el Fix documentation of icon-elements 2024-01-14 17:03:16 +02:00
inline.el * lisp/emacs-lisp/inline.el (inline-const-val): Improve docstring 2024-01-30 13:14:32 -05:00
let-alist.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
lisp-mnt.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
lisp-mode.el * lisp/subr.el (with-output-to-temp-buffer): Add indent rule 2024-02-09 14:13:29 -05:00
lisp.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
loaddefs-gen.el Allow trivially autoloading uses of transient's define macros 2024-02-20 22:04:51 +01:00
macroexp.el (macroexp--with-extended-form-stack): Use plain let 2024-01-04 16:35:53 -05:00
map-ynp.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
map.el * lisp/emacs-lisp/map.el (map--make-pcase-bindings): Fix use in Emacs<30 2024-02-21 08:49:15 -05:00
memory-report.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
multisession.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
nadvice.el Set the 'name' prop in 'define-advice' 2024-01-13 11:43:01 +02:00
oclosure.el * lisp/emacs-lisp/oclosure.el (oclosure): Make it a subtype of function 2024-03-08 02:04:11 -05:00
package-vc.el Merge from origin/emacs-29 2024-02-17 04:54:48 -05:00
package-x.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
package.el Tolerate errors while recompiling all packages 2024-02-11 22:50:29 +01:00
pcase.el Merge from origin/emacs-29 2024-02-24 06:35:16 -05:00
pp.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
radix-tree.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
range.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
re-builder.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
regexp-opt.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
regi.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ring.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
rmc.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
rx.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
seq.el (pcase): New _ syntax in pred/app functions 2024-02-11 22:00:44 -05:00
shadow.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
shortdoc.el Add a proper type for obarrays 2024-02-23 13:02:27 +01:00
shorthands.el Improve shorthands-font-lock-shorthands (bug#67390) 2024-02-03 08:40:03 -06:00
smie.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
subr-x.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
syntax.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
tabulated-list.el Add tabulated-list-groups and Buffer-menu-group-by (bug#69305) 2024-02-29 19:50:04 +02:00
tcover-ses.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
testcover.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
text-property-search.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
thunk.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
timer-list.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
timer.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
tq.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
trace.el Merge from origin/emacs-29 2024-02-10 05:07:56 -05:00
unsafep.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
vtable.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
warnings.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00