GNU bug report logs - #2355
23.0.60; Enabling minor-mode disables major mode

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Tue, 17 Feb 2009 11:55:06 UTC

Severity: minor

Fixed in version 24.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 2355 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Leo <sdl.web <at> gmail.com>
Cc: 2355 <at> debbugs.gnu.org
Subject: Re: bug#2355: 23.0.60; Enabling minor-mode disables major mode
Date: Tue, 17 Feb 2009 17:43:49 +0100
On Tue, Feb 17, 2009 at 17:04, Leo <sdl.web <at> gmail.com> wrote:

> Why is that an abuse? The manual does not specify what is not allowed.

"You can specify any number of variables/value pairs in this way, each
pair with a colon and semicolon as shown above.  `mode: MODENAME;'
specifies the major mode; this should come first in the line."

It does explicitly says that mode: specifies the major mode. It does
not say that it should not be a minor mode, but it also doesn't say
that you cannot use any arbitrary function (ending in -mode). If the
function that you use does not set major-mode, it will cause confusion
(to Emacs or the user, or both).

> Sorry I was not clear. I am questioning whether the different behaviour
> between these two ways of specifying local variables is a bug or not. In
> my view, it is confusing at least.

Mode autodetection is complex (there are file variables,
interpreter-mode-alist, magic-mode-alist, magic-fallback-mode-alist,
etc.). It is not impossible to get nonsense (or, at least, unexpected)
results when given inconsistent input data. It would perhaps be better
to detect when a supposed major mode (found with -*-, auto-mode-alist
or whatever) is not really setting major-mode, but that's another bug
;-)

    Juanma




This bug report was last modified 14 years and 20 days ago.

Previous Next


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