[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52973: Adding a few context-menu-mode commands
From: |
Juri Linkov |
Subject: |
bug#52973: Adding a few context-menu-mode commands |
Date: |
Mon, 03 Jan 2022 23:12:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
> I am attaching a few patches adding a few features for
> context-menu-mode, that I mentioned and explained here:
> https://ruzkuku.com/texts/emacs-mouse.html.
>
> Would it be OK to add these to Emacs itself?
Thanks, it would be beneficial to enrich the packages with the
context-menus. Man-context-menu is a good addition to the package
man.el, and hi-lock-context-menu to hi-lock.el. However,
mouse-online-search-at-point looks out of place in mouse.el.
Since it relies on eww, wouldn't the right place for it be
in eww.el?
> +(defun Man-at-mouse (e)
> ...
> +(defun Man-context-menu (menu click)
> + "Populate MENU with commands that open a man page at point."
> + (save-excursion
> + (mouse-set-point click)
> + (when (save-excursion
It seems the second 'save-excursion' is superfluous?
> + (skip-syntax-backward "^ ")
> + (and (looking-at
> + "[[:space:]]*\\([[:alnum:]_-]+([[:alnum:]]+)\\)")
> + (match-string 1)))
> + (define-key-after menu [man-separator] menu-bar-separator)
> + (define-key-after menu [man-at-mouse]
> + '(menu-item "Open man page" man-at-mouse
Typo: the command name is capitalized 'Man-at-mouse'.
> + (mouse-set-point click)
> + (when (symbol-at-point)
This can be simplified to:
(thing-at-mouse click 'symbol)
- bug#52973: Adding a few context-menu-mode commands, (continued)
- bug#52973: Adding a few context-menu-mode commands, Juri Linkov, 2022/01/04
- bug#52973: Adding a few context-menu-mode commands, Eli Zaretskii, 2022/01/04
- bug#52973: Adding a few context-menu-mode commands, Philip Kaludercic, 2022/01/04
- bug#52973: Adding a few context-menu-mode commands, Eli Zaretskii, 2022/01/04
- bug#52973: Adding a few context-menu-mode commands, Juri Linkov, 2022/01/05
- bug#52973: Adding a few context-menu-mode commands, Eli Zaretskii, 2022/01/05
- bug#52973: Adding a few context-menu-mode commands, Juri Linkov, 2022/01/05
- bug#52973: Adding a few context-menu-mode commands, Eli Zaretskii, 2022/01/06
- bug#52973: Adding a few context-menu-mode commands, Juri Linkov, 2022/01/06
- bug#52973: Adding a few context-menu-mode commands, Eli Zaretskii, 2022/01/06
bug#52973: Adding a few context-menu-mode commands,
Juri Linkov <=
- bug#52973: Adding a few context-menu-mode commands, Philip Kaludercic, 2022/01/04
- bug#52973: Adding a few context-menu-mode commands, Juri Linkov, 2022/01/05
- bug#52973: Adding a few context-menu-mode commands, Philip Kaludercic, 2022/01/05
- bug#52973: Adding a few context-menu-mode commands, Juri Linkov, 2022/01/06
- bug#52973: Adding a few context-menu-mode commands, Philip Kaludercic, 2022/01/06
- bug#52973: Adding a few context-menu-mode commands, Juri Linkov, 2022/01/06
- bug#52973: Adding a few context-menu-mode commands, Eli Zaretskii, 2022/01/06
- bug#52973: Adding a few context-menu-mode commands, Juri Linkov, 2022/01/06
- bug#52973: Adding a few context-menu-mode commands, Eli Zaretskii, 2022/01/07
- bug#52973: Adding a few context-menu-mode commands, Lars Ingebrigtsen, 2022/01/07