summaryrefslogtreecommitdiff
path: root/elisp/geiser-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-mode.el')
-rw-r--r--elisp/geiser-mode.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index db07df8..77feeec 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -215,6 +215,14 @@ positive values and backward for negative."
(error (setq steps 0))))))
(when (and pared (fboundp 'paredit-mode)) (paredit-mode 1)))))
+(defun geiser-insert-lambda (&optional full)
+ "Insert λ at point. With prefix, inserts (λ ())."
+ (interactive "P")
+ (if (not full)
+ (insert (make-char 'greek-iso8859-7 107))
+ (insert "(" (make-char 'greek-iso8859-7 107) " ())")
+ (backward-char 2)))
+
;;; Geiser mode:
@@ -308,7 +316,7 @@ interacting with the Geiser REPL is at your disposal.
("Edit module" ("\C-c\C-e\C-m" "\C-c\C-em") geiser-edit-module)
("Add to load path..." ("\C-c\C-e\C-l" "\C-c\C-el") geiser-add-to-load-path)
("Toggle ()/[]" ("\C-c\C-e\C-[" "\C-c\C-e[") geiser-squarify)
- ("Insert λ" ("\C-c\\" "\C-c\C-\\") geiser-edit-insert-lambda)
+ ("Insert λ" ("\C-c\\" "\C-c\C-\\") geiser-insert-lambda)
--
("Callers" ((kbd "C-c <")) geiser-xref-callers
:enable (and (geiser-eval--supported-p 'callers)