[Top][All Lists]

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

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

From: Lennart Borgman
Subject: How global is a define-global-minor-mode mode?
Date: Thu, 14 Dec 2006 19:35:27 +0100
User-agent: Thunderbird (Windows/20061025)

I am trying to use define-global-minor-mode, see below. I have customized the global mode to be t, but when I open new buffers the minor mode is not set in them. Is this a bug in define-global-minor-mode?

(define-minor-mode html-site-mode
 "Adds a menu for easy access of setting site, uploading etc."
 :init-value nil
 :lighter nil
 :keymap html-site-mode-map
 :group 'html-site)

(defvar html-site-mode-off-list

(define-global-minor-mode html-site-global-mode html-site-mode
   (html-site-mode 1)
   (when t ;buffer-file-name
     (unless (memq major-mode html-site-mode-off-list)
       (html-site-mode 1))))
 :group 'html-site)

reply via email to

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