From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Xu Newsgroups: gmane.emacs.help Subject: Re: outline-minor-mode-prefix doen't work? Date: Tue, 01 Nov 2005 22:26:41 +0800 Organization: the Church of Emacs Message-ID: <878xw8jvfi.fsf@williamxwl.com> References: <87zmov5569.fsf@gmail.com> <878xwdpq1n.fsf@emacsfans.tsinghua.edu.cn> <87hdax2dm2.fsf-monnier+gnu.emacs.help@gnu.org> <85zmooshla.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1130857612 25858 80.91.229.2 (1 Nov 2005 15:06:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 1 Nov 2005 15:06:52 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 01 16:06:48 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EWxgb-0002qi-Th for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Nov 2005 16:04:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EWxga-0004N0-EE for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Nov 2005 10:04:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EWx65-0005c1-AH for help-gnu-emacs@gnu.org; Tue, 01 Nov 2005 09:26:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EWx63-0005aI-TA for help-gnu-emacs@gnu.org; Tue, 01 Nov 2005 09:26:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EWx63-0005ZK-BR for help-gnu-emacs@gnu.org; Tue, 01 Nov 2005 09:26:43 -0500 Original-Received: from [59.66.131.181] (helo=williamxu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EWx63-00024J-4w for help-gnu-emacs@gnu.org; Tue, 01 Nov 2005 09:26:43 -0500 Original-Received: from williamxu ([127.0.0.1]) by williamxu with esmtp (Exim 3.36 #1 (Debian)) id 1EWx61-0008S8-00 for ; Tue, 01 Nov 2005 22:26:41 +0800 Original-To: help-gnu-emacs@gnu.org In-Reply-To: <85zmooshla.fsf@lola.goethe.zz> (David Kastrup's message of "Tue, 01 Nov 2005 13:00:49 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30741 Archived-At: David Kastrup writes: > William Xu writes: > >> Stefan Monnier 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"))