From 7255bae6c221b985a40f440356c9143ddfa2e236 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 3 Feb 2013 02:44:19 +0100 Subject: Little cleanups, and C-u variant for the lambda thing --- elisp/geiser-edit.el | 8 -------- elisp/geiser-mode.el | 10 +++++++++- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'elisp') 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 @@ -234,14 +234,6 @@ With prefix, asks for the symbol to edit." (geiser-completion--read-module))) (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) -- cgit v1.2.3