unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: William Xu <william.xwl@gmail.com>
Subject: Re: outline-minor-mode-prefix doen't work?
Date: Tue, 01 Nov 2005 22:26:41 +0800	[thread overview]
Message-ID: <878xw8jvfi.fsf@williamxwl.com> (raw)
In-Reply-To: <85zmooshla.fsf@lola.goethe.zz> (David Kastrup's message of "Tue,  01 Nov 2005 13:00:49 +0100")

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.

In all, i was saying these two cases, 

;; change prefix successfully, prefix will be changed to "\C-o".
(setq outline-minor-mode-prefix "\C-o")
(require 'outline)

;; change prefix without success, prefix will still be the one
;; defined in `outline.el' as "\C-c".
(require 'outline)
(setq outline-minor-mode-prefix "\C-o")

-- 
William

((email . "william.xwl@gmail.com")
 (blog  . "http://matchsticker.mysmth.net"))

  reply	other threads:[~2005-11-01 14:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-27 15:51 outline-minor-mode-prefix doen't work? Brep
2005-10-28 10:25 ` Per Abrahamsen
2005-10-28 16:25   ` Zhang Wei
2005-11-01  4:32     ` Stefan Monnier
2005-11-01 10:19       ` William Xu
     [not found]       ` <mailman.13541.1130841913.20277.help-gnu-emacs@gnu.org>
2005-11-01 12:00         ` David Kastrup
2005-11-01 14:26           ` William Xu [this message]
     [not found]           ` <mailman.13562.1130855207.20277.help-gnu-emacs@gnu.org>
2005-11-01 15:38             ` David Kastrup
2005-11-01 16:17               ` William Xu
     [not found]               ` <mailman.13612.1130899457.20277.help-gnu-emacs@gnu.org>
2005-11-02 10:19                 ` Per Abrahamsen
2005-11-02 11:47                   ` William Xu
2005-11-02 10:20                 ` David Kastrup
2005-11-06 12:17       ` Zhang Wei
2005-11-06 12:50         ` David Kastrup
2005-11-22 20:05         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878xw8jvfi.fsf@williamxwl.com \
    --to=william.xwl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).