[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idris-mode e1d950e4fc 12/12: Merge pull request #592 from
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idris-mode e1d950e4fc 12/12: Merge pull request #592 from keram/holes-on-load-hook |
Date: |
Tue, 13 Dec 2022 05:59:08 -0500 (EST) |
branch: elpa/idris-mode
commit e1d950e4fc8b7e532dcda4cc3b1c8048f92c3496
Merge: d6f54bb121 9e931bf1ff
Author: Jan de Muijnck-Hughes <jfdm@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #592 from keram/holes-on-load-hook
Mark `idris-list-holes-on-load` as obsolete in favour of `idris-list-holes`
---
idris-commands.el | 14 ++------------
idris-prover.el | 6 ------
idris-settings.el | 22 ++++++++++++++++++++--
inferior-idris.el | 9 +++++++++
4 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/idris-commands.el b/idris-commands.el
index ec2d6c8312..5f4faf2015 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -109,18 +109,8 @@
(setq idris-process-current-working-directory
new-working-directory))
(error "Failed to switch the working directory %s" eval-result)))))
-(defun idris-list-holes-on-load ()
- "Use the user's settings from customize to determine whether to list the
holes."
- (interactive)
- (when idris-hole-show-on-load (idris-list-holes)))
-
-(defcustom idris-load-file-success-hook '(idris-list-holes-on-load
- idris-set-current-pretty-print-width)
- "Functions to call when loading a file is successful"
- :type 'hook
- :options '(idris-list-holes-on-load
- idris-set-current-pretty-print-width)
- :group 'idris)
+(define-obsolete-function-alias 'idris-list-holes-on-load 'idris-list-holes
"2022-12-15"
+ "Use the user's settings from customize to determine whether to list the
holes.")
(defun idris-possibly-make-dirty (_beginning _end _length)
(idris-make-dirty))
diff --git a/idris-prover.el b/idris-prover.el
index 9e00755e4e..9a4ea45c2b 100644
--- a/idris-prover.el
+++ b/idris-prover.el
@@ -436,12 +436,6 @@ the length reported by Idris."
t)
(_ nil)))
-(defcustom idris-prover-success-hook '(idris-list-holes-on-load)
- "Functions to call when completing a proof"
- :type 'hook
- :options '(idris-list-holes-on-load)
- :group 'idris-prover)
-
(defun idris-perhaps-insert-proof-script (proof)
"Prompt the user as to whether PROOF should be inserted into the buffer."
(save-window-excursion
diff --git a/idris-settings.el b/idris-settings.el
index 6d56629e4b..a1d70bd694 100644
--- a/idris-settings.el
+++ b/idris-settings.el
@@ -230,8 +230,8 @@ customize the display of non-code text."
:group 'idris)
(defcustom idris-hole-list-show-expanded t
- "Show the hole list fully expanded by default. This may be useful
-on wide monitors with lots of space for the hole buffer."
+ "Show the hole list fully expanded by default.
+This may be useful on wide monitors with lots of space for the hole buffer."
:type 'boolean
:group 'idris-hole-list)
@@ -251,6 +251,24 @@ change to ordinary prover interaction."
:group 'idris
:options '(idris-set-current-pretty-print-width))
+(defcustom idris-load-file-success-hook '(idris-list-holes
+ idris-set-current-pretty-print-width)
+ "Functions to call when loading a file is successful.
+When `idris-hole-show-on-load' is set to nil the function `idris-list-holes'
+will be removed from the list automatically and will not be executed."
+ :type 'hook
+ :options '(idris-list-holes
+ idris-set-current-pretty-print-width)
+ :group 'idris)
+
+(defcustom idris-prover-success-hook '(idris-list-holes)
+ "Functions to call when completing a proof.
+When `idris-hole-show-on-load' is set to nil the function `idris-list-holes'
+will be removed from the list automatically and will not be executed."
+ :type 'hook
+ :options '(idris-list-holes)
+ :group 'idris-prover)
+
;;;; REPL settings
(defgroup idris-repl nil "Idris REPL" :prefix 'idris :group 'idris)
diff --git a/inferior-idris.el b/inferior-idris.el
index 6eaf1823db..4ee0cb9421 100644
--- a/inferior-idris.el
+++ b/inferior-idris.el
@@ -142,6 +142,15 @@ directory variables.")
(add-hook 'idris-event-hooks 'idris-log-hook-function)
(add-hook 'idris-event-hooks 'idris-warning-event-hook-function)
(add-hook 'idris-event-hooks 'idris-prover-event-hook-function)
+
+ (unless idris-hole-show-on-load
+ (remove-hook 'idris-load-file-success-hook 'idris-list-holes-on-load)
+ (remove-hook 'idris-load-file-success-hook 'idris-list-holes)
+ ;; TODO: In future decouple prover sucess hook from being affected by
+ ;; idris-hole-show-on-load variable
+ (remove-hook 'idris-prover-success-hook 'idris-list-holes-on-load)
+ (remove-hook 'idris-prover-success-hook 'idris-list-holes))
+
(set-process-filter idris-connection 'idris-output-filter)
(set-process-sentinel idris-connection 'idris-sentinel)
(set-process-query-on-exit-flag idris-connection t)
- [nongnu] elpa/idris-mode updated (ef6768244b -> e1d950e4fc), ELPA Syncer, 2022/12/13
- [nongnu] elpa/idris-mode 723e778486 04/12: Fix indentation in documentation for `idris-semantic-source-highlighting`, ELPA Syncer, 2022/12/13
- [nongnu] elpa/idris-mode 3508be6919 02/12: Comment out `if` statement in `idris-possibly-make-dirty` as, ELPA Syncer, 2022/12/13
- [nongnu] elpa/idris-mode 9e931bf1ff 07/12: Mark `idris-list-holes-on-load` as obsolete in favour of `idris-list-holes`, ELPA Syncer, 2022/12/13
- [nongnu] elpa/idris-mode 8a3229cfe9 09/12: Merge pull request #589 from keram/minor-impro, ELPA Syncer, 2022/12/13
- [nongnu] elpa/idris-mode 4f654a8b20 01/12: Reset Idris working directory on closing idris connection, ELPA Syncer, 2022/12/13
- [nongnu] elpa/idris-mode fd0d7b7918 08/12: Make sure the current file is loaded when listing holes, ELPA Syncer, 2022/12/13
- [nongnu] elpa/idris-mode ac029bc67e 06/12: Trim left whitespace from Idris add-clause response, ELPA Syncer, 2022/12/13
- [nongnu] elpa/idris-mode e1d950e4fc 12/12: Merge pull request #592 from keram/holes-on-load-hook,
ELPA Syncer <=
- [nongnu] elpa/idris-mode 3506c39f5e 10/12: Merge pull request #590 from keram/fix-indent-add-clause-idris2, ELPA Syncer, 2022/12/13
- [nongnu] elpa/idris-mode c84ed5a733 05/12: Remove idris-mode event hooks on closing Idris connection, ELPA Syncer, 2022/12/13
- [nongnu] elpa/idris-mode d6f54bb121 11/12: Merge pull request #594 from keram/list-holes-no-process-main, ELPA Syncer, 2022/12/13
- [nongnu] elpa/idris-mode 505ce46cbf 03/12: Align idris-load-file and idris-load-file-sync `idris-eval`, ELPA Syncer, 2022/12/13