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


View this message in rfc822 format

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: bug#2355: 23.0.60; Enabling minor-mode disables major mode
Date: Wed, 18 Feb 2009 07:42:35 +0000
On 2009-02-17 16:43 +0000, Juanma Barranquero wrote:
>> 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
> ;-)

But we are only talking about file variables in this case. There are two
ways of specifying file variables: in the header and at the end of the
file. 

When they contain the pseudo-variable mode specifying a minor mode, they
behave differently.

The two behaviours are as follows.

1. put file in fundamental mode and the minor mode (when in header)
2. put file in a major mode by auto mode detection and the minor mode
   (when at the end of file)

This causes confusion. Do you think this is a bug? If not, I think at
least the manual can be improved.

Thanks,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .: I use Emacs :.






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.