[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Has enriched-mode become enriched?
From: |
Stefan Monnier |
Subject: |
Re: Has enriched-mode become enriched? |
Date: |
Tue, 13 Jul 2021 09:05:03 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> I noticed a couple of changes in enriched-mode exhibited by the latest
> emacs, which are not present in emacs-27.2.
>
> 1. It used to be the case that I could set a local variable as
>
> #+begin_src elisp
> # Local Variables:
> # mode: enriched-mode
> # End:
> #+end_src
>
> Now the addition of mode after the hyphen gives a File local-variables
> error: (void-function enriched-mode-mode).
I just tried it with Debian's 27.1 and it doesn't work either.
AFAIK it's always been the case that the `mode:` thingy needs to have
the major mode spelled without the `-mode` trailer (this is important
for security reasons, since it would otherwise make it possible to call
any function).
> I now have to use
>
> #+begin_src elisp
> # Local Variables:
> # mode: enriched
> # End:
> #+end_src
That's the normal form. Not sure how/why the other one worked for you
in the past.
> It used to be the case that
>
> #+begin_src elisp
> (add-hook 'text-mode-hook
> (lambda ()
> (flyspell-mode)))
> #+end_src
I think this will depend on the file name: enriched mode is a *minor*
mode, so whether it gets put in `text-mode` or some other mode will
depend on the file's name.
> I am wondering if these changes are intended.
I think you need to investigate on your side to make sure where those
changes come from because I don't think they come from Emacs-27 vs
Emacs-28 (or if they do, I don't think they come from changes in
`enriched-mode`).
Stefan