From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Q on byte-compiling and define-derived-mode Date: Sat, 3 Jun 2006 08:49:29 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1149349810 30585 80.91.229.2 (3 Jun 2006 15:50:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 3 Jun 2006 15:50:10 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 03 17:50:07 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FmYO1-0001BX-JU for ged-emacs-devel@m.gmane.org; Sat, 03 Jun 2006 17:50:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FmYO1-0007J5-6F for ged-emacs-devel@m.gmane.org; Sat, 03 Jun 2006 11:50:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FmYNp-0007I9-5j for emacs-devel@gnu.org; Sat, 03 Jun 2006 11:49:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FmYNm-0007Ep-JY for emacs-devel@gnu.org; Sat, 03 Jun 2006 11:49:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FmYNm-0007Em-DT for emacs-devel@gnu.org; Sat, 03 Jun 2006 11:49:46 -0400 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1FmYUV-0006fk-3g for emacs-devel@gnu.org; Sat, 03 Jun 2006 11:56:43 -0400 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k53Fni4h000304 for ; Sat, 3 Jun 2006 10:49:45 -0500 Original-Received: from dradamslap (dhcp-amer-csvpn-gw2-141-144-72-16.vpn.oracle.com [141.144.72.16]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id k53Fnhj2013989 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sat, 3 Jun 2006 09:49:44 -0600 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-reply-to: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE 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:55667 Archived-At: I have a file that starts with (define-derived-mode foo-mode...). Later in the file Please send a precise test case. Right. I've determined the cause: if the define-derived-mode is not at top level, then the warning occurs. I guess this is normal after all, as its execution depends on other code. Anyway, here's the test case: (defvar foo-mode-map nil "Keymap for `foo-mode'.") (unless foo-mode-map (let ((map (make-sparse-keymap "Foo"))) (define-key map "?" 'fooey) (setq foo-mode-map map))) (when t (define-derived-mode foo-mode nil "Foo" "Major mode for Fooness" (setq mode-line-format nil) (set (make-local-variable 'auto-hscroll-mode) nil) (set (make-local-variable 'auto-window-vscroll) nil) (set (make-local-variable 'transient-mark-mode) nil) (setq cursor-in-non-selected-windows t) (blink-cursor-mode 1))) (defun foo () "Pure foo" (interactive) (foo-mode)) ------------------ Compiling file throw-1.el at Sat Jun 03 08:44:50 2006 In end of data: throw-1.el:23:1:Warning: the function `foo-mode' is not known to be defined.