[ESS] ess-mode: Wrong type argument: syntax-table-p, nil

Vitalie Spinu spinuvit at gmail.com
Mon Jun 10 11:28:17 CEST 2013


 >> Thorsten Jolitz <tjolitz at gmail.com>
 >> on Mon, 10 Jun 2013 10:53:46 +0200 wrote:

[...]

 > | Its value is "5.15"

This is a bit dated.

[...]

 > error with `R-mode', since `major-mode' returns `ess-mode' even if
 > `R-mode' is active. I had to work around this with code like this

 > ,---------------------------------------
 > | (let ((mode (get-buffer-mode buffer)))
 > |   ;; special case R-mode
 > |   (if (eq mode 'ess-mode)
 > |       (funcall 'R-mode)
 > |     (funcall mode)))
 > `---------------------------------------

 > and it works for me now, but I would still consider it a bug that
 > `R-mode' returns `ess-mode' as major-mode.

This is still an issue in ESS 13.05, technically there is no R-mode only
ess-mode and this is indeed unfortunate. Someone has to take an
initiative and to refactor ess-mode into distinct modes. But that that
is a heavy change and will probably break configuration for a lot of
users.

Instead of checking for major-mode in your functions it is better to
check for ess-dialect which is defined in ess-mode buffers and is set to
"R" in "R-mode" buffers.

   Vitalie



More information about the ESS-help mailing list