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

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

Re: How to watch a variable?


From: Daniel Jensen
Subject: Re: How to watch a variable?
Date: Mon, 03 Sep 2007 14:22:56 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux)

"Ye Wenbin" <wenbinye@gmail.com> writes:

> I found an anony problem. I customize set outline-regexp, but
> the variable is change when start up. I don't know which part
> of my .emacs changed the value.

It's often set by major modes. Your default value is then overridden
locally in those buffers. You can add a hook function to the modes where
you want your own default value, like this:

    (add-hook 'foo-mode-hook
              (lambda ()
                (setq outline-regexp (default-value 'outline-regexp))))

Also, keep in mind that customize will not change the variable until
outline has loaded. You can avoid this problem by using setq in your
init file instead.

If this doesn't solve your problem, it's possible as you say that
outline-regexp was set elsewhere in an init file.


reply via email to

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