From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: [drew.adams@oracle.com: RE: weird defadvice bug withbyte-compilation] Date: Mon, 12 Dec 2005 00:23:34 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1134365273 823 80.91.229.2 (12 Dec 2005 05:27:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Dec 2005 05:27:53 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 12 06:27:50 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ElgDD-0000Fl-Nm for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2005 06:27:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ElgDg-0006JB-QW for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2005 00:27:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ElgBT-0004Dd-Fv for emacs-devel@gnu.org; Mon, 12 Dec 2005 00:25:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ElgBR-0004Bx-HE for emacs-devel@gnu.org; Mon, 12 Dec 2005 00:25:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ElgBQ-0004BL-I6 for emacs-devel@gnu.org; Mon, 12 Dec 2005 00:25:08 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ElgD5-0005RH-Ls for emacs-devel@gnu.org; Mon, 12 Dec 2005 00:26:51 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Elg9u-0003nW-RE; Mon, 12 Dec 2005 00:23:34 -0500 Original-To: "Drew Adams" In-reply-to: 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:47513 Archived-At: See my previous message - I already indicated that the menu-enable is testing a void variable. The question is why it is void. It is void because there is nothing in the code to set it. Why do you think it would NOT be void? There are a couple of questions involved (see my email), including how define-minor-mode works. What does this have to do with define-minor-mode? Your code does not use define-minor-mode. File 1: foo.el -------------- (defvar mymap nil "") (let ((map (make-sparse-keymap "II"))) (setq mymap (make-sparse-keymap)) (define-key menu-bar-search-menu [ise] '("" . ise)) (put 'ise 'menu-enable '(and my-mode)) (push (cons 'my-mode mymap) minor-mode-map-alist)) (defadvice next-history-element (after ffff activate) "" my-mode) (provide 'foo) File 2: bar.el -------------- (defconst special-display-regexps '("[ ]?[*][^*]+[*]")) (defvar drews-lisp-dir "C:\\drews-lisp-20" "") (setq load-path (append (list drews-lisp-dir) load-path)) (defadvice occur-mode-goto-occurrence (around jjjjjj activate compile) "" ad-do-it) (require 'foo)