1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

Merge from origin/emacs-28

02853edba7 Fix sorting of menus in `context-menu-local' (bug#50067).
14271d050a Fix flyspell-correct-word selected from context menu opene...
bf824843f4 * lisp/repeat.el (describe-repeat-maps): Print all bound k...
6fc94fb99e * lisp/tab-bar.el: Use 'mouse-1' for history buttons like ...
5eeaf85767 Improve documentation of window hooks
7404f4b4e0 Improve doc string of 'highlight-nonselected-windows'
This commit is contained in:
Stefan Kangas 2021-11-19 07:00:24 +01:00
commit c6d5fccc92
7 changed files with 25 additions and 14 deletions

View file

@ -6419,7 +6419,9 @@ changed. @xref{Other Font Lock Variables}.
during redisplay provided a significant, non-scrolling change of a
window has been detected. For simplicity, these hooks and the
functions they call will be collectively referred to as @dfn{window
change functions}.
change functions}. As any hook, these hooks can be set either
globally of buffer-locally via the @var{local} argument of
@code{add-hook} (@pxref{Setting Hooks}) when the hook is installed.
@cindex window buffer change
The first of these hooks is run after a @dfn{window buffer change} is

View file

@ -2738,7 +2738,7 @@ could provide `global-map' where items are limited to the global map only."
;; sorting.
(push (cons pos menu-item) menu-end)
(push menu-item menu-bar))))
(lookup-key (or keymap (menu-bar-current-active-maps)) [menu-bar]))
(or keymap (lookup-key (menu-bar-current-active-maps) [menu-bar])))
`(keymap ,@(nreverse menu-bar)
,@(mapcar #'cdr (sort menu-end
(lambda (a b)

View file

@ -364,7 +364,7 @@ Some context functions add menu items below the separator."
(when (consp binding)
(define-key-after menu (vector key)
(copy-sequence binding))))
(menu-bar-keymap global-map))
(menu-bar-keymap (lookup-key global-map [menu-bar])))
menu)
(defun context-menu-local (menu _click)
@ -377,7 +377,7 @@ Some context functions add menu items below the separator."
(when (consp binding)
(define-key-after menu (vector key)
(copy-sequence binding))))
keymap)))
(menu-bar-keymap keymap))))
menu)
(defun context-menu-minor (menu _click)
@ -541,8 +541,11 @@ activates the menu whose contents depends on its surrounding context."
"Start key navigation of the context menu.
This is the keyboard interface to \\[context-menu-map]."
(interactive)
(let ((inhibit-mouse-event-check t))
(popup-menu (context-menu-map) (point))))
(let ((inhibit-mouse-event-check t)
(map (context-menu-map)))
(if (commandp map)
(call-interactively map)
(popup-menu map (point)))))
(global-set-key [S-f10] 'context-menu-open)

View file

@ -533,10 +533,12 @@ Used in `repeat-mode'."
(dolist (command (sort (cdr keymap) 'string-lessp))
(let* ((info (help-fns--analyze-function command))
(map (list (symbol-value (car keymap))))
(desc (key-description
(or (where-is-internal command map t)
(where-is-internal (nth 3 info) map t)))))
(princ (format-message " `%s' (bound to '%s')\n" command desc))))
(desc (mapconcat (lambda (key)
(format-message "`%s'" (key-description key)))
(or (where-is-internal command map)
(where-is-internal (nth 3 info) map))
", ")))
(princ (format-message " `%s' (bound to %s)\n" command desc))))
(princ "\n"))))))
(provide 'repeat)

View file

@ -284,7 +284,8 @@ existing tab."
(setq tab-bar--dragging-in-progress t)
;; Don't close the tab when clicked on the close button. Also
;; don't add new tab on down-mouse. Let `tab-bar-mouse-1' do this.
(unless (or (eq (car item) 'add-tab) (nth 2 item))
(unless (or (memq (car item) '(add-tab history-back history-forward))
(nth 2 item))
(if (functionp (nth 1 item))
(call-interactively (nth 1 item))
(unless (eq tab-number t)
@ -298,7 +299,8 @@ regardless of where you click on it. Also add a new tab."
(let* ((item (tab-bar--event-to-item (event-start event)))
(tab-number (tab-bar--key-to-number (nth 0 item))))
(cond
((and (eq (car item) 'add-tab) (functionp (nth 1 item)))
((and (memq (car item) '(add-tab history-back history-forward))
(functionp (nth 1 item)))
(call-interactively (nth 1 item)))
((and (nth 2 item) (not (eq tab-number t)))
(tab-bar-close-tab tab-number)))))

View file

@ -2160,7 +2160,7 @@ The word checked is the word at the mouse position."
(interactive "e")
(let ((save (point)))
(mouse-set-point event)
(flyspell-correct-word-before-point event save)))
(flyspell-correct-word-before-point (and (consp event) event) save)))
(defun flyspell-correct-word-before-point (&optional event opoint)
"Pop up a menu of possible corrections for misspelled word before point.

View file

@ -35370,7 +35370,9 @@ line number may be omitted from the mode line. */);
line_number_display_limit_width = 200;
DEFVAR_BOOL ("highlight-nonselected-windows", highlight_nonselected_windows,
doc: /* Non-nil means highlight region even in nonselected windows. */);
doc: /* Non-nil means highlight active region even in nonselected windows.
When nil (the default), the active region is only highlighted when
the window is selected. */);
highlight_nonselected_windows = false;
DEFVAR_BOOL ("multiple-frames", multiple_frames,