emacs-devel
[Top][All Lists]
Advanced

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

Re: How global is a define-global-minor-mode mode?


From: Johan Bockgård
Subject: Re: How global is a define-global-minor-mode mode?
Date: Wed, 03 Jan 2007 01:18:07 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (gnu/linux)

Richard Stallman <address@hidden> writes:

> My impression is that the global mode defined with
> define-global-minor-mode does not affect all buffers to be created
> in the future. It only catches buffers created by visiting files.

It also affects buffers that use a non-fundamental mode. It does this:

     ;; Setup hook to handle future mode changes and new buffers.
     (if ,global-mode
         (progn
           (add-hook 'after-change-major-mode-hook
                ',MODE-enable-in-buffers)
           (add-hook 'find-file-hook ',MODE-check-buffers)
           (add-hook 'change-major-mode-hook ',MODE-cmhh))

-- 
Johan Bockgård





reply via email to

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