summaryrefslogtreecommitdiff
path: root/elisp/geiser-repl.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2012-09-02 03:26:28 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2012-09-02 03:26:28 +0200
commit18c0a96cbf293e5b702316476634936766a5fd11 (patch)
treefa6e9eda80aaac65272c3934e9ed9f91bc35384d /elisp/geiser-repl.el
parent67a2d3eac579b10e2f526f1282b459fcf8f12804 (diff)
downloadgeiser-chez-18c0a96cbf293e5b702316476634936766a5fd11.tar.gz
geiser-chez-18c0a96cbf293e5b702316476634936766a5fd11.tar.bz2
Image support: buttons and auto-display in the REPL
When geiser-repl-inline-images-p is false (or we're in a terminal), the inserted text replacement is a button that calls the external viewer on click. There's also a parameter controlling whether the viewer should be invoked automatically upon insertion.
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r--elisp/geiser-repl.el21
1 files changed, 15 insertions, 6 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 7eb7cf0..ddcc6b8 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -46,8 +46,10 @@ REPL buffer."
:type 'boolean
:group 'geiser-repl)
-(geiser-custom--defcustom geiser-repl-history-filename (expand-file-name "~/.geiser_history")
+(geiser-custom--defcustom geiser-repl-history-filename
+ (expand-file-name "~/.geiser_history")
"File where REPL input history is saved, so that it persists between sessions.
+
This is actually the base name: the concrete Scheme
implementation name gets appended to it."
:type 'filename
@@ -114,10 +116,16 @@ If you have a slow system, try to increase this time."
:type 'integer
:group 'geiser-repl)
-(geiser-custom--defcustom geiser-repl-inline-images t
- "Whether to display inline images in the REPL."
- :type 'boolean
- :group 'geiser-repl)
+(geiser-custom--defcustom geiser-repl-inline-images-p t
+ "Whether to display inline images in the REPL."
+ :type 'boolean
+ :group 'geiser-repl)
+
+(geiser-custom--defcustom geiser-repl-auto-display-images-p t
+ "Whether to automatically invoke the external viewer to display
+images pooping up in the REPL."
+ :type 'boolean
+ :group 'geiser-repl)
(geiser-custom--defface repl-input
'comint-highlight-input geiser-repl "evaluated input highlighting")
@@ -274,7 +282,8 @@ module command as a string")
(defun geiser-repl--output-filter (txt)
(geiser-con--connection-update-debugging geiser-repl--connection txt)
- (geiser-image--replace-images geiser-repl-inline-images)
+ (geiser-image--replace-images geiser-repl-inline-images-p
+ geiser-repl-auto-display-images-p)
(when (string-match-p (geiser-con--connection-prompt geiser-repl--connection)
txt)
(geiser-autodoc--disinhibit-autodoc)))