unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50752: 28.0.50; easy-menu-define lowers the menu-bar key
@ 2021-09-23  8:39 Shuguang Sun via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-09-23 17:15 ` Juri Linkov
                   ` (2 more replies)
  0 siblings, 3 replies; 63+ messages in thread
From: Shuguang Sun via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-23  8:39 UTC (permalink / raw)
  To: 50752

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

Hi,


I'm using the package pdf-tools to view PDF files. However the popu-menu does't work in recent emacs snapshot. I find it is due the automaticly lowering the menu-bar by easy-menu-deine. Is it a feature or bug?


Of pdf-tools (from melpa or from http://github.com/vedang/pdf-tools/), in the pdf-misc.el it defines
```
(easy-menu-define nil pdf-misc-menu-bar-minor-mode-map
  "Menu for PDF Tools."
  `("PDF Tools"
    ["Go Backward" pdf-history-backward
     :visible (bound-and-true-p pdf-history-minor-mode)
     :active (and (bound-and-true-p pdf-history-minor-mode)
                  (not (pdf-history-end-of-history-p)))]
```
And the responding function
```
(defun pdf-misc-popup-context-menu (event)
  "Popup a context menu at position determined by EVENT."
  (interactive "@e")
  (popup-menu
   (cons 'keymap
         (cddr (lookup-key pdf-misc-menu-bar-minor-mode-map
                           [menu-bar PDF\ Tools])))))
```

However, it can't find the key of "PDF\ Tools". Instead, I find in the `pdf-misc-menu-bar-minor-mode-map`, that,
```
(keymap
 (menu-bar keymap
           (pdf\ tools menu-item #1="PDF Tools"
                       (keymap #1#
                               (Go\ Backward menu-item "Go Backward" pdf-history-backward :enable
```

It becomes lower case (`pdf\ tools`).


If I change the case, the function works again:
```(defun pdf-misc-popup-context-menu (event)
  "Popup a context menu at position determined by EVENT."
  (interactive "@e")
  (popup-menu
   (cons 'keymap
         (cddr (lookup-key pdf-misc-menu-bar-minor-mode-map
                           [menu-bar pdf\ tools])))))
```


Best Regards,
Shuguang Sun





In GNU Emacs 28.0.50 (build 1, x86_64-w64-mingw32)
 of 2021-09-21 built on YJ190169-SSG
Repository revision: 5b962a7ad8d0acfe40a41ce139059b9c8e46f666
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.19043
System Description: Microsoft Windows 10 Pro (v10.0.2009.19043.1237)

Configured using:
 'configure --without-pop --with-native-image-api
 --with-native-compilation --without-compress-install
 '--program-transform-name=s/^ctags$/ctags.emacs/''

Configured features:
ACL DBUS GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES
NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS XPM ZLIB

[-- Attachment #2: Type: text/html, Size: 3664 bytes --]

^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2021-10-28 20:44 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-23  8:39 bug#50752: 28.0.50; easy-menu-define lowers the menu-bar key Shuguang Sun via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-23 17:15 ` Juri Linkov
2021-09-23 21:45 ` Lars Ingebrigtsen
2021-10-12 22:22   ` Stefan Kangas
2021-10-13 11:28     ` Lars Ingebrigtsen
2021-10-13 11:59     ` Eli Zaretskii
2021-10-13 12:04       ` Lars Ingebrigtsen
2021-10-13 12:19         ` Stefan Kangas
2021-10-13 12:58           ` Lars Ingebrigtsen
2021-10-13 15:26             ` Stefan Kangas
2021-10-13 15:42               ` Lars Ingebrigtsen
2021-10-19  3:22                 ` Stefan Kangas
2021-10-19  3:40                   ` Lars Ingebrigtsen
2021-10-19  3:52                     ` Lars Ingebrigtsen
2021-10-19 11:56                       ` Eli Zaretskii
2021-10-19 12:07                         ` Lars Ingebrigtsen
2021-10-19 12:17                           ` Lars Ingebrigtsen
2021-10-19 12:37                           ` Eli Zaretskii
2021-10-19 12:45                             ` Lars Ingebrigtsen
2021-10-19 13:24                               ` Lars Ingebrigtsen
2021-10-19 16:01                                 ` Eli Zaretskii
2021-10-19 15:41                               ` Eli Zaretskii
2021-10-19 15:57                                 ` Lars Ingebrigtsen
2021-10-19 16:12                                   ` Eli Zaretskii
2021-10-19 16:15                                     ` Lars Ingebrigtsen
2021-10-19 16:21                                     ` Lars Ingebrigtsen
2021-10-19 16:30                                       ` Eli Zaretskii
2021-10-19 17:12                                         ` Lars Ingebrigtsen
2021-10-19 17:37                                           ` Eli Zaretskii
2021-10-19 18:21                                             ` Lars Ingebrigtsen
2021-10-20 11:28                                               ` Eli Zaretskii
2021-10-20 11:55                                                 ` Glenn Morris
2021-10-24 20:11                                                   ` Stefan Kangas
2021-10-25 13:06                                                     ` Lars Ingebrigtsen
2021-10-25 13:19                                                       ` Eli Zaretskii
2021-10-25 13:21                                                         ` Lars Ingebrigtsen
2021-10-25 13:51                                                           ` Eli Zaretskii
2021-10-25 13:55                                                             ` Lars Ingebrigtsen
2021-10-25 14:12                                                               ` Eli Zaretskii
2021-10-26  8:38                                                                 ` Stefan Kangas
2021-10-26 13:04                                                                   ` Eli Zaretskii
2021-10-26 20:24                                                                     ` Stefan Kangas
2021-10-27 14:00                                                                       ` Eli Zaretskii
2021-10-28  5:29                                                                         ` Stefan Kangas
2021-10-28  7:33                                                                           ` Eli Zaretskii
2021-10-28  8:06                                                                             ` Stefan Kangas
2021-10-28  9:35                                                                               ` Eli Zaretskii
2021-10-28 10:49                                                                                 ` Stefan Kangas
2021-10-28 12:49                                                                                   ` Eli Zaretskii
2021-10-28 20:44                                                                                     ` Stefan Kangas
2021-10-21  2:45                                                 ` Lars Ingebrigtsen
2021-10-21  7:26                                                   ` Eli Zaretskii
2021-10-21 13:04                                                     ` Lars Ingebrigtsen
2021-10-20  7:45                                             ` Lars Ingebrigtsen
2021-10-20 12:24                                               ` Eli Zaretskii
2021-10-19 11:43                   ` Eli Zaretskii
2021-10-19 21:54                     ` Stefan Kangas
2021-10-20 12:59                       ` Eli Zaretskii
2021-10-13 16:09               ` Eli Zaretskii
2021-10-15  5:59       ` Eli Zaretskii
2021-10-15 18:34         ` Stefan Kangas
2021-10-19  3:18       ` Stefan Kangas
2021-09-23 22:28 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).