diff options
author | Juri Linkov <juri@linkov.net> | 2021-10-03 20:35:49 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2021-10-03 20:35:49 +0300 |
commit | 121a5abeaee85e7955786d838f07103ce074a63b (patch) | |
tree | 40d0ab03bbf75d263e32b96f8f9b4c2590a41a58 /lisp/mouse.el | |
parent | 0c341e6e84101251c0e40300519869f24415600d (diff) | |
download | emacs-121a5abeaee85e7955786d838f07103ce074a63b.tar.gz emacs-121a5abeaee85e7955786d838f07103ce074a63b.tar.bz2 emacs-121a5abeaee85e7955786d838f07103ce074a63b.zip |
Move context-menu selection items Defun/List/Symbol to prog-mode (bug#9054)
* lisp/mouse.el (context-menu-functions):
Add context-menu-middle-separator to choices.
(context-menu-region): Move Defun/List/Symbol selection items
to prog-context-menu.
* lisp/progmodes/prog-mode.el (prog-context-menu):
Move Defun/List/Symbol selection items from context-menu-region.
Include text-mode select menu only in strings and comments.
* lisp/textmodes/text-mode.el (text-mode-menu): New function.
(text-mode): Add text-mode-menu to context-menu-functions.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r-- | lisp/mouse.el | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 5d4e05fa25e..bb47d04a3a8 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -290,6 +290,7 @@ and should return the same menu with changes such as added new menu items." :type '(repeat (choice (function-item context-menu-undo) (function-item context-menu-region) + (function-item context-menu-middle-separator) (function-item context-menu-toolbar) (function-item context-menu-global) (function-item context-menu-local) @@ -478,14 +479,6 @@ Some context functions add menu items below the separator." `(menu-item "All" ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'buffer)) :help "Mark the whole buffer for a subsequent cut/copy")) - (define-key-after submenu [mark-defun] - `(menu-item "Defun" - ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'defun)) - :help "Mark the defun at click for a subsequent cut/copy")) - (define-key-after submenu [mark-list] - `(menu-item "List" - ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'list)) - :help "Mark the list at click for a subsequent cut/copy")) (when (let* ((pos (posn-point (event-end click))) (char (when pos (char-after pos)))) (or (and char (eq (char-syntax char) ?\")) @@ -498,10 +491,6 @@ Some context functions add menu items below the separator." `(menu-item "Line" ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'line)) :help "Mark the line at click for a subsequent cut/copy")) - (define-key-after submenu [mark-symbol] - `(menu-item "Symbol" - ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'symbol)) - :help "Mark the symbol at click for a subsequent cut/copy")) (when (region-active-p) (define-key-after submenu [mark-none] `(menu-item "None" |