I have some questions.
Richard Stallman <[EMAIL PROTECTED]> writes:
> Lute Kamstra wrote:
>> Modes derived from fundamental mode run after-change-major-mode-hook
>> twice because fundamental mode runs it unconditionally.
I don't understand this. As define-derived-mode is currently defined modes
derived from fundamental-mode do not automatically call the fundamental-mode
function.
[define-derived-mode]
(when (eq parent 'fundamental-mode) (setq parent nil))
[...]
(,(or parent 'kill-all-local-variables))
> Fundamental mode does not run a mode hook because what it means is "put
> settings in their default values". But it needs to run
> after-change-major-mode-hook, since the minor modes that should apply to
> all buffers apply to these buffers too.
Which are "these buffers" that this refers to? A buffer that defaults to
fundamental-mode (as created through C-x C-f on some unknown file type or
through C-x b) does not run the `fundamental-mode' lisp function. Currently
set-buffer-major-mode does not call the major-mode function when the default
mode is fundamental-mode.
[Fset_buffer_major_mode]
if (NILP (function) || EQ (function, Qfundamental_mode))
return Qnil;
[...]
call0 (function);
--
Johan Bockgård
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel