[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idris-mode 195b432903 12/14: Merge pull request #574 from
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idris-mode 195b432903 12/14: Merge pull request #574 from keram/minor-internal-impro |
Date: |
Thu, 1 Dec 2022 08:02:54 -0500 (EST) |
branch: elpa/idris-mode
commit 195b4329032d48586b0b15c24145d0aaa20176c0
Merge: fdbd019cb2 fbe5e363c4
Author: Jan de Muijnck-Hughes <jfdm@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #574 from keram/minor-internal-impro
Apply minor internal improvements
---
Makefile | 2 --
idris-commands.el | 13 ++++++-------
idris-hole-list.el | 3 ---
idris-repl.el | 2 +-
inferior-idris.el | 16 +++++++++++-----
5 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/Makefile b/Makefile
index 5b358093a4..e7daf04452 100644
--- a/Makefile
+++ b/Makefile
@@ -55,8 +55,6 @@ test2: getdeps build
test3: getdeps build
$(BATCHEMACS) -L . \
-eval '(setq idris-interpreter-path (executable-find
"idris2"))' \
- -eval '(setq idris-repl-history-file "idris2-history.eld")' \
- -eval '(setq idris-log-events t)' \
-l ert -l idris-tests3.el -f ert-run-tests-batch-and-exit
clean:
diff --git a/idris-commands.el b/idris-commands.el
index 893abb8a98..3c122775e9 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -268,8 +268,8 @@ A prefix argument forces loading but only up to the current
line."
(when (member 'warnings-tree idris-warnings-printing)
(idris-list-compiler-notes)
(if idris-stay-in-current-window-on-compiler-error
- (display-buffer (idris-buffer-name :notes))
- (pop-to-buffer (idris-buffer-name :notes))))))))
+ (display-buffer idris-notes-buffer-name)
+ (pop-to-buffer idris-notes-buffer-name)))))))
(error "Cannot find file for current buffer")))
(defun idris-view-compiler-log ()
@@ -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,9 +975,8 @@ 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))
- (cbuf (get-buffer (idris-buffer-name :connection))))
+ (let* ((pbuf (get-buffer idris-process-buffer-name))
+ (cbuf (get-buffer idris-connection-buffer-name)))
(when cbuf
(when (get-buffer-process cbuf)
(with-current-buffer cbuf (delete-process nil))) ; delete connection
without asking
@@ -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/idris-hole-list.el b/idris-hole-list.el
index 0a77ce3ab5..47cd36f86d 100644
--- a/idris-hole-list.el
+++ b/idris-hole-list.el
@@ -73,9 +73,6 @@ Invoces `idris-hole-list-mode-hook'."
"Return the Idris hole buffer, creating one if there is not one"
(get-buffer-create idris-hole-list-buffer-name))
-(defun idris-hole-list-buffer-visible-p ()
- (if (get-buffer-window idris-hole-list-buffer-name 'visible) t nil))
-
(defun idris-hole-list-show (hole-info)
(if (null hole-info)
(progn (message "No holes found!")
diff --git a/idris-repl.el b/idris-repl.el
index 81d10d366c..5aa6f8cdb8 100644
--- a/idris-repl.el
+++ b/idris-repl.el
@@ -323,7 +323,7 @@ Invokes `idris-repl-mode-hook'."
"Apply semantic highlighting to the REPL input beginning at START-POS using
the Idris location information START-LINE, START-COL, END-LINE, and END-COL
and semantic annotations PROPS."
- (let ((buffer (get-buffer (idris-buffer-name :repl))))
+ (let ((buffer (get-buffer idris-repl-buffer-name)))
(with-current-buffer buffer
(save-restriction
(widen)
diff --git a/inferior-idris.el b/inferior-idris.el
index 3e31533382..ba2ea128b5 100644
--- a/inferior-idris.el
+++ b/inferior-idris.el
@@ -66,6 +66,12 @@
(defvar idris-connection nil
"The Idris connection.")
+(defvar idris-process-buffer-name (idris-buffer-name :process)
+ "The name of the Idris process buffer.")
+
+(defvar idris-connection-buffer-name (idris-buffer-name :connection)
+ "The name of the Idris connection buffer.")
+
(defun idris-version-hook-function (event)
(pcase event
(`(:protocol-version ,version ,minor)
@@ -98,7 +104,7 @@ directory variables.")
(interactive)
(let ((command-line-flags (idris-compute-flags)))
;; Kill the running Idris if the command-line flags need updating
- (when (and (get-buffer-process (get-buffer (idris-buffer-name
:connection)))
+ (when (and (get-buffer-process (get-buffer idris-connection-buffer-name))
(not (equal command-line-flags idris-current-flags)))
(message "Idris command line arguments changed, restarting Idris")
(idris-quit)
@@ -109,12 +115,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
@@ -131,7 +137,7 @@ directory variables.")
"Establish a connection with a Idris REPL."
(when (not idris-connection)
(setq idris-connection
- (open-network-stream "Idris IDE support" (idris-buffer-name
:connection) "127.0.0.1" port))
+ (open-network-stream "Idris IDE support"
idris-connection-buffer-name "127.0.0.1" port))
(add-hook 'idris-event-hooks 'idris-version-hook-function)
(add-hook 'idris-event-hooks 'idris-log-hook-function)
(add-hook 'idris-event-hooks 'idris-warning-event-hook-function)
@@ -193,7 +199,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"
- [nongnu] elpa/idris-mode fbe5e363c4 11/14: Use `idris-connection-buffer-name` instead of `(idris-buffer-name :connection)`, (continued)
- [nongnu] elpa/idris-mode fbe5e363c4 11/14: Use `idris-connection-buffer-name` instead of `(idris-buffer-name :connection)`, ELPA Syncer, 2022/12/01
- [nongnu] elpa/idris-mode 38f2839b58 08/14: Use `let ((buffer-read-only nil)` instead of `setq ..`, ELPA Syncer, 2022/12/01
- [nongnu] elpa/idris-mode 1382948269 01/14: Consider - as operator in idris-thing-at-point, ELPA Syncer, 2022/12/01
- [nongnu] elpa/idris-mode e8109f9ac0 04/14: Remove Idris event logging from `make test3`, ELPA Syncer, 2022/12/01
- [nongnu] elpa/idris-mode 0093e0b42c 13/14: Merge pull request #576 from keram/hole-list, ELPA Syncer, 2022/12/01
- [nongnu] elpa/idris-mode d08fd3ec78 14/14: Merge pull request #569 from keram/idris2-mode-issues-16, ELPA Syncer, 2022/12/01
- [nongnu] elpa/idris-mode f3a032c194 03/14: Add test for `idris-add-clause`, ELPA Syncer, 2022/12/01
- [nongnu] elpa/idris-mode 391963a94c 09/14: Use `idris-repl-buffer-name` instead of `(idris-buffer-name :repl)`, ELPA Syncer, 2022/12/01
- [nongnu] elpa/idris-mode 2c1329b086 06/14: Use `idris-notes-buffer-name` in idris-commands.el, ELPA Syncer, 2022/12/01
- [nongnu] elpa/idris-mode 17d9b1593f 07/14: Make hole-list buffer derived from special-mode, ELPA Syncer, 2022/12/01
- [nongnu] elpa/idris-mode 195b432903 12/14: Merge pull request #574 from keram/minor-internal-impro,
ELPA Syncer <=