[Top][All Lists]

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

Re: fundamental-mode-hook

From: Lennart Borgman (gmail)
Subject: Re: fundamental-mode-hook
Date: Thu, 08 Feb 2007 19:25:57 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20061207 Thunderbird/ Mnenhy/

Karl Fogel wrote:
"Lennart Borgman (gmail)" <address@hidden> writes:
Juanma Barranquero wrote:
I thought that a hook like (the now non-existent)
fundamental-mode-hook was meant for adding things for minor mode for

I can not really understand the rational for not having it. There can
still be minor mode active in a buffer with in fundamental-mode, or?

(And currently Info is incorrect.)

I've added the hook now.  Thanks, Juanma Barranquero, for the timely
archive pointers!

   2007-02-08  Karl Fogel  <address@hidden>

        * emacs/lisp/simple.el (fundamental-mode-hook): Declare new hook.
        (fundamental-mode): Run the new dedicated hook, and don't run
        after-change-major-mode-hooks manually anymore.

   $ cvs ci -F msg simple.el ChangeLog
   /cvsroot/emacs/emacs/lisp/simple.el,v  <--  simple.el
   new revision: 1.844; previous revision: 1.843
   /cvsroot/emacs/emacs/lisp/ChangeLog,v  <--  ChangeLog
   new revision: 1.10663; previous revision: 1.10662
   Mailing notification to address@hidden sent.
   Mailing diffs to address@hidden 2 sent.

Thanks. I just recompiled from CVS and tested. I can find the hook, but it does not seem to be run. Or I am doing something bad. This is what I used for testing:

(defun temp-fund()
  (message "temp-fund here")
  (sit-for 2))

(add-hook 'fundamental-mode-hook 'temp-fund)

(get-buffer-create "Test fund")

  (message "%s, major-mode=%s" (current-buffer) major-mode))

reply via email to

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