branch: externals/auctex commit b0bf9ea57ffd6271e2c3116e3e91609bfe602bd1 Author: Mosè Giordano <m...@gnu.org> Commit: Mosè Giordano <m...@gnu.org>
Partially revert previous commit, will look better later * tex-buf.el (TeX-command-expand): Do not error if `string' is nil. This made "View" command unusable. --- tests/tex/command-expansion.el | 5 ----- tex-buf.el | 6 +----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/tex/command-expansion.el b/tests/tex/command-expansion.el index 17759d1..91b3235 100644 --- a/tests/tex/command-expansion.el +++ b/tests/tex/command-expansion.el @@ -36,11 +36,6 @@ (ert-deftest TeX-command-expansion-errors () "Test error handling in `TeX-command-expand'." (should-error - ;; This should prevent an infinite loop. - (let ((TeX-expand-list '(("%(nil)" "nil")))) - (TeX-command-expand "%(nil)" - 'TeX-master-file))) - (should-error ;; This error is actually thrown by `TeX-engine-in-engine-alist', but we want ;; to be sure that `TeX-command-expand' fails when the engine is not valid. (let ((TeX-engine 'non-existing-engine)) diff --git a/tex-buf.el b/tex-buf.el index b893706..6497777 100644 --- a/tex-buf.el +++ b/tex-buf.el @@ -585,11 +585,7 @@ without further expansion." (error "Nonexpansion %s" expansion))))) (if (stringp string) (setq command - (replace-match string t t command)) - ;; If `string' is not a string, `command' will not be updated and - ;; `while' would enter an infinite loop. Prevent it by throwing an - ;; error. - (error "Nonexpansion %s" expansion)))) + (replace-match string t t command))))) command) (defun TeX-check-files (derived originals extensions)