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

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

[elpa] elpa 1c397d5 29/51: Fix TeX-error-overview-make-entries


From: Tassilo Horn
Subject: [elpa] elpa 1c397d5 29/51: Fix TeX-error-overview-make-entries
Date: Sun, 22 May 2016 07:22:49 +0000 (UTC)

branch: elpa
commit 1c397d50161c6f6ce45879e9a94b4c773acfc502
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    Fix TeX-error-overview-make-entries
    
    * tex-buf.el (TeX-error-overview-make-entries): Add `active-buffer'
      optional argument.  If `TeX-error-overview-open-after-TeX-run' is
      non-nil and there is an error, TeX sentinels run this function but
      `TeX-error-overview-active-buffer' hadn’t been initialized yet.  Fixes
      bug#23318.
---
 tex-buf.el |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index f3a83d2..92d3dea 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1367,7 +1367,7 @@ errors or warnings to show."
            (TeX-parse-all-errors))
        (if (and TeX-error-overview-open-after-TeX-run
                 (TeX-error-overview-make-entries
-                 (TeX-master-directory)))
+                 (TeX-master-directory) (TeX-active-buffer)))
            (TeX-error-overview)))
     (message (concat name ": formatted " (TeX-current-pages)))
     (let (dvi2pdf)
@@ -1474,7 +1474,7 @@ errors or warnings to show."
       (TeX-parse-all-errors))
   (if (and TeX-error-overview-open-after-TeX-run
           (TeX-error-overview-make-entries
-           (TeX-master-directory)))
+           (TeX-master-directory) (TeX-active-buffer)))
       (TeX-error-overview))
   (cond ((TeX-TeX-sentinel-check process name))
        ((and (save-excursion
@@ -3373,10 +3373,13 @@ please restart TeX error overview")))
       (message "No more errors.")
       (beep))))
 
-(defun TeX-error-overview-make-entries (&optional master-dir)
+(defun TeX-error-overview-make-entries (&optional master-dir active-buffer)
   "Generate the list of errors to be printed using `tabulated-list-entries'.
-Write file names relative to MASTER-DIR when they are not absolute."
-  (with-current-buffer TeX-error-overview-active-buffer
+Write file names relative to MASTER-DIR when they are not absolute.
+
+ACTIVE-BUFFER is used as buffer from which to extract the list of
+errors.  If nil, defaults to `TeX-error-overview-active-buffer'."
+  (with-current-buffer (or active-buffer TeX-error-overview-active-buffer)
     (let ((id 0)
          type file line msg entries)
       (mapc



reply via email to

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