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

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

[elpa] externals/auctex bd723c7 24/71: Cater for corner case when dealin


From: Tassilo Horn
Subject: [elpa] externals/auctex bd723c7 24/71: Cater for corner case when dealing with TeX error
Date: Fri, 17 Dec 2021 15:00:29 -0500 (EST)

branch: externals/auctex
commit bd723c7405bf5b241350f9c850e3dde793374ed7
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>

    Cater for corner case when dealing with TeX error
    
    * tex-buf.el (TeX-find-display-help): Don't try to open error file
    when it wasn't found.
    Some cleanups.
---
 tex-buf.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 50de4d5..ceafafe 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2698,8 +2698,7 @@ value is not used here."
           ;; Set the value of `TeX-command-buffer' in the next file
           ;; with an error to be displayed to the value it has in the
           ;; current buffer.
-          (with-current-buffer error-file-buffer
-            (setq-local TeX-command-buffer command-buffer))
+          (setq-local TeX-command-buffer command-buffer)
 
           ;; Find the location of the error or warning.
           (when TeX-translate-location-line
@@ -2724,16 +2723,16 @@ value is not used here."
                 (search-forward TeX-translate-location-string nil t))))))
       ;; When the file cannot be determined stay here but issue a
       ;; warning.
-      (message (concat "Could not determine file for "
-                       (cond ((equal type 'error) "error")
-                             (t "warning"))))
+      (message "Could not determine file for %s"
+               (if (eq type 'error) "error" "warning"))
       (beep))
 
     ;; Display the help.
     (cond ((eq TeX-display-help 'expert)
            (TeX-pop-to-buffer runbuf nil t)
            (goto-char error-point)
-           (TeX-pop-to-buffer error-file-buffer nil t))
+           (if error-file-buffer
+               (TeX-pop-to-buffer error-file-buffer nil t)))
           (TeX-display-help
            (TeX-help-error
             TeX-translate-location-error
@@ -2742,7 +2741,7 @@ value is not used here."
               TeX-translate-location-context)
             runbuf type))
           (t
-           (message (concat "! " TeX-translate-location-error))))))
+           (message "! %s" TeX-translate-location-error)))))
 
 (defun TeX-error (&optional store)
   "Display an error.



reply via email to

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