[prev in list] [next in list] [prev in thread] [next in thread]
List: ess-help
Subject: Re: [ESS] sas-mode redefining newline? how can I make it stop?
From: fork <forkandwait () gmail ! com>
Date: 2011-05-06 22:42:51
Message-ID: loom.20110507T003927-577 () post ! gmane ! org
[Download RAW message or body]
fork <forkandwait <at> gmail.com> writes:
>
> Rodney Sparapani <rsparapa <at> mcw.edu> writes
<SNIP>
Here is what I now have in my init file, which seems to give me what I want:
;; my own func
(defun newline-indent-relative ()
"blah"
(interactive)
(progn
(newline)
(indent-relative-maybe)))
;; Load ess and sas mode customizations
(defun load-ess ()
(interactive)
(load-file "~/.emacs.d/ess-5.13/lisp/ess-site.el"))
(add-hook 'ess-mode-hook
'(lambda ()
(local-set-key (kbd "<return>") 'newline)
(local-set-key (kbd "C-j") 'newline-indent-relative)
(local-set-key (kbd "<tab>") 'tab-to-tab-stop)
(modify-syntax-entry ?_ "w") ; now '_' is not considered a
word-delimiter
(modify-syntax-entry ?- "w") ; now '-' is not considered a
word-delimiter
))
I generally only load ess if I have a sas file to work on (it is a bit of a
beast to load every time I start emacs). The above seems to give sensical
indentation -- if I want to reset to flush left, I hit enter; if I want to align
with the last line, I hit C-j, and if I want a regular notch of indentation, I
hit tab.
Thanks to everyone who helped me think this through.
______________________________________________
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic