[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: easy-menu subtlety
From: |
Dan Nicolaescu |
Subject: |
Re: easy-menu subtlety |
Date: |
Wed, 20 Feb 2008 10:20:40 -0800 |
Stefan Monnier <address@hidden> 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...