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

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

[nongnu] elpa/idris-mode b35ac9740e 10/14: Use `idris-process-buffer-nam


From: ELPA Syncer
Subject: [nongnu] elpa/idris-mode b35ac9740e 10/14: Use `idris-process-buffer-name` instead of `(idris-buffer-name :process)`
Date: Thu, 1 Dec 2022 08:02:54 -0500 (EST)

branch: elpa/idris-mode
commit b35ac9740edb775de28975591f6e4cbcf75dfc2e
Author: Marek L <nospam.keram@gmail.com>
Commit: Marek L <nospam.keram@gmail.com>

    Use `idris-process-buffer-name` instead of `(idris-buffer-name :process)`
---
 idris-commands.el | 7 +++----
 inferior-idris.el | 9 ++++++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 355b7e6c64..a0b464f2d3 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -947,7 +947,7 @@ type-correct, so loading will fail."
 (defun idris-pop-to-repl ()
   "Go to the REPL, if one is open."
   (interactive)
-  (let ((buf (get-buffer (idris-buffer-name :repl))))
+  (let ((buf (get-buffer idris-repl-buffer-name)))
     (if buf
         (pop-to-buffer buf)
       (error "No Idris REPL buffer is open."))))
@@ -975,8 +975,7 @@ https://github.com/clojure-emacs/cider";
   "Quit the Idris process, cleaning up the state synchronized with Emacs."
   (interactive)
   (setq idris-prover-currently-proving nil)
-  (let* ((pbufname (idris-buffer-name :process))
-         (pbuf (get-buffer pbufname))
+  (let* ((pbuf (get-buffer idris-process-buffer-name))
          (cbuf (get-buffer (idris-buffer-name :connection))))
     (when cbuf
       (when (get-buffer-process cbuf)
@@ -986,7 +985,7 @@ https://github.com/clojure-emacs/cider";
       (when (get-buffer-process pbuf)
         (with-current-buffer pbuf (delete-process nil))) ; delete process 
without asking
       (kill-buffer pbuf)
-      (unless (get-buffer pbufname) (idris-kill-buffers))
+      (unless (get-buffer idris-process-buffer-name) (idris-kill-buffers))
       (setq idris-rex-continuations '())
       (when idris-loaded-region-overlay
         (delete-overlay idris-loaded-region-overlay)
diff --git a/inferior-idris.el b/inferior-idris.el
index 3e31533382..6bb5bbfbd4 100644
--- a/inferior-idris.el
+++ b/inferior-idris.el
@@ -66,6 +66,9 @@
 (defvar idris-connection nil
   "The Idris connection.")
 
+(defvar idris-process-buffer-name (idris-buffer-name :process)
+  "The name of the Idris process buffer.")
+
 (defun idris-version-hook-function (event)
   (pcase event
     (`(:protocol-version ,version ,minor)
@@ -109,12 +112,12 @@ directory variables.")
             (get-buffer-process
              (apply #'make-comint-in-buffer
                     "idris"
-                    (idris-buffer-name :process)
+                    idris-process-buffer-name
                     idris-interpreter-path
                     nil
                     "--ide-mode-socket"
                     command-line-flags)))
-      (with-current-buffer (idris-buffer-name :process)
+      (with-current-buffer idris-process-buffer-name
         (add-hook 'comint-preoutput-filter-functions
                   'idris-process-filter
                   nil
@@ -193,7 +196,7 @@ directory variables.")
 (defun idris-show-process-buffer (string)
   "Show the Idris process buffer if STRING is non-empty."
   (when (> (length string) 0)
-    (pop-to-buffer (get-buffer (idris-buffer-name :process)))))
+    (pop-to-buffer (get-buffer idris-process-buffer-name))))
 
 (defun idris-output-filter (process string)
   "Accept output from the socket and process all complete messages"



reply via email to

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