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

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

bug#9214: `fundamental-mode-hook' not run when setting up `fundamental-m


From: Chong Yidong
Subject: bug#9214: `fundamental-mode-hook' not run when setting up `fundamental-mode' under certain circumstances; Info documentation incorrect
Date: Sat, 28 Jan 2012 18:37:12 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Štěpán Němec <address@hidden> 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.






reply via email to

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