keybindings in SAS mode

Kasper Daniel Hansen K.Hansen at biostat.ku.dk
Tue Mar 9 12:32:01 CET 2004


Sorry for the last post. I was using ess-5.1.24 and not ess-5.2.0beta4. The 
solution below works in 5.1.24 and not in the new (beta) version?

There seems to have been some changes from 5.1.24 to 5.2.0beta4. Previously I 
was used to get automatic indentation in ESS(SAS) mode, now I only get it 
when pressing TAB. This seems to be a sensible default, however is there any 
way to get ESS to revert to its former default. 

/Kasper

On Tuesday 09 March 2004 11:53, Kasper Daniel Hansen wrote:
> I've finally solved the problem below (regarding redefining C-TAB in
> ESS(SAS) mode because KDE uses that key to switch windows).
>
> I use the code
> (add-hook 'ess-mode-hook
>   (function
>     (lambda ()
>       (define-key sas-mode-local-map
>                   "\M-1"
>                   'ess-sas-backward-delete-tab)
> )))
>
> I want to note the following: in the ESS documentation it is written under
> the hook "ess-mode-load-hook" that it "... is useful for setting up
> keybindings etc". For some reason the code above only works with
> ess-mode-hook, not ess-mode-load-hook.
>
> /Kasper
>
> On Friday 27 February 2004 15:53, Rodney Sparapani wrote:
> > >(concerning ess-5.2.0beta3 on Redhat Linux 8)
> > >
> > >In SAS mode you currently need a keybinding to
> > > ess-sas-backward-delete-tab in order to exit from a tab indentation.
> > > This function is per default binded to C-TAB. However, I'm using KDE
> > > and this key is used by the window manager. So I need to redefine the
> > > binding. I'm very bad at elisp, but guessing I come up with something
> > > like
> > >
> > >(load "/home/bs/bs/emacs/site-lisp/ess-5.2.0beta2/lisp/ess-site")
> > >(add-hook 'ess-mode-load-hook
> > >  (function
> > >    (lambda ()
> > >      (define-key ess-mode-map
> > >                  "S-TAB"
> > >                  'ess-sas-backward-delete-tab)
> > >)))
> > >
> > >This doesn't work, but I guess I'm pretty close. Any suggestions?
> >
> > "Use the source, Luke!"  Sorry, couldn't resist a juvenile attempt at
> > humor. I think the line that you are looking for is (untested):
> >
> > (define-key sas-mode-local-map [(shift tab)]
> > 'ess-sas-backward-delete-tab)
> >
> > Rodney Sparapani              Medical College of Wisconsin
> > Sr. Biostatistician           Patient Care & Outcomes Research
> > rsparapa at mcw.edu              http://www.mcw.edu/pcor
> > Was 'Name That Tune' rigged?  WWLD -- What Would Lombardi Do

-- 
Kasper Daniel Hansen, Research Assistent
Department of Biostatistics, University of Copenhagen




More information about the ESS-help mailing list