1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-24 07:20:29 +00:00

Revert "org-texinfo--match-definition: Drop redundant `save-match-data'"

This reverts commit e32bd5f7c7.

This is `pcase-let*', not `pcase', so the arguments are _all_
evaluated and match data must be preserved in the ARGS binding.

Link: https://yhetil.org/emacs-devel/877cp8bkpa.fsf@bernoul.li
This commit is contained in:
Ihor Radchenko 2023-09-02 20:07:07 +03:00
parent 21654e9a44
commit dbf415b840
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -668,9 +668,9 @@ The car is the command and the cdr is its arguments."
(string-match org-texinfo--definition-command-regexp tag)
(pcase-let*
((cmd (car (rassoc (match-string-no-properties 1 tag)
org-texinfo--definition-command-alist)))
org-texinfo--definition-command-alist)))
(`(,cmd ,category)
(and cmd (split-string cmd " ")))
(and cmd (save-match-data (split-string cmd " "))))
(args (match-string-no-properties 2 tag)))
(cons cmd (if category (concat category " " args) args))))))