unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Colin Baxter <m43cap@yandex.com>
Cc: emacs-devel@gnu.org
Subject: Re: Has enriched-mode become enriched?
Date: Tue, 13 Jul 2021 09:05:03 -0400	[thread overview]
Message-ID: <jwv8s2az7wy.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87r1g4lzax.fsf@yandex.com> (Colin Baxter's message of "Mon, 12 Jul 2021 09:19:18 +0100")

> 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




  parent reply	other threads:[~2021-07-13 13:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12  8:19 Has enriched-mode become enriched? Colin Baxter
2021-07-13 12:20 ` Eli Zaretskii
2021-07-13 13:39   ` Phil Sainty
2021-07-13 13:05 ` Stefan Monnier [this message]
2021-07-13 16:46   ` Colin Baxter
2021-07-13 17:12     ` John ff
2021-07-13 17:37       ` Stefan Monnier
2021-07-13 17:50         ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8s2az7wy.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=m43cap@yandex.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).