summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2013-02-03 02:44:19 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2013-02-03 02:44:19 +0100
commit7916065e7156db3f128c1e5fd27783b4a18baa2f (patch)
tree64ac9d018530ffa9193ef0b41f7b79b48f946005
parent5e63968f431a40c0ea8dc7391ee95b869d9d9bff (diff)
downloadgeiser-chez-7916065e7156db3f128c1e5fd27783b4a18baa2f.tar.gz
geiser-chez-7916065e7156db3f128c1e5fd27783b4a18baa2f.tar.bz2
Little cleanups, and C-u variant for the lambda thing
-rw-r--r--elisp/geiser-edit.el8
-rw-r--r--elisp/geiser-mode.el10
2 files changed, 9 insertions, 9 deletions
diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el
index 9735bd2..5d5cd1b 100644
--- a/elisp/geiser-edit.el
+++ b/elisp/geiser-edit.el
@@ -235,13 +235,5 @@ With prefix, asks for the symbol to edit."
(when marker (ring-insert find-tag-marker-ring marker))))
-;; Editing key bindings
-
-(defun geiser-edit-insert-lambda ()
- "Insert λ at point."
- (interactive)
- (insert-char (make-char 'greek-iso8859-7 107) 1))
-
-
(provide 'geiser-edit)
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)