[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idris-mode 8553aef 3/3: Merge pull request #541 from jfdm/
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idris-mode 8553aef 3/3: Merge pull request #541 from jfdm/allow-words-of-encouragement-to-be-turned-off |
Date: |
Wed, 3 Nov 2021 11:57:57 -0400 (EDT) |
branch: elpa/idris-mode
commit 8553aef4e4bd22e35a236413b09980c6f93a9041
Merge: 6c22a7b e46686e
Author: Jan de Muijnck-Hughes <jfdm@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #541 from
jfdm/allow-words-of-encouragement-to-be-turned-off
[ feature ] Make sending words of encouragement customisable.
---
idris-settings.el | 5 +++++
inferior-idris.el | 16 +++++++++-------
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/idris-settings.el b/idris-settings.el
index 5033404..4519321 100644
--- a/idris-settings.el
+++ b/idris-settings.el
@@ -84,6 +84,11 @@ The log is placed in `idris-event-buffer-name'."
:type 'boolean
:group 'idris)
+(defcustom idris-display-words-of-encouragement t
+ "Send words of encouragement."
+ :type 'boolean
+ :group 'idris)
+
;;; Faces
(defface idris-active-term-face
'((((background light))
diff --git a/inferior-idris.el b/inferior-idris.el
index 200a485..ac818c2 100644
--- a/inferior-idris.el
+++ b/inferior-idris.el
@@ -142,7 +142,9 @@ directory variables.")
(set-process-query-on-exit-flag idris-connection t)
(setq idris-process-current-working-directory "")
(run-hooks 'idris-run-hook)
- (message "Connected. %s" (idris-random-words-of-encouragement))))
+ (when idris-display-words-of-encouragement
+ (message "Connected. %s" (idris-random-words-of-encouragement)))
+ ))
(defun idris-sentinel (_process msg)
(message "Idris disconnected: %s" (substring msg 0 -1))
@@ -183,14 +185,14 @@ directory variables.")
(cl-flet ((idris-warn (msg)
(unless (or (null msg) (string-blank-p msg))
(message "Warning from Idris: %s" msg))))
- (if (string-match idris-process-exact-port-output-regexp string)
- (idris-connect (string-to-number (match-string
idris-exact-port-matcher string)))
- (if (not (string-match idris-process-port-with-warning-output-regexp
string))
- (idris-warn string)
+ (if (string-match idris-process-exact-port-output-regexp string)
+ (idris-connect (string-to-number (match-string
idris-exact-port-matcher string)))
+ (if (not (string-match idris-process-port-with-warning-output-regexp
string))
+ (idris-warn string)
(idris-warn (match-string idris-warning-matcher string))
(idris-connect (string-to-number (match-string
idris-warning-port-matcher string))))
- ""))))
-
+ ""))))
+
(defun idris-show-process-buffer (string)
"Show the Idris process buffer if STRING is non-empty."
(when (> (length string) 0)