[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 458e175270 2/3: Merge branch 'emacs-29' of git.sv.gnu.org:/srv/
From: |
Michael Albinus |
Subject: |
emacs-29 458e175270 2/3: Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs into emacs-29 |
Date: |
Fri, 23 Dec 2022 13:29:48 -0500 (EST) |
branch: emacs-29
commit 458e1752701d22100131182fa04f89cc971f6d86
Merge: 86b11981b0 eccb813a94
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs into emacs-29
---
admin/notes/git-workflow | 2 +-
doc/emacs/custom.texi | 6 +++++-
etc/NEWS | 10 ++++++++++
lisp/simple.el | 2 ++
lisp/subr.el | 22 ++++++++++++----------
lisp/textmodes/reftex-vars.el | 4 ++--
lisp/vc/vc-git.el | 13 +++++++------
src/window.c | 3 ++-
8 files changed, 41 insertions(+), 21 deletions(-)
diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow
index 265a106bad..717fc55077 100644
--- a/admin/notes/git-workflow
+++ b/admin/notes/git-workflow
@@ -70,7 +70,7 @@ commit 958b768a6534ae6e77a8547a56fc31b46b63710b
cd ~/emacs/emacs-28
git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b
-and add "Backport:" to the commit string. Then
+and optionally add "Backport:" to the commit string. Then
git push
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index aaf41d2aef..f75512a00e 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -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
diff --git a/etc/NEWS b/etc/NEWS
index 0e84459634..5ce3e21e8b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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
---
diff --git a/lisp/simple.el b/lisp/simple.el
index f85428ca74..4551b749d5 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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)
diff --git a/lisp/subr.el b/lisp/subr.el
index e142eaa810..a5e66de27d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -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.
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index ee94cc5d69..51dedddf3a 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -2096,8 +2096,8 @@ may require a restart of Emacs in order to become
effective."
(defcustom reftex-allow-detached-macro-args nil
"Non-nil means, allow arguments of macros to be detached by whitespace.
-When this is t, `aaa' will be considered as argument of \\bb in the following
-construct: \\bbb [xxx] {aaa}."
+When this is t, `aaa' will be considered as argument of \\bbb in
+the following construct: \\bbb [xxx] {aaa}."
:group 'reftex-miscellaneous-configurations
:type 'boolean)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index b5959d535c..afaaa44e90 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1041,12 +1041,13 @@ It is based on `log-edit-mode', and has Git-specific
extensions."
(string-replace file-diff "" vc-git-patch-string))
(user-error "Index not empty"))
(setq pos (point))))))
- (let ((patch-file (make-nearby-temp-file "git-patch")))
- (with-temp-file patch-file
- (insert vc-git-patch-string))
- (unwind-protect
- (vc-git-command nil 0 patch-file "apply" "--cached")
- (delete-file patch-file))))
+ (unless (string-empty-p vc-git-patch-string)
+ (let ((patch-file (make-nearby-temp-file "git-patch")))
+ (with-temp-file patch-file
+ (insert vc-git-patch-string))
+ (unwind-protect
+ (vc-git-command nil 0 patch-file "apply" "--cached")
+ (delete-file patch-file)))))
(cl-flet ((boolean-arg-fn
(argument)
(lambda (value) (when (equal value "yes") (list argument)))))
diff --git a/src/window.c b/src/window.c
index 90fa6ac2df..cd43919a7d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -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