emacs/lisp/vc
Stefan Monnier 0d827c7f52 * lisp/emacs-lisp/pcase.el: Fix bug#46786
Revert commit a218c98615, but in order
to avoid the spurious warnings that this commit tried to squash,
keep track of the vars used during the match so as to add
corresponding annotations to explicitly silence the spurious warnings.

To do this, we change the VARS used in `pcase-u` (and throughout
the pcase code): they used to hold elements of the form (NAME . VAL)
and now they hold elements of the form (NAME VAL . USED).

(pcase--expand): Bind all vars instead of only those found via fgrep.
(pcase-codegen): Silence "unused var" warnings for those vars that have
already been referenced during the match itself.
(pcase--funcall, pcase--eval): Record the vars that are used.
(pcase--u1): Record the vars that are used via non-linear patterns.

* lisp/textmodes/mhtml-mode.el (mhtml-forward):
* lisp/vc/diff-mode.el (diff-goto-source): Silence newly
discovered warnings.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-bug46786): New test.
2021-03-01 15:35:51 -05:00
..
add-log.el Convert change-log-mode menu to easy-menu-define 2021-02-27 03:14:04 +01:00
compare-w.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
cvs-status.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
diff-mode.el * lisp/emacs-lisp/pcase.el: Fix bug#46786 2021-03-01 15:35:51 -05:00
diff.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
ediff-diff.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
ediff-help.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
ediff-hook.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ediff-init.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
ediff-merg.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
ediff-mult.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
ediff-ptch.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ediff-util.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
ediff-vers.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ediff-wind.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
ediff.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
emerge.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
log-edit.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
log-view.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
pcvs-defs.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
pcvs-info.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
pcvs-parse.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
pcvs-util.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
pcvs.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
smerge-mode.el make smerge-vc-next-conflict wrap around 2021-02-16 12:49:53 +01:00
vc-annotate.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-bzr.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-cvs.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-dav.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-dir.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-dispatcher.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-filewise.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-git.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-hg.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-hooks.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-mtn.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-rcs.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-sccs.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-src.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc-svn.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00
vc.el lisp/vc/*.el: Use lexical-bindings in all the files 2021-02-26 16:51:15 -05:00