all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: 25382@debbugs.gnu.org
Subject: bug#25382: 25.1.91; easy-menu-add empty
Date: Sat, 07 Jan 2017 09:35:53 -0500	[thread overview]
Message-ID: <87shov2b06.fsf@users.sourceforge.net> (raw)
In-Reply-To: <dc1f4ebc-bd44-03b1-8db8-5276adaea4ef@easy-emacs.de> ("Andreas \=\?utf-8\?Q\?R\=C3\=B6hler\=22's\?\= message of "Sat, 7 Jan 2017 09:45:31 +0100")

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

found 25382 23.2
tags 25382 notabug
quit

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> GNU Emacs 25.1.91.1 (i686-pc-linux-gnu, GTK+ Version 3.14.5) of 2017-01-02
>
> At python-mode.el `easy-menu-add' is used, which stopped
> working. Having a look at the source, looks like an empty body is
> provided.

`easy-menu-add's body has been empty since at least 23.2, it was made
empty by [1: 59c7bf4].  As far as I can tell, it only exists to be more
compatible with XEmacs, so this is not a bug.

1: 2008-08-14 17:42:21 +0000 59c7bf4d7bf927e65c6cd40cf36e2e6bcbabfa78
  (easy-menu-add): Don't precompute keybindings since those precomputed values aren't used any more.

I propose the following patch for emacs-25 to clarify that:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1919 bytes --]

From 1a8caf7ad763aa03f279ec54ceec4ff9cc1d7237 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sat, 7 Jan 2017 09:26:08 -0500
Subject: [PATCH v1] Clarify that easy-menu-add is a nop (Bug#25382)

* lisp/emacs-lisp/easymenu.el (easy-menu-add): Make it into an alias of
`ignore', like `easy-menu-remove'.
---
 lisp/emacs-lisp/easymenu.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index 603bbcd..4fc9a78 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -489,7 +489,7 @@ easy-menu-change
 
 ;; XEmacs needs the following two functions to add and remove menus.
 ;; In Emacs this is done automatically when switching keymaps, so
-;; here easy-menu-remove is a noop.
+;; here easy-menu-remove and easy-menu-add are a noops.
 (defalias 'easy-menu-remove 'ignore
   "Remove MENU from the current menu bar.
 Contrary to XEmacs, this is a nop on Emacs since menus are automatically
@@ -497,15 +497,16 @@ 'easy-menu-remove
 
 \(fn MENU)")
 
-(defun easy-menu-add (_menu &optional _map)
+(defalias 'easy-menu-add #'ignore
   "Add the menu to the menubar.
-On Emacs, menus are already automatically activated when the
-corresponding keymap is activated.  On XEmacs this is needed to
-actually add the menu to the current menubar.
+On Emacs this is a nop, because menus are already automatically
+activated when the corresponding keymap is activated.  On XEmacs
+this is needed to actually add the menu to the current menubar.
 
 You should call this once the menu and keybindings are set up
-completely and menu filter functions can be expected to work."
-  )
+completely and menu filter functions can be expected to work.
+
+\(fn MENU &optional MAP)")
 
 (defun add-submenu (menu-path submenu &optional before in-menu)
   "Add submenu SUBMENU in the menu at MENU-PATH.
-- 
2.9.3


  reply	other threads:[~2017-01-07 14:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-07  8:45 bug#25382: 25.1.91; easy-menu-add empty Andreas Röhler
2017-01-07 14:35 ` npostavs [this message]
2017-01-09  6:40   ` Andreas Röhler
2017-01-10  4:40     ` npostavs
2017-01-10  7:49       ` Andreas Röhler
2017-01-10 13:23         ` npostavs
2017-01-10 16:01           ` Andreas Röhler
2017-01-10 16:21             ` Noam Postavsky
2017-01-10 18:47               ` Andreas Röhler
2017-01-11 18:24               ` Glenn Morris
2017-01-12  7:38                 ` Andreas Röhler
2017-01-12 15:32                   ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87shov2b06.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=25382@debbugs.gnu.org \
    --cc=andreas.roehler@easy-emacs.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.