summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-01-15 18:54:06 +0000
committerjao <jao@gnu.org>2024-01-15 18:54:06 +0000
commit0e189dfb1e531c7b2609c5865659badec7cb6f28 (patch)
treee12fb9a4dae2b00ff4a97b2f04fc5131fd13e2d3 /elisp
parentd25b2a3e176fb1a8dade23e2e827f774e3599a8c (diff)
parentcfe14bf11096ded649b57e2532302321044d51c6 (diff)
downloadgeiser-0e189dfb1e531c7b2609c5865659badec7cb6f28.tar.gz
geiser-0e189dfb1e531c7b2609c5865659badec7cb6f28.tar.bz2
Merge commit 'refs/pullreqs/20'
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-edit.el19
1 files changed, 14 insertions, 5 deletions
diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el
index 0f2b080..df4231c 100644
--- a/elisp/geiser-edit.el
+++ b/elisp/geiser-edit.el
@@ -298,13 +298,22 @@ With prefix, asks for the symbol to locate."
(when marker (xref-push-marker-stack marker))
t)))
+(geiser-custom--defcustom geiser-insert-actual-lambda t
+ "Whether geiser-insert-lambda should insert \"λ\" or \"lambda\"."
+ :type 'boolean)
+
(defun geiser-insert-lambda (&optional full)
- "Insert λ at point. With prefix, inserts (λ ())."
+ "Insert λ or lambda at point. With prefix, inserts (λ ()) or (lambda ()).
+
+See also `geiser-insert-actual-lambda'."
(interactive "P")
- (if (not full)
- (insert (make-char 'greek-iso8859-7 107))
- (insert "(" (make-char 'greek-iso8859-7 107) " ())")
- (backward-char 2)))
+ (let ((sym (if geiser-insert-actual-lambda
+ (make-char 'greek-iso8859-7 107)
+ "lambda")))
+ (if (not full)
+ (insert sym)
+ (insert "(" sym " ())")
+ (backward-char 2))))
(defun geiser-squarify (n)
"Toggle between () and [] for current form.