Subject: bug#9214: `fundamental-mode-hook' not run when setting up `fundamental-mode' under certain circumstances; Info documentation incorrect

From: Chong Yidong <[email-masked]>
Date: Sat, 28 Jan 2012 18:37:12 +0800

Štěpán Němec <[email-masked]> writes:

> emacs -Q
>
> (defvar f-m-hook-run 0)
>
> (add-hook 'fundamental-mode-hook
>           (lambda () (setq f-m-hook-run (1+ f-m-hook-run))))
>
> (with-current-buffer (get-buffer-create "f-m-test-buf")
>   major-mode)
> ;=> fundamental-mode
>
> f-m-hook-run
> ;=> 0
>
> (with-current-buffer (get-buffer-create "f-m-test-buf")
>   (fundamental-mode)
>   major-mode)
> ;=> fundamental-mode
>
> f-m-hook-run
> ;=> 1

This was fixed a few months ago (2011-10-27 commit to simple.el).
Closing the bug.  Thanks.