mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
* 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.
This commit is contained in:
parent
08b11a02f4
commit
0d827c7f52
4 changed files with 45 additions and 26 deletions
|
|
@ -313,7 +313,7 @@ Prefix arg specifies how many times to move (default 1)."
|
|||
(interactive "P")
|
||||
(pcase (get-text-property (point) 'mhtml-submode)
|
||||
('nil (sgml-skip-tag-forward arg))
|
||||
(submode (forward-sexp arg))))
|
||||
(_submode (forward-sexp arg))))
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode mhtml-mode html-mode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue