From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Defining keys in derived modes Date: Wed, 28 Feb 2007 21:58:31 +0100 Message-ID: <45E5ECF7.1050404@gmail.com> References: <45E54D4A.601@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1172696340 6128 80.91.229.12 (28 Feb 2007 20:59:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 28 Feb 2007 20:59:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 28 21:58:51 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HMVsx-0005Lm-3l for ged-emacs-devel@m.gmane.org; Wed, 28 Feb 2007 21:58:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HMVsy-0000xM-1H for ged-emacs-devel@m.gmane.org; Wed, 28 Feb 2007 15:58:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HMVsh-0000sU-RY for emacs-devel@gnu.org; Wed, 28 Feb 2007 15:58:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HMVsf-0000oY-39 for emacs-devel@gnu.org; Wed, 28 Feb 2007 15:58:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HMVse-0000o2-JQ for emacs-devel@gnu.org; Wed, 28 Feb 2007 15:58:32 -0500 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HMVsd-0006sQ-Tr for emacs-devel@gnu.org; Wed, 28 Feb 2007 15:58:32 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:60097 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1HMVsc-0005SK-6t for emacs-devel@gnu.org; Wed, 28 Feb 2007 21:58:30 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 In-Reply-To: X-Antivirus: avast! (VPS 000719-0, 2007-02-28), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1HMVsc-0005SK-6t. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1HMVsc-0005SK-6t 57f74a6b067d9b9fe1933e7d684b2086 X-detected-kernel: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67069 Archived-At: Johan Bockgård wrote: > "Lennart Borgman (gmail)" writes: > >> (define-derived-mode nxhtml-part-mode nxhtml-mode "nXhtmlPart" [...] >> >> (defvar nxhtml-part-mode-map [...] >> >> I would expect it to also contain the definition of C-c t, but it >> does not. Should it behave this way? > > -- Special Form: defvar symbol [value [doc-string]] > [...] > If SYMBOL is void and VALUE is specified, `defvar' evaluates it > and sets SYMBOL to the result. But if SYMBOL already has a value > (i.e., it is not void), VALUE is not even evaluated, and SYMBOL's > value remains unchanged. Thanks, yes, but I am a bit confused. There is something else going on too, it works defining in that order now, after restarting Emacs. Maybe something I do not understand in the compilation order? (I do not claim to understand anything there at all, I am just referring to my vague picture of it ;-)