Merge from origin/emacs-29

9a3b08061f Fix ruby-mode.el local command injection vulnerability (b...
4b44a395b3 ; * etc/NEWS: Fix typos.
458e175270 Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs ...
eccb813a94 Fix "C-h k" in recursive minibuffers
6dda2106ec ; Improve documentation of "C-x @"
a0738e8ad1 ; * etc/NEWS: Announce the new behavior of 'C-h f'.  (Bug...
86b11981b0 Update Tramp version (don't merge with master)

# Conflicts:
#	etc/NEWS
This commit is contained in:
Stefan Kangas 2022-12-24 06:30:29 +01:00
commit 8fcedd81ab
6 changed files with 32 additions and 13 deletions

View file

@ -1990,13 +1990,17 @@ to assign meanings to key bindings that use these modifiers. The
modifier bits are labeled as @samp{s-}, @samp{H-} and @samp{A-}
respectively.
@cindex modifier keys unsupported by keyboard
Even if your keyboard lacks these additional modifier keys, you can
enter it using @kbd{C-x @@}: @kbd{C-x @@ h} adds the Hyper flag to
enter them using @kbd{C-x @@}: @kbd{C-x @@ h} adds the Hyper flag to
the next character, @kbd{C-x @@ s} adds the Super flag, and
@kbd{C-x @@ a} adds the Alt flag. For instance, @kbd{C-x @@ h
C-a} is a way to enter @kbd{Hyper-Control-a}. (Unfortunately, there
is no way to add two modifiers by using @kbd{C-x @@} twice for the
same character, because the first one goes to work on the @kbd{C-x}.)
You can similarly enter the Shift, Control, and Meta modifiers by
using @kbd{C-x @ S}, @kbd{C-x @ c}, and @kbd{C-x @ m}, respectively,
although this is rarely needed.
@node Function Keys
@subsection Rebinding Function Keys

View file

@ -265,6 +265,16 @@ controlled by the internal Emacs machinery led to low-contrast faces
in common default setups. Emacs now uses the same 'region' face on
Gtk and non-Gtk setups.
---
** 'C-h f' and 'C-h x' may now require confirmation when you press 'RET'.
If the text in the minibuffer cannot be completed to a single function
or command, typing 'RET' will not automatically complete to the shortest
candidate, but will instead ask for confirmation. Typing 'TAB' will
complete as much as possible, and another 'TAB' will show all the
possible completions. This allows you to insist on the functions name
even if Help doesn't appear to know about it, by confirming with a
second 'RET'.
** Dired
---

View file

@ -1899,7 +1899,7 @@ or `gem' statement around point."
(setq feature-name (read-string "Feature name: " init))))
(let ((out
(substring
(shell-command-to-string (concat "gem which " feature-name))
(shell-command-to-string (concat "gem which " (shell-quote-argument feature-name)))
0 -1)))
(if (string-match-p "\\`ERROR" out)
(user-error "%s" out)

View file

@ -10053,6 +10053,8 @@ PREFIX is the string that represents this modifier in an event type symbol."
event-type
(cons event-type (cdr event)))))))
;; This is what makes "C-x @" followed by [hsmaSc] work even though
;; you won't find any (define-key ctl-x-map "@" ...) binding.
(define-key function-key-map [?\C-x ?@ ?h] 'event-apply-hyper-modifier)
(define-key function-key-map [?\C-x ?@ ?s] 'event-apply-super-modifier)
(define-key function-key-map [?\C-x ?@ ?m] 'event-apply-meta-modifier)

View file

@ -1576,16 +1576,18 @@ in the current Emacs session, then this function may return nil."
;; Use `window-point' for the case when the current buffer
;; is temporarily switched to some other buffer (bug#50256)
(let* ((pos (window-point))
(posn (posn-at-point pos)))
(if (null posn) ;; `pos' is "out of sight".
(list (selected-window) pos '(0 . 0) 0)
;; If `pos' is inside a chunk of text hidden by an `invisible'
;; or `display' property, `posn-at-point' returns the position
;; that *is* visible, whereas `event--posn-at-point' is used
;; when we have a keyboard event, whose position is `point' even
;; if that position is invisible.
(setf (nth 5 posn) pos)
posn)))
(posn (posn-at-point pos (if (minibufferp (current-buffer))
(minibuffer-window)))))
(cond ((null posn) ;; `pos' is "out of sight".
(setq posn (list (selected-window) pos '(0 . 0) 0)))
;; If `pos' is inside a chunk of text hidden by an `invisible'
;; or `display' property, `posn-at-point' returns the position
;; that *is* visible, whereas `event--posn-at-point' is used
;; when we have a keyboard event, whose position is `point' even
;; if that position is invisible.
((> (length posn) 5)
(setf (nth 5 posn) pos)))
posn))
(defun event-start (event)
"Return the starting position of EVENT.

View file

@ -1649,7 +1649,8 @@ check_window_containing (struct window *w, void *user_data)
set *PART to the id of that element.
If there is no window under X, Y return nil and leave *PART
unmodified. TOOL_BAR_P means detect tool-bar windows.
unmodified. TOOL_BAR_P means detect tool-bar windows, and
TAB_BAR_P means detect tab-bar windows.
This function was previously implemented with a loop cycling over
windows with Fnext_window, and starting with the frame's selected