[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: outline-minor-mode-prefix doen't work?
From: |
David Kastrup |
Subject: |
Re: outline-minor-mode-prefix doen't work? |
Date: |
Tue, 01 Nov 2005 16:38:43 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
William Xu <william.xwl@gmail.com> writes:
> David Kastrup <dak@gnu.org> writes:
>
>> William Xu <william.xwl@gmail.com> writes:
>>
>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>
>>>>> has to be put before:
>>>>> (require 'outline)
>>>>
>>>> Why do you need to (require 'outline)?
>>>
>>> ;; suppose in outline.el
>>> (defvar outline-minor-mode-prefix "\C-c")
>>>
>>> (defvar outline-minor-mode-keys
>>> (let ((map (make-sparse-keymap)))
>>> (define-key map "\C-n" 'outline-mode-next-heading)
>>> map))
>>>
>>> (define-key outline-minor-mode-map
>>> outline-minor-mode-prefix
>>> outline-minor-mode-keys)
>>>
>>> If outline.el is loaded before,
>>>
>>> (setq outline-minor-mode-prefix "\C-c")
>
> Oh, here better be,
>
> (setq outline-minor-mode-prefix "\C-o")
>
> as an e.g. of changing the prefix.
>
>>> Then there's no chance to re-evaulate,
>>
>> defvar does not overwrite existing values.
>
> Yes. This is why placing (require 'outline) after
> (setq outline-minor-mode-prefix "\C-o") works.
I repeat Stefan's question:
>>>> Why do you need to (require 'outline)?
You don't need to load outline real fast for the setting of
outline-minor-mode-prefix to have an effect. It is sufficient that it
will be loaded at some point of time.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Re: outline-minor-mode-prefix doen't work?, Zhang Wei, 2005/11/06