emacs/lisp/emacs-lisp
Stefan Monnier d1be48fded Edebug: Overload edebug-form-spec even less
The `edebug-form-spec` symbol property was used both to map forms's
head symbol to the corresponding spec, and to map spec element names
to their expansion.

This lead to name conflicts which break instrumentation of examples such as

    (cl-flet ((gate (x) x)) (gate 4))

because of the Edebug spec element `gate`.
So introduce a new symbol property `edebug-elem-spec`.

* lisp/subr.el (def-edebug-elem-spec): New function.

* lisp/emacs-lisp/edebug.el (edebug--get-elem-spec): New function.
(edebug-match-symbol): Use it.
(Core Edebug elems): Put them on `edebug-elem-spec` instead of
`edebug-form-spec`.
(ELisp special forms): Set their `edebug-form-spec` via dolist.
(Other non-core Edebug elems): Use `def-edebug-elem-spec`.
(edebug-\`): Use `declare`.

* lisp/emacs-lisp/pcase.el (pcase-PAT, pcase-FUN, pcase-QPAT):
* lisp/skeleton.el (skeleton-edebug-spec):
* lisp/emacs-lisp/cl-macs.el: Use `def-edebug-elem-spec`.

* test/lisp/emacs-lisp/edebug-tests.el
(edebug-tests--conflicting-internal-names): New test.
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
(edebug-test-code-cl-flet1): New test case.

* doc/lispref/edebug.texi (Specification List): Add `def-edebug-elem-spec`.
(Specification Examples): Use it.

* doc/lispref/loading.texi (Hooks for Loading): Avoid the use of
`def-edebug-spec` in example (better use `debug` declaration).
2021-02-12 19:28:25 -05:00
..
advice.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
autoload.el * lisp/emacs-lisp/autoload.el: Improve last change 2021-01-05 17:57:15 -05:00
avl-tree.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
backquote.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
backtrace.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
benchmark.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
bindat.el Use lexical-binding in all of lisp/emacs-lisp 2021-01-28 14:42:21 -05:00
byte-opt.el Simplify expression in byte-code decompiler 2021-02-12 20:52:05 +01:00
byte-run.el Fix missing file&line info in "Unknown defun property" warnings 2021-01-23 16:04:36 -05:00
bytecomp.el * lisp/emacs-lisp/macroexp.el: Break cycle with bytecomp/byte-opt 2021-02-09 12:02:25 -05:00
cconv.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
chart.el Prefer defvar-local in emacs-lisp/*.el 2021-01-31 14:55:53 +01:00
check-declare.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
checkdoc.el * lisp/emacs-lisp/checkdoc.el: Doc fix; don't mention built-ins. 2021-02-05 02:52:52 +01:00
cl-extra.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
cl-generic.el * lisp/emacs-lisp/cl-generic.el (cl--generic-lambda): Fix last change 2021-01-08 18:28:47 -05:00
cl-indent.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
cl-lib.el Use declare instead of def-edebug-spec in most places 2021-02-12 16:08:01 -05:00
cl-macs.el Edebug: Overload edebug-form-spec even less 2021-02-12 19:28:25 -05: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
copyright.el Update copyright year to 2021 2021-01-01 01:13:56 -08: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 Update copyright year to 2021 2021-01-01 01:13:56 -08:00
derived.el Use lexical-binding in all of lisp/emacs-lisp 2021-01-28 14:42:21 -05:00
disass.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
easy-mmode.el Allow a :variable keyword in define-globalized-minor-mode 2021-02-04 15:22:40 +01:00
easymenu.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
edebug.el Edebug: Overload edebug-form-spec even less 2021-02-12 19:28:25 -05:00
eieio-base.el * lisp/emacs-lisp/eieio-base.el: Silence warnings in last change 2021-01-11 16:44:39 -05:00
eieio-compat.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
eieio-core.el Fix obsolete variable warnings about class names 2021-01-06 10:51:28 +01:00
eieio-custom.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
eieio-datadebug.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
eieio-opt.el Use lexical-binding in all of lisp/emacs-lisp 2021-01-28 14:42:21 -05:00
eieio-speedbar.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
eieio.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
eldoc.el Fix ElDoc setup for eval-expression 2021-02-12 21:28:47 +00:00
elint.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
elp.el Remove some unnecessary references to Emacs 19 2021-02-04 05:28:00 +01:00
ert-x.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ert.el * lisp/emacs-lisp/pcase.el: Add support for not to pred 2021-01-16 14:21:57 -05:00
ewoc.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
faceup.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
find-func.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
float-sup.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
generator.el Avoid a compilation warning in iter-do 2021-02-06 11:31:18 +01:00
generic.el Prefer defvar-local in emacs-lisp/*.el 2021-01-31 14:55:53 +01:00
gv.el * lisp/emacs-lisp/gv.el (gv-place): Simplify 2021-02-11 19:06:30 -05: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 Update copyright year to 2021 2021-01-01 01:13:56 -08:00
let-alist.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
lisp-mnt.el Preserve leading whitespace in `lm-commentary'. 2021-02-09 09:10:45 +01:00
lisp-mode.el Remove some dead, commented out code from lisp-mode.el 2021-02-09 17:03:55 +01:00
lisp.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
macroexp.el * lisp/emacs-lisp/macroexp.el (macroexp--fgrep): Break cycles 2021-02-10 16:06:24 -05:00
map-ynp.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
map.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
memory-report.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
nadvice.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
package-x.el * lisp/gnus/gnus-art.el: Fix misuse of standard-value. 2021-02-02 14:39:28 -05:00
package.el Move the ‘declare’ form before the interactive spec in 10 functions. 2021-01-20 21:19:23 +02:00
pcase.el Edebug: Overload edebug-form-spec even less 2021-02-12 19:28:25 -05:00
pp.el Move all usages of values' to values--store-value' 2021-02-09 09:04:47 +01:00
radix-tree.el * lisp/emacs-lisp/pcase.el: Add support for not to pred 2021-01-16 14:21:57 -05:00
re-builder.el Prefer defvar-local in emacs-lisp/*.el 2021-01-31 14:55:53 +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 Update copyright year to 2021 2021-01-01 01:13:56 -08:00
rmc.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
rx.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
seq.el * lisp/emacs-lisp/seq.el (seq-concatenate): Unautoload (merge fix). 2021-01-15 09:38:20 +00:00
shadow.el Use lexical-binding in all of lisp/emacs-lisp 2021-01-28 14:42:21 -05:00
shortdoc.el Minor shortdoc link improvements 2021-01-10 13:45:44 +01:00
smie.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
subr-x.el * lisp/emacs-lisp/subr-x.el (named-let): New macro 2021-01-20 14:13:15 -05:00
syntax.el Prefer defvar-local in emacs-lisp/*.el 2021-01-31 14:55:53 +01:00
tabulated-list.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
tcover-ses.el ; Minor license statement fixes 2021-02-08 09:10:57 +01:00
testcover.el Fix previous change in testcover.el 2021-02-06 15:04:52 +01:00
text-property-search.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
thunk.el Update copyright year to 2021 2021-01-01 01:13:56 -08: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 Update copyright year to 2021 2021-01-01 01:13:56 -08:00
unsafep.el Use lexical-binding in all of lisp/emacs-lisp 2021-01-28 14:42:21 -05:00
warnings.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00