GNU bug report logs - #54993
28.1; Editing etc/NEWS on master with Emacs 28 signals an error

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Sun, 17 Apr 2022 17:45:02 UTC

Severity: wishlist

Found in version 28.1

Full log


Message #29 received at 54993 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 54993 <at> debbugs.gnu.org
Subject: Re: bug#54993: 28.1; Editing etc/NEWS on master with Emacs 28
 signals an error
Date: Sun, 17 Apr 2022 22:27:51 +0200
Jim Porter <jporterbugs <at> gmail.com> writes:

>   # -*- mode: FOO; mode: BAR -*-
>
> This way, it would try to load FOO-mode and then BAR-mode in order,
> and so I could set up the mode for files to ensure that users with
> BAR-mode available can use that, but it falls back to FOO-mode
> otherwise. Unfortunately, in Emacs 28.1, this now fails with:
>
>   File local-variables error: (error Lisp nesting exceeds
>   ‘max-lisp-eval-depth’)

Yes, there's something weird going on with the mode: spec.  With the
following, and Emacs 28.1 (and NEWS from 29), it infloops.

(unless (fboundp 'emacs-news-mode)
  (defun emacs-news-mode ()
    (outline-mode)))

Like this:

  emacs-news-mode()
  hack-one-local-variable(mode emacs-news)
  hack-local-variables-apply()
  hack-local-variables(no-mode)
  run-mode-hooks(outline-mode-hook)
  outline-mode()
  emacs-news-mode()
  hack-one-local-variable(mode emacs-news)
  hack-local-variables-apply()
  hack-local-variables(no-mode)
  run-mode-hooks(outline-mode-hook)
  outline-mode()
  emacs-news-mode()
  set-auto-mode-0(emacs-news-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)

The mode: parsing stuff was largely redone for Emacs 28.1, and
I guess this is a fallout from that.  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.