diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-02-03 02:44:19 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-02-03 02:44:19 +0100 |
commit | 7255bae6c221b985a40f440356c9143ddfa2e236 (patch) | |
tree | 38502668f0920bd95c14aaffe5c8fba71f300966 | |
parent | ef3f37013a92a00bdf1921ee51bbc0a74a426606 (diff) | |
download | geiser-7255bae6c221b985a40f440356c9143ddfa2e236.tar.gz geiser-7255bae6c221b985a40f440356c9143ddfa2e236.tar.bz2 |
Little cleanups, and C-u variant for the lambda thing
-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) |