[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6ecb24f: Merge from origin/emacs-28
From: |
Stefan Kangas |
Subject: |
master 6ecb24f: Merge from origin/emacs-28 |
Date: |
Thu, 9 Dec 2021 09:12:52 -0500 (EST) |
branch: master
commit 6ecb24f877242371a0dbc7938e9b408df2690dc7
Merge: 24e9616 1821844
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
Merge from origin/emacs-28
1821844357 Add missing K key documentation for Cangjie input methods
be860c1385 Fix manual entry of 'quit-restore-window' (Bug#52328)
35a96139df Clarify a comment in xdisp.c
6ba2f028cf Revert "Grep alias `all' shall not match parent directory"
eb9e33e238 ; * etc/NEWS: Non-nil repeat-keep-prefix is not the defaul...
538fc1d0e0 Fix mode-line display in Calendar mode
# Conflicts:
# etc/NEWS
# lisp/help.el
---
doc/lispref/help.texi | 8 ++++++--
doc/lispref/windows.texi | 12 ++++++------
etc/NEWS.28 | 14 ++++++++------
lisp/calendar/calendar.el | 3 ++-
lisp/help.el | 35 +++++++++++++++++++++--------------
lisp/international/titdic-cnv.el | 2 +-
lisp/progmodes/grep.el | 2 +-
src/xdisp.c | 9 +++++----
8 files changed, 50 insertions(+), 35 deletions(-)
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index 71017a4..e7b6406 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -379,11 +379,15 @@ quotes. You can customize it freely according to your
personal
preference.
@end defopt
-@defun substitute-command-keys string
+@defun substitute-command-keys string &optional no-face
+@vindex help-key-binding@r{ (face)}
This function scans @var{string} for the above special sequences and
replaces them by what they stand for, returning the result as a string.
This permits display of documentation that refers accurately to the
-user's own customized key bindings.
+user's own customized key bindings. By default, the key bindings are
+given a special face @code{help-key-binding}, but if the optional
+argument @var{no-face} is non-@code{nil}, the function doesn't add
+this face to the produced string.
@cindex advertised binding
If a command has multiple bindings, this function normally uses the
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index f8dcca7..395b88e 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -4306,12 +4306,12 @@ deleted unconditionally. Otherwise, the fate of the
frame is
determined by calling @code{frame-auto-hide-function} (see below) with
that frame as sole argument.
-If the third element of the @code{quit-restore} parameter is a list of
-buffer, window start (@pxref{Window Start and End}), and point
-(@pxref{Window Point}), and that buffer is still live, the buffer will
-be displayed, and start and point set accordingly. If, in addition,
-@var{window}'s buffer was temporarily resized, this function will also
-try to restore the original height of @var{window}.
+If the second element of the @code{quit-restore} parameter is a list
+of a buffer, a window start (@pxref{Window Start and End}) and a
+window point (@pxref{Window Point}), and that buffer is still live,
+the buffer will be displayed, and start and point set accordingly.
+If, in addition, @var{window}'s buffer was temporarily resized, this
+function will also try to restore the original height of @var{window}.
Otherwise, if @var{window} was previously used for displaying other
buffers (@pxref{Window History}), the most recent buffer in that
diff --git a/etc/NEWS.28 b/etc/NEWS.28
index 8e38c36..eb65213 100644
--- a/etc/NEWS.28
+++ b/etc/NEWS.28
@@ -635,7 +635,9 @@ This works like 'C-u M-x apropos-command' but is more
discoverable.
*** Keybindings in 'help-mode' use the new 'help-key-binding' face.
This face is added by 'substitute-command-keys' to any "\[command]"
substitution. The return value of that function should consequently
-be assumed to be a propertized string.
+be assumed to be a propertized string. To prevent the function from
+adding the 'help-key-binding' face, call 'substitute-command-keys'
+with the new optional argument NO-FACE non-nil.
Note that the new face will also be used in tooltips. When using the
GTK toolkit, this is only true if 'x-gtk-use-system-tooltips' is t.
@@ -3273,11 +3275,11 @@ The user option 'repeat-exit-timeout' (default nil,
which means
forever) specifies the number of seconds of idle time after which to
break the repetition chain automatically.
-When user option 'repeat-keep-prefix' is non-nil (the default), the
-prefix arg of the previous command is kept. This can be used to
-e.g. reverse the window navigation direction with 'C-x o M-- o o' or
-to set a new step with 'C-x { C-5 { { {', which will set the window
-resizing step to 5 columns.
+When user option 'repeat-keep-prefix' is non-nil, the prefix arg of
+the previous command is kept. This can be used to e.g. reverse the
+window navigation direction with 'C-x o M-- o o' or to set a new step
+with 'C-x { C-5 { { {', which will set the window resizing step to 5
+columns.
'M-x describe-repeat-maps' will display a buffer showing
which commands are repeatable in 'repeat-mode'.
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index ebce2ae..e06239a 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1723,7 +1723,8 @@ COMMAND is a command to run, ECHO is the help-echo text,
KEY
is COMMAND's keybinding, STRING describes the binding."
(propertize (or key
(substitute-command-keys
- (format "\\<calendar-mode-map>\\[%s] %s" command string)))
+ (format "\\<calendar-mode-map>\\[%s] %s" command string)
+ 'hands-off-my-face))
'help-echo (format "mouse-1: %s" echo)
'mouse-face 'mode-line-highlight
'keymap (make-mode-line-mouse-map 'mouse-1 command)))
diff --git a/lisp/help.el b/lisp/help.el
index eb0a782..5114dde 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1076,11 +1076,12 @@ strings done by `substitute-command-keys'."
:version "29.1"
:group 'help)
-(defun substitute-command-keys (string)
+(defun substitute-command-keys (string &optional no-face)
"Substitute key descriptions for command names in STRING.
Each substring of the form \\\\=[COMMAND] is replaced by either a
keystroke sequence that invokes COMMAND, or \"M-x COMMAND\" if COMMAND
-is not on any keys. Keybindings will use the face `help-key-binding'.
+is not on any keys. Keybindings will use the face `help-key-binding',
+unless the optional argument NO-FACE is non-nil.
Each substring of the form \\\\=`KEYBINDING' will be replaced by
KEYBINDING and use the `help-key-binding' face.
@@ -1177,21 +1178,27 @@ Otherwise, return a new string."
(let ((op (point)))
(insert "M-x ")
(goto-char (+ end-point 3))
- (add-text-properties op (point)
- '( face help-key-binding
- font-lock-face
help-key-binding))
+ (or no-face
+ (add-text-properties
+ op (point)
+ '( face help-key-binding
+ font-lock-face help-key-binding)))
(delete-char 1))
;; Function is on a key.
(delete-char (- end-point (point)))
- (let ((key (help--key-description-fontified key)))
- (insert (if (and help-link-key-to-documentation
- help-buffer-under-preparation
- (functionp fun))
- ;; The `fboundp' fixes bootstrap.
- (if (fboundp 'help-mode--add-function-link)
- (help-mode--add-function-link key fun)
- key)
- key))))))
+
+ (insert
+ (if no-face
+ (key-description key)
+ (let ((key (help--key-description-fontified key)))
+ (if (and help-link-key-to-documentation
+ help-buffer-under-preparation
+ (functionp fun))
+ ;; The `fboundp' fixes bootstrap.
+ (if (fboundp 'help-mode--add-function-link)
+ (help-mode--add-function-link key fun)
+ key)
+ key)))))))
;; 1D. \{foo} is replaced with a summary of the keymap
;; (symbol-value foo).
;; \<foo> just sets the keymap used for \[cmd].
diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el
index dfd4e5b..4ac0100 100644
--- a/lisp/international/titdic-cnv.el
+++ b/lisp/international/titdic-cnv.el
@@ -748,7 +748,7 @@ To get complete usage, invoke \"emacs -batch -f
batch-titdic-convert -h\"."
[Q 手] [W 田] [E 水] [R 口] [T 廿] [Y 卜] [U 山] [I 戈] [O 人] [P 心]
- [A 日] [S 尸] [D 木] [F 火] [G 土] [H 竹] [J 十] [L 中]
+ [A 日] [S 尸] [D 木] [F 火] [G 土] [H 竹] [J 十] [K 大] [L 中]
[Z ] [X 難] [C 金] [V 女] [B 月] [N 弓] [M 一]
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 001989e..70c55c0 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -203,7 +203,7 @@ by `grep-compute-defaults'; to change the default value, use
:version "22.1")
(defcustom grep-files-aliases
- '(("all" . "* .[!.]* ..?*") ;; Don't match `..'. See bug#22577
+ '(("all" . "* .*")
("el" . "*.el")
("ch" . "*.[ch]")
("c" . "*.c")
diff --git a/src/xdisp.c b/src/xdisp.c
index 0ff6286..8138584 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18082,10 +18082,11 @@ compute_window_start_on_continuation_line (struct
window *w)
row, DEFAULT_FACE_ID);
reseat_at_previous_visible_line_start (&it);
- /* If the line start is "too far" away from the window start,
- say it takes too much time to compute a new window start.
- Also, give up if the line start is after point, as in that
- case point will not be visible with any window start we
+ /* Give up (by not using the code in the block below) and say it
+ takes too much time to compute a new window start, if the
+ line start is "too far" away from the window start. Also,
+ give up if the line start is after point, as in that case
+ point will not be visible with any window start we
compute. */
if (IT_CHARPOS (it) <= PT
|| (CHARPOS (start_pos) - IT_CHARPOS (it)