From f2ca54c25fc6e8cc4a90ddbe2513e774b1b2b2f3 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 3 Feb 2013 01:02:26 +0100 Subject: [PATCH] More robust lambda and keybinding to C-c \ Since C-\ is a standard Emacs binding, and people know how to change it anyway. I've also put the command in the menu for Geiser mode, for discoverability. A pleasant surprise: greek lambdas are understood by both Racket and Guile. --- elisp/geiser-edit.el | 4 ++-- elisp/geiser-mode.el | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el index 874c9fc..9735bd2 100644 --- a/elisp/geiser-edit.el +++ b/elisp/geiser-edit.el @@ -1,6 +1,6 @@ ;;; geiser-edit.el -- scheme edit locations -;; Copyright (C) 2009, 2010, 2012 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2012, 2013 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -240,7 +240,7 @@ With prefix, asks for the symbol to edit." (defun geiser-edit-insert-lambda () "Insert λ at point." (interactive) - (insert-char ?λ 1)) + (insert-char (make-char 'greek-iso8859-7 107) 1)) diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el index 6df82a7..db07df8 100644 --- a/elisp/geiser-mode.el +++ b/elisp/geiser-mode.el @@ -1,6 +1,6 @@ ;; geiser-mode.el -- minor mode for scheme buffers -;; Copyright (C) 2009, 2010, 2011, 2012 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2011, 2012, 2013 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -308,6 +308,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) -- ("Callers" ((kbd "C-c <")) geiser-xref-callers :enable (and (geiser-eval--supported-p 'callers) @@ -321,7 +322,6 @@ interacting with the Geiser REPL is at your disposal. (custom "Customize Geiser mode" geiser-mode)) (define-key geiser-mode-map [menu-bar scheme] 'undefined) -(define-key geiser-mode-map "\C-\\" 'geiser-edit-insert-lambda) ;; (geiser-mode--triple-chord ?x ?m 'geiser-xref-generic-methods) -- 2.11.4.GIT