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

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

[elpa] externals/auctex 486650b 05/43: Update menu in proper timing (bug


From: Tassilo Horn
Subject: [elpa] externals/auctex 486650b 05/43: Update menu in proper timing (bug#38058)
Date: Sat, 11 Apr 2020 15:05:18 -0400 (EDT)

branch: externals/auctex
commit 486650b0ba71e2f25b5ca83087ce8a6be7a94c12
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>

    Update menu in proper timing (bug#38058)
    
    * tex-buf.el (TeX-command-sentinel): Do `force-mode-line-update' in
    the command buffer so that "Next Error" item will appear in the menu
    bar just after compilation.
    Replace all `(set-buffer-modified-p (buffer-modified-p))' with
    `(force-mode-line-update)'
    (TeX-run-command): Remove `sit-for' call which is no longer
    necessary.
---
 tex-buf.el | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 9aaa585..3cc6d54 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1134,8 +1134,7 @@ Return the new process."
          (setq compilation-in-progress (cons process compilation-in-progress))
          process)
       (setq mode-line-process ": run")
-      (set-buffer-modified-p (buffer-modified-p))
-      (sit-for 0)                              ; redisplay
+      (force-mode-line-update)
       (call-process TeX-shell nil buffer nil
                    TeX-shell-command-option command))))
 
@@ -1444,7 +1443,7 @@ reasons.  Use `TeX-run-function' instead."
       (apply TeX-sentinel-function nil name nil)
 
       ;; Force mode line redisplay soon
-      (set-buffer-modified-p (buffer-modified-p)))))
+      (force-mode-line-update))))
 
 (defun TeX-command-sentinel (process msg)
   "Process TeX command output buffer after the process dies."
@@ -1480,10 +1479,15 @@ reasons.  Use `TeX-run-function' instead."
             ;; If buffer and mode line will show that the process
             ;; is dead, we can delete it now.  Otherwise it
             ;; will stay around until M-x list-processes.
-            (delete-process process)
+            (delete-process process))
+
+          ;; Force mode line redisplay soon
+          ;; Do this in the command buffer so that "Next Error" item
+          ;; will appear in the menu bar just after compilation.
+          ;; (bug#38058)
+          (with-current-buffer TeX-command-buffer
+            (force-mode-line-update)))))
 
-            ;; Force mode line redisplay soon
-            (set-buffer-modified-p (buffer-modified-p))))))
   (setq compilation-in-progress (delq process compilation-in-progress)))
 
 
@@ -1944,7 +1948,7 @@ command."
   "Format the mode line for a buffer containing output from PROCESS."
     (setq mode-line-process (concat ": "
                                    (symbol-name (process-status process))))
-    (set-buffer-modified-p (buffer-modified-p)))
+    (force-mode-line-update))
 
 (defun TeX-command-filter (process string)
   "Filter to process normal output."
@@ -1963,7 +1967,7 @@ command."
   "Format the mode line for a buffer containing TeX output from PROCESS."
     (setq mode-line-process (concat " " TeX-current-page ": "
                                    (symbol-name (process-status process))))
-    (set-buffer-modified-p (buffer-modified-p)))
+    (force-mode-line-update))
 
 (defun TeX-format-filter (process string)
   "Filter to process TeX output."



reply via email to

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