From cfbfd5bbd369242017802df89fb51afa97744b48 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Tue, 1 May 2012 15:20:55 +0100 Subject: [PATCH] some elisp code that slime/swankr users probably want Should try to find out how to have it loaded automatically --- swankr.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 swankr.el diff --git a/swankr.el b/swankr.el new file mode 100644 index 0000000..9ddeeab --- /dev/null +++ b/swankr.el @@ -0,0 +1,13 @@ +(require 'ess-help) + +(defun swankr-operator-before-point () + (ignore-errors + (save-excursion + (backward-up-list 1) + (slime-symbol-at-point)))) + +(add-hook 'R-mode-hook + (defun swankr/R-mode-hook () + (slime-mode 1) + (set (make-local-variable 'slime-operator-before-point-function) 'swankr-operator-before-point) + (local-set-key (kbd "(") 'slime-space))) -- 2.39.5