bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

generic mode doesn't play nice with hack-local-variables


From: Matt Armstrong
Subject: generic mode doesn't play nice with hack-local-variables
Date: Tue, 10 Dec 2002 09:33:25 -0700

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2002-03-22 on raven, modified by Debian
configured using `configure  i386-debian-linux-gnu --prefix=/usr 
--sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib 
--infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --with-x=yes 
--with-x-toolkit=athena --without-gif'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

If you have generic-use-find-file-hook set to t (the default), then
generic mode can potentially subvert a Local Variables section of the
edited file.

What happens is this:

files.el/after-find-file calls normal-mode, which calls
hack-local-variables, which processes Local Variables sections in the
file.

files.el/after-find-file calls any find-file-hooks, which calls
generic-mode-find-file-hook, which, if it decides to change the mode
to default-generic, kills all local variables in
generic-mode-internal.

Since generic.el is part of emacs and simply loading the file causes
this behavior, it'd be nice if things were integrated more nicely.

The problem is a bit chicken and egg.  You want to run
hack-local-variables before generic.el stuff in case the local
variables set the mode.  But you want generic.el to honor the local
variables.

Probably the simplest solution is to have generic-mode-find-file-hook
call hack-local-variables if it changes the buffer's mode away from
fundamental-mode.


Recent input:
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <down> 
<down> <down> <down> <down> <up> <right> <right> <right> 
<right> <right> <right> <right> <down> <down> <down> 
<down> <down> <down> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <left> <right> <left> <right> <left> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <left> <left> <left> <left> <left> <right> 
<right> <right> <right> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <menu-bar> <help-menu> <re
port-emacs-bug>

Recent messages:
Quit
Note: file is write protected
Mark saved where search started
Note: file is write protected [2 times]
Mark saved where search started [4 times]
Auto-saving...done
Wrote /tmp/somefile
File local-variables error: (error "Local variables entry is terminated 
incorrectly")
Wrote /tmp/somefile [2 times]
Loading emacsbug...done

-- 
Don't send mail to address@hidden
The address is there for spammers to harvest.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]