Christophe
Weblog
Wiki
Code
Publications
Music
projects
/
swankr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3bf571b
)
some elisp code that slime/swankr users probably want
author
Christophe Rhodes
<csr21@cantab.net>
Tue, 1 May 2012 14:20:55 +0000
(15:20 +0100)
committer
Christophe Rhodes
<csr21@cantab.net>
Tue, 1 May 2012 14:20:55 +0000
(15:20 +0100)
Should try to find out how to have it loaded automatically
swankr.el
[new file with mode: 0644]
patch
|
blob
diff --git a/swankr.el
b/swankr.el
new file mode 100644
(file)
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)))