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

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

[elpa] 132/299: Fix `TeX-next-error'.


From: Stefan Monnier
Subject: [elpa] 132/299: Fix `TeX-next-error'.
Date: Sun, 02 Nov 2014 03:10:53 +0000

monnier pushed a commit to branch externals/auctex
in repository elpa.

commit 6a40b3820b0ad58edd12303999c4c6bdd36f0eae
Author: Tassilo Horn <address@hidden>
Date:   Tue Jun 11 10:14:51 2013 +0200

    Fix `TeX-next-error'.
    
    * tex-buf.el (TeX-help-error): Let-bind `inhibit-read-only' when
    updating the *TeX Help* buffer.
---
 ChangeLog  |    5 +++++
 tex-buf.el |   59 ++++++++++++++++++++++++++++++-----------------------------
 2 files changed, 35 insertions(+), 29 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7cff52a..238f97f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-11  Tassilo Horn  <address@hidden>
+
+       * tex-buf.el (TeX-help-error): Let-bind `inhibit-read-only' when
+       updating the *TeX Help* buffer.
+
 2013-06-11  Mos´┐Ż Giordano  <address@hidden>
 
        * latex.el (TeX-after-document-hook): New hook.
diff --git a/tex-buf.el b/tex-buf.el
index 1c3212b..4a83e8f 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1753,35 +1753,36 @@ You might want to examine and modify the free variables 
`file',
       (setq TeX-error-pointer (+ TeX-error-pointer 1)))
 
     (TeX-pop-to-buffer (get-buffer-create "*TeX Help*") nil t)
-    (erase-buffer)
-    (insert "ERROR: " error
-           "\n\n--- TeX said ---"
-           output
-           "\n--- HELP ---\n"
-           (let ((help (cdr (nth TeX-error-pointer
-                                 TeX-error-description-list))))
-             (save-excursion
-               (if (and (string= help "No help available")
-                        (let* ((log-buffer (find-buffer-visiting log-file)))
-                          (if log-buffer
-                              (progn
-                                (set-buffer log-buffer)
-                                (revert-buffer t t))
-                            (setq log-buffer
-                                  (find-file-noselect log-file))
-                            (set-buffer log-buffer))
-                          (auto-save-mode nil)
-                          (setq buffer-read-only t)
-                          (goto-char (point-min))
-                          (search-forward error nil t 1))
-                        (re-search-forward "^l\\." nil t)
-                        (re-search-forward "^ [^\n]+$" nil t))
-                   (let ((start (1+ (point))))
-                     (forward-char 1)
-                     (re-search-forward "^$")
-                     (concat "From the .log file...\n\n"
-                             (buffer-substring start (point))))
-                 help))))
+    (let ((inhibit-read-only t))
+      (erase-buffer)
+      (insert "ERROR: " error
+             "\n\n--- TeX said ---"
+             output
+             "\n--- HELP ---\n"
+             (let ((help (cdr (nth TeX-error-pointer
+                                   TeX-error-description-list))))
+               (save-excursion
+                 (if (and (string= help "No help available")
+                          (let* ((log-buffer (find-buffer-visiting log-file)))
+                            (if log-buffer
+                                (progn
+                                  (set-buffer log-buffer)
+                                  (revert-buffer t t))
+                              (setq log-buffer
+                                    (find-file-noselect log-file))
+                              (set-buffer log-buffer))
+                            (auto-save-mode nil)
+                            (setq buffer-read-only t)
+                            (goto-char (point-min))
+                            (search-forward error nil t 1))
+                          (re-search-forward "^l\\." nil t)
+                          (re-search-forward "^ [^\n]+$" nil t))
+                     (let ((start (1+ (point))))
+                       (forward-char 1)
+                       (re-search-forward "^$")
+                       (concat "From the .log file...\n\n"
+                               (buffer-substring start (point))))
+                   help)))))
     (goto-char (point-min))
     (TeX-special-mode)
     (TeX-pop-to-buffer old-buffer nil t)))



reply via email to

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