[ESS] using smatparens mode in iESS (R) buffer

Vitalie Spinu spinuvit at gmail.com
Fri May 3 23:09:21 CEST 2013


Hi Jannis, 

smartparens-mode doesn't activate itself in special buffers like R:

╭──────── #486 ─ /home/vitoshka/Dropbox/ELPA/smartparens-20130426.242/smartparens.el ──
│ 
│ ;;;###autoload
│ (defun turn-on-smartparens-mode ()
│   "Turn on `smartparens-mode'."
│   (interactive)
│   (unless (or (member major-mode sp-ignore-modes-list)
│               (eq (get major-mode 'mode-class) 'special))
│     (smartparens-mode t)))
╰──────── #493 ─ 



 >> Jannis <bt_jannis at yahoo.de>
 >> on Fri, 03 May 2013 10:51:11 +0200 wrote:

[...]

 > (add-hook 'iESS-mode-hook (lambda () (smartparens-mode 1)))

There is no iESS-mode-hook, only ess-post-run-hook and other specialized
post-run hooks. This will do:

    (add-hook 'ess-R-post-run-hook 'smartparens-mode)


Cheers, 

    Vitalie



More information about the ESS-help mailing list