auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. bd723c7405bf5b241350f


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. bd723c7405bf5b241350f9c850e3dde793374ed7
Date: Sat, 9 Oct 2021 07:17:32 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  bd723c7405bf5b241350f9c850e3dde793374ed7 (commit)
       via  ae2d7efd50ba16bbde5d6f71e593f92827621ca4 (commit)
      from  9284ac63a7635e2f0d965eb519f20f6e3b6dfaab (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bd723c7405bf5b241350f9c850e3dde793374ed7
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date:   Thu Sep 23 06:01:16 2021 +0900

    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.

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.

commit ae2d7efd50ba16bbde5d6f71e593f92827621ca4
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date:   Thu Sep 23 05:49:19 2021 +0900

    Silence compiler warning
    
    * tex-buf.el (TeX-parse-TeX):
    (TeX-error-overview-goto-source):
    Don't let-bind `default-major-mode'.
    (TeX-find-display-help): Fall back to the major mode of command
    buffer.

diff --git a/tex-buf.el b/tex-buf.el
index a36bda8..50de4d5 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2434,8 +2434,6 @@ If REPARSE is non-nil, reparse the output log.
 If the file occurs in an included file, the file is loaded (if not
 already in an Emacs buffer) and the cursor is placed at the error."
   (let ((old-buffer (current-buffer))
-        ;; FIXME: default-major-mode has been removed in Emacs 26.
-        (default-major-mode major-mode)
         max-index item)
 
     ;; Switch to the output buffer.
@@ -2693,6 +2691,10 @@ value is not used here."
                 (find-file
                  (expand-file-name TeX-translate-location-file
                                    (file-name-directory master))))
+          ;; Use the major mode of `TeX-command-buffer' when visiting
+          ;; the error point.
+          (if (eq major-mode (default-value 'major-mode))
+              (funcall (buffer-local-value 'major-mode command-buffer)))
           ;; 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.
@@ -3141,12 +3143,8 @@ please restart TeX error overview")))
                   TeX-error-last-visited index))
           ;; Find the error and display the help.
           (with-current-buffer TeX-command-buffer
-            ;; For consistency with `TeX-parse-TeX', use the major mode of
-            ;; `TeX-command-buffer' when visiting the error point.
-            ;; FIXME: default-major-mode has been removed in Emacs 26.
-            (let ((default-major-mode major-mode))
-              ;; Find the error and display the help.
-              (apply #'TeX-find-display-help item)))
+            ;; Find the error and display the help.
+            (apply #'TeX-find-display-help item))
           ;; Return to the error overview.
           (if (TeX-error-overview-setup)
               (select-frame TeX-error-overview-frame)

-----------------------------------------------------------------------

Summary of changes:
 tex-buf.el | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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