[ESS] ess-mode: Wrong type argument: syntax-table-p, nil
Thorsten Jolitz
tjolitz at gmail.com
Mon Jun 10 11:45:45 CEST 2013
Vitalie Spinu <spinuvit at gmail.com> writes:
> >> 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.
Indeed, I wasn't aware I'm so much behind current development. I just
cloned the github repo.
> [...]
>
> > 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.
Its a generic function that should work with all kinds of major-modes,
so I have to use something that can be applied in all kinds of
major-modes. But thanks for the tip, I did not know about `ess-dialect',
I'm sure it will be useful in other occasions.
--
cheers,
Thorsten
More information about the ESS-help
mailing list