emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex b0bf9ea 43/95: Partially revert previous commit,


From: Tassilo Horn
Subject: [elpa] externals/auctex b0bf9ea 43/95: Partially revert previous commit, will look better later
Date: Sun, 16 Apr 2017 01:26:52 -0400 (EDT)

branch: externals/auctex
commit b0bf9ea57ffd6271e2c3116e3e91609bfe602bd1
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]