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

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

[elpa] 197/299: Fix C-x ` (next-error) for compile commands.


From: Stefan Monnier
Subject: [elpa] 197/299: Fix C-x ` (next-error) for compile commands.
Date: Sun, 02 Nov 2014 03:11:24 +0000

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

commit 24f35445038ba1972b1cd2c8224fbed29921d544
Author: Tassilo Horn <address@hidden>
Date:   Mon Nov 11 09:21:11 2013 +0100

    Fix C-x ` (next-error) for compile commands.
    
    * tex-buf.el (TeX-next-error, TeX-previous-error): Call
    `next-error' also if last TeX command was a compile command (e.g.,
    Check, ChkTeX).
    (TeX-run-compile): Save compilation buffer in
    `TeX-command-buffer'.
---
 ChangeLog  |    8 ++++++++
 tex-buf.el |   10 +++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c97e020..540262c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-11-11  Tassilo Horn  <address@hidden>
+
+       * tex-buf.el (TeX-next-error, TeX-previous-error): Call
+       `next-error' also if last TeX command was a compile command (e.g.,
+       Check, ChkTeX).
+       (TeX-run-compile): Save compilation buffer in
+       `TeX-command-buffer'.
+
 2013-11-10  Ralf Angeli  <address@hidden>
 
        * bib-cite.el (bib-highlight-mouse): Change regexp to cope with
diff --git a/tex-buf.el b/tex-buf.el
index 2e313a4..efc19b5 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -270,7 +270,9 @@ the master file."
   "Find the next error in the TeX output buffer.
 With \\[universal-argument] prefix, start from the beginning of the errors."
   (interactive "P")
-  (if (null (TeX-active-buffer))
+  (if (or (null (TeX-active-buffer))
+         (eq 'compilation-mode (with-current-buffer TeX-command-buffer
+                                 major-mode)))
       (next-error reparse)
     (funcall (with-current-buffer TeX-command-buffer
               (TeX-process-get-variable (TeX-active-master) 
'TeX-parse-function))
@@ -279,7 +281,9 @@ With \\[universal-argument] prefix, start from the 
beginning of the errors."
 (defun TeX-previous-error (arg)
   "Find the previous error in the TeX output buffer."
   (interactive "P")
-  (if (null (TeX-active-buffer))
+  (if (or (null (TeX-active-buffer))
+         (eq 'compilation-mode (with-current-buffer TeX-command-buffer
+                                 major-mode)))
       (previous-error arg)
     (error "Jumping to previous error not supported")))
 
@@ -687,7 +691,7 @@ run of `TeX-run-TeX', use
 (defun TeX-run-compile (name command file)
   "Ignore first and third argument, start compile with second argument."
   (let ((default-directory (TeX-master-directory)))
-    (compile command)))
+    (setq TeX-command-buffer (compile command))))
 
 (defun TeX-run-shell (name command file)
   "Ignore first and third argument, start shell-command with second argument."



reply via email to

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