GNU bug report logs - #7710
lisp/emacs-lisp/easymenu.el - Correct easy-menu-define doctring

Previous Next

Package: emacs;

Reported by: Jari Aalto <jari.aalto <at> cante.net>

Date: Wed, 22 Dec 2010 16:51:01 UTC

Severity: normal

Found in version 23.2+1-5.1

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7710 in the body.
You can then email your comments to 7710 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7710; Package emacs. (Wed, 22 Dec 2010 16:51:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jari Aalto <jari.aalto <at> cante.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 22 Dec 2010 16:51:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jari Aalto <jari.aalto <at> cante.net>
To: submit <at> debbugs.gnu.org
Subject: lisp/emacs-lisp/easymenu.el - Correct easy-menu-define doctring
Date: Wed, 22 Dec 2010 18:56:37 +0200
[Message part 1 (text/plain, inline)]
Package: emacs
Version: 23.2+1-5.1
Severity: normal

doc-view.el uses:

    (easy-menu-define doc-view-menu doc-view-mode-map
      "Menu for Doc View mode."
      '("DocView"
        ["Toggle display"		doc-view-toggle-display]
        ("Continuous"
       ...

The argument ENABLE appears to be optional. The patch adjusts the
docstring. It was generated against:

    0804bcf 2010-12-22  Merge branch 'master' of git://git.sv.gnu.org/emacs

2010-12-22  Jari Aalto  <jari.aalto <at> cante.net>

        * emacs-lisp/easymenu.el (easy-menu-define): Correct docstring; change
        from [NAME CALLBACK ENABLE] to [NAME CALLBACK [ENABLE]]

-- System Information
Debian Release: squeeze/sid
  APT Prefers testing
  APT policy: (990, testing) (500, unstable) (1, experimental)
Architecture: amd64
Kernel: Linux picasso 2.6.32-5-amd64 #1 SMP Fri Sep 17 21:50:19 UTC 2010 x86_64 GNU/Linux
Locale: LANG=en_DK.UTF-8

-- Versions of packages `emacs depends on'.
Depends:
emacs23         23.2+1-5.1      GNU Emacs is the extensible self-documenting 
emacs23-lucid   23.2+1-5.1      GNU Emacs is the extensible self-documenting 
emacs23-nox     23.2+1-5.1      GNU Emacs is the extensible self-documenting 

[0001-easy-menu-define-Correct-description-to-NAME-CALLBAC.patch (text/x-diff, inline)]
From 901e3765fcad591da9a77017b9c8008cfe33ade7 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto <at> cante.net>
Date: Wed, 22 Dec 2010 18:51:17 +0200
Subject: [PATCH] (easy-menu-define): Correct description to [NAME CALLBACK [ENABLE]]
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


Signed-off-by: Jari Aalto <jari.aalto <at> cante.net>
---
 lisp/emacs-lisp/easymenu.el |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index 9992861..f8e9c07 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -71,7 +71,7 @@ whenever this expression's value is non-nil.
 
 The rest of the elements in MENU, are menu items.
 
-A menu item is usually a vector of three elements:  [NAME CALLBACK ENABLE]
+A menu item is usually a vector of three elements:  [NAME CALLBACK [ENABLE]]
 
 NAME is a string--the menu item name.
 
@@ -79,7 +79,8 @@ CALLBACK is a command to run when the item is chosen,
 or a list to evaluate when the item is chosen.
 
 ENABLE is an expression; the item is enabled for selection
-whenever this expression's value is non-nil.
+whenever this expression's value is non-nil. If not defined, the menu item
+is always shown.
 
 Alternatively, a menu item may have the form:
 
-- 
1.7.2.3


Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7710; Package emacs. (Thu, 23 Dec 2010 15:03:02 GMT) Full text and rfc822 format available.

Message #8 received at 7710 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jari Aalto <jari.aalto <at> cante.net>
Cc: 7710 <at> debbugs.gnu.org
Subject: Re: bug#7710: lisp/emacs-lisp/easymenu.el - Correct easy-menu-define
	doctring
Date: Thu, 23 Dec 2010 10:09:05 -0500
close 7710
thanks

> The argument ENABLE appears to be optional.

It's not just that it's optional but that there is an alternative
format, and in that alternative format [NAME CALLBACK] is valid.
The docstring says a bit further down from your change:

   [...]
   Alternatively, a menu item may have the form:
   
      [ NAME CALLBACK [ KEYWORD ARG ] ... ]
   
   Where KEYWORD is one of the symbols defined below.
   [...]
   

-- Stefan




bug closed, send any further explanations to Jari Aalto <jari.aalto <at> cante.net> Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Thu, 23 Dec 2010 15:03:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 21 Jan 2011 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.