diff options
-rw-r--r-- | elisp/geiser-edit.el | 8 | ||||
-rw-r--r-- | elisp/geiser-mode.el | 10 |
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) |