GNU bug report logs -
#57003
28.1.90; Can local variables be loaded before loading major mode?
Previous Next
Full log
View this message in rfc822 format
Ihor Radchenko <yantar92 <at> gmail.com> writes:
> The first thing executed when activating a major-mode is (according to
> define-derived-mode) kill-all-local-variables which consist of
>
> run_hook (Qchange_major_mode_hook);
> reset_buffer_local_variables (current_buffer, 0);
> bset_update_mode_line (current_buffer);
>
> Having 'permanent-local variables will only affect
> change-major-mode-hook. I know no other hook ran earlier.
>
> Why not instead add something that is run _after_
> kill-all-local-variables? Then, there will be no need to fiddle with
> 'permanently-local (which might have undesired side effects).
That'd work for things that use `define-derived-mode', but not all modes
are defined that way and call `kill-all-local-variables' "manually".
This bug report was last modified 1 year and 288 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.