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

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

[elpa] master b0a946d 052/173: company-clang--start-process: Only erase


From: Dmitry Gutov
Subject: [elpa] master b0a946d 052/173: company-clang--start-process: Only erase buffer when there's no existing process
Date: Thu, 23 Jun 2016 00:28:37 +0000 (UTC)

branch: master
commit b0a946db2c40c4cdba58d4a61b42468db7823ba5
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    company-clang--start-process: Only erase buffer when there's no existing 
process
    
    Fixes #368
---
 company-clang.el |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/company-clang.el b/company-clang.el
index d0e2b84..369f4a9 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -203,11 +203,11 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
         (buf (get-buffer-create "*clang-output*"))
         ;; Looks unnecessary in Emacs 25.1 and later.
         (process-adaptive-read-buffering nil))
-    (with-current-buffer buf
-      (erase-buffer)
-      (setq buffer-undo-list t))
     (if (get-buffer-process buf)
         (funcall callback nil)
+      (with-current-buffer buf
+        (erase-buffer)
+        (setq buffer-undo-list t))
       (let ((process (apply #'start-process "company-clang" buf
                             company-clang-executable args)))
         (set-process-sentinel



reply via email to

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