[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser 956ec5ff54: geiser-repl: new variables startup-hook
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/geiser 956ec5ff54: geiser-repl: new variables startup-hook and startup-forms |
Date: |
Fri, 12 Aug 2022 11:58:32 -0400 (EDT) |
branch: elpa/geiser
commit 956ec5ff543e9a0fcb3b3ceb339bb1e21c39719e
Author: jao <jao@gnu.org>
Commit: jao <jao@gnu.org>
geiser-repl: new variables startup-hook and startup-forms
See discussion in issue #48.
---
elisp/geiser-repl.el | 20 +++++++++++++++++++-
news.org | 6 ++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 3ce191fca7..897a17b14c 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -1,4 +1,4 @@
-;;; geiser-repl.el --- Geiser's REPL
+;;; geiser-repl.el --- Geiser's REPL -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2013, 2015-2016, 2018-2022 Jose Antonio Ortega Ruiz
@@ -206,6 +206,20 @@ This variable is a good candidate for .dir-locals.el.
This option has no effect if no project root is found."
:type '(choice boolean (list string)))
+(geiser-custom--defcustom geiser-repl-startup-hook nil
+ "Functions run right after a REPL has started and is fully set up.
+
+See also `geiser-repl-startup-forms'."
+ :type 'hook)
+
+(geiser-custom--defcustom geiser-repl-startup-forms nil
+ "List scheme forms, as strings, sent to a REPL on start-up.
+
+This variable is a good candidate for .dir-locals.el.
+
+See also `geiser-repl-startup-hook'."
+ :type '(repeat string))
+
(geiser-custom--defface repl-input
'comint-highlight-input geiser-repl "evaluated input highlighting")
@@ -563,6 +577,10 @@ will be set up using `geiser-connect-local' when a REPL is
started.")
t)
(set-process-query-on-exit-flag (get-buffer-process (current-buffer))
geiser-repl-query-on-kill-p)
+ (dolist (f geiser-repl-startup-forms)
+ (geiser-log--info "Evaluating startup form %s..." f)
+ (geiser-eval--send/wait `(:eval (:scm ,f))))
+ (run-hooks geiser-repl-startup-hook)
(message "%s up and running!" (geiser-repl--repl-name impl))))
(defvar-local geiser-repl--connection-buffer nil)
diff --git a/news.org b/news.org
index 9343de5f61..74ca56483e 100644
--- a/news.org
+++ b/news.org
@@ -1,3 +1,9 @@
+* Version 0.25 (unreleased)
+
+ - Fix: support for .dir-locals.el in REPL buffers
+ - New customizable variables: geiser-repl-startup-hook and
+ geiser-repl-startup-forms.
+
* Version 0.24 (May, 2022)
- Support for #{...}# extended symbol syntax
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/geiser 956ec5ff54: geiser-repl: new variables startup-hook and startup-forms,
ELPA Syncer <=