ESS function template for R

Martin Maechler maechler at
Wed Nov 14 09:13:45 CET 2001

>>>>> "SMcC" == S McClatchie <s.mcclatchie at> writes:

    SMcC> Colleagues
    SMcC> -----------------------------------
    SMcC> System info:
    SMcC> R ver. 1.3.0  (2001-06-22) on NT
    SMcC> ESS v. 5.1.18 using emacs ver. 20.7.1

    SMcC> ----------------------------------

    SMcC> I'm trying to get a function template for R to work from ESS and I  think 
    SMcC> I've missed something. 

    SMcC> In my ~/.emacs file i added the lines:

    SMcC> (defun ess-add-MM-keys ()
    SMcC>   "Define \"C-c f\" and force \\[ess-toggle-underscore]."
    SMcC>   (interactive)
    SMcC>   (require 'ess-mode)
    SMcC>    (define-key ess-mode-map "\C-cf" 'ess-insert-function-outline))

which was the wrong thing to add since the above code is already in ESS.
Instead you must *call* the ess-add-MM-keys function,
either by calling it once every time you restart Emacs & ESS by
       M-x ess-add-MM-keys 
or (as I said in an earlier message) you could simply add

      (add-hook 'ess-mode-hook	        'ess-add-MM-keys)
      (add-hook 'inferior-ess-mode-hook 'ess-add-MM-keys)

to your ~/.emacs which ensures the function is called automatically when
(inferior-)ess-mode is activated.

Martin Maechler <maechler at>
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
ess-help mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: ess-help-request at

More information about the ESS-help mailing list