[ESS] elisp code: show function arguments

Sven Hartenstein lists at svenhartenstein.de
Tue Apr 3 19:50:40 CEST 2007


Hi,

> One issue with the very convenient tool Sven made up: there is a 
> conflict with the function I use to automagically close parentheses when 
> I open one. I use the following:
> 
> (defun insert-parentheses () "insert parentheses and go between them"
>   (interactive)
> (insert "()")
> (backward-char 1))
> (global-set-key "(" 'insert-parentheses) ;; inserts "()"
> 
> which doesn't work any more in a ESS buffer with Sven's function.
> Any idea how to circumvent this problem and having the best of both
> worlds?

Replace my suggested

  (define-key ess-mode-map "(" '(lambda nil "" (interactive)
  (skeleton-pair-insert-maybe nil)
  (my-r-show-args))))

with

  (define-key ess-mode-map "(" '(lambda nil "" (interactive)
  (insert-parentheses)
  (my-r-show-args)))

I hope this helps.

Sven




More information about the ESS-help mailing list