From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: easy-menu subtlety Date: Wed, 20 Feb 2008 10:20:40 -0800 Message-ID: <200802201820.m1KIKfoA012850@sallyv1.ics.uci.edu> References: <200802201601.m1KG19WW029916@sallyv1.ics.uci.edu> <200802201720.m1KHKUcw005263@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203531794 16423 80.91.229.12 (20 Feb 2008 18:23:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2008 18:23:14 +0000 (UTC) Cc: Andreas Schwab , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 20 19:23:39 2008 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 1JRtbW-0002Hz-TW for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2008 19:23:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRtb1-0006Wt-SM for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2008 13:23:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRtaF-0006Bt-HO for emacs-devel@gnu.org; Wed, 20 Feb 2008 13:22:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRtaD-0006As-TU for emacs-devel@gnu.org; Wed, 20 Feb 2008 13:22:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRtaD-0006Am-LU for emacs-devel@gnu.org; Wed, 20 Feb 2008 13:22:17 -0500 Original-Received: from sallyv1.ics.uci.edu ([128.195.1.109]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1JRtaD-0000CC-69 for emacs-devel@gnu.org; Wed, 20 Feb 2008 13:22:17 -0500 X-ICS-MailScanner-Watermark: 1204136442.29735@iWk3Z6nLAJOJ68jhkclsdg Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m1KIKfoA012850; Wed, 20 Feb 2008 10:20:41 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Wed, 20 Feb 2008 13:02:06 -0500") Original-Lines: 40 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) 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:89720 Archived-At: Stefan Monnier writes: > >> > The last 3 lines of this code sequence in lisp/progmodes/verilog-mode.el: > >> > > >> > ("Move" > >> > ,(if (featurep 'xemacs) > >> > (progn > >> > ["Beginning of function" verilog-beg-of-defun t] > >> > ["End of function" verilog-end-of-defun t] > >> > ["Mark function" verilog-mark-defun t]) > >> > ["Beginning of function" beginning-of-defun t] > >> > ["End of function" end-of-defun t] > >> > ["Mark function" mark-defun t]) > >> > >> That looks completely bogus to me. The result of the evaluation of the > >> form is a single vector, with the other two just thrown away. I think > >> the intention was to write this: > >> > >> ("Move" > >> ,@(if (featurep 'xemacs) > >> '(["Beginning of function" verilog-beg-of-defun t] > >> ["End of function" verilog-end-of-defun t] > >> ["Mark function" verilog-mark-defun t]) > >> '(["Beginning of function" beginning-of-defun t] > >> ["End of function" end-of-defun t] > >> ["Mark function" mark-defun t])) > > > Thanks, but it doesn't work with emacs-21: "Invalid menu item in easymenu" > > I don't see any good reason for it not to work. Most likely it's some > silly detail somewhere. This said, I'd recommend you just remove the > test and use the XEmacs side of the code, and make sure that > verilog-beg-of-defun is always defined (and make it an alias to > beginning-of-defun under Emacs). The only problem with that is that C-M-a and C-M-e won't appear in the "Beginning of function" and "End of function" menu entries. They would appear if the explicit C-M-a and C-M-e bindings for verilog-beg-of-defun/verilog-end-of-defun are also enabled for emacs. But that is ugly...