diff --git a/etc/symbol-releases.eld b/etc/symbol-releases.eld index 93f0f5419f4..9732f60fc16 100644 --- a/etc/symbol-releases.eld +++ b/etc/symbol-releases.eld @@ -10,6 +10,7 @@ ( ("29.1" fun plistp) + ("29.1" fun help-key) ("28.1" fun always) ("27.1" fun project-files) ("26.1" fun flymake--diag-region) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 7534eb552ad..d7d4a394c4a 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1912,7 +1912,7 @@ return t; if SYM is q or ESC, return nil." (concat (apply #'format-message prompt args) (if help-form (format " [Type yn!q or %s] " - (key-description (vector help-char))) + (help-key)) " [Type y, n, q or !] "))) (set sym (setq char (read-char-choice prompt char-choices))) (if (memq char '(?y ?\s ?!)) t))))) diff --git a/lisp/emacs-lisp/helper.el b/lisp/emacs-lisp/helper.el index 8a173219545..01dbc686437 100644 --- a/lisp/emacs-lisp/helper.el +++ b/lisp/emacs-lisp/helper.el @@ -47,7 +47,7 @@ ;;"f" #'Helper-describe-function ;;"v" #'Helper-describe-variable "?" #'Helper-help-options - (key-description (char-to-string help-char)) #'Helper-help-options) + (help-key) #'Helper-help-options) (fset 'Helper-help-map Helper-help-map) (defun Helper-help-scroller () diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 952497032a2..fc9912f189e 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -173,7 +173,7 @@ The function's value is the number of actions taken." "%s(\\`y', \\`n', \\`!', \\`.', \\`q', %sor \\`%s') " minibuffer-prompt-properties) prompt user-keys - (key-description (vector help-char))))) + (help-key)))) (if minibuffer-auto-raise (raise-frame (window-frame (minibuffer-window)))) (unwind-protect @@ -198,7 +198,7 @@ The function's value is the number of actions taken." (format "%s(\\`y', \\`n', \\`!', \\`.', \\`q', %sor \\`%s') %s" prompt user-keys - (key-description (vector help-char)) + (help-key) (if (equal char -1) "[end-of-keyboard-macro]" (single-key-description char)))))) @@ -279,7 +279,7 @@ Type \\`SPC' or \\`y' to %s the current %s; (message (substitute-command-keys (format "Type \\`%s' for help" - (key-description (vector help-char))))) + (help-key)))) (beep) (sit-for 1) (funcall try-again)))) diff --git a/lisp/help.el b/lisp/help.el index 835e47fec43..b0c003ed16a 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -57,7 +57,7 @@ buffer.") (defun help-key () "Return `help-char' in a format suitable for the `keymap-set' KEY argument." - (key-description (char-to-string help-char))) + (key-description (vector help-char))) (defvar-keymap help-map :doc "Keymap for characters following the Help key." diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 0d90382b2d3..098e39ccf7c 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -550,7 +550,8 @@ ESC or `q' to quit without changing further buffers, (new-bfn (and (stringp bfn) (string-replace source target bfn))) (prompt (format-message "Set visited file name to `%s' [Type yn!eq or %s] " - new-bfn (key-description (vector help-char))))) + new-bfn (if (fboundp 'help-key) (help-key) ; 29.1 + (key-description (vector help-char)))))) (when (and (buffer-live-p buffer) (stringp bfn) (string-prefix-p source bfn) ;; Skip, and don't ask again. diff --git a/lisp/which-key.el b/lisp/which-key.el index bfeb9da7422..c62595da587 100644 --- a/lisp/which-key.el +++ b/lisp/which-key.el @@ -2213,7 +2213,8 @@ Actual lines: %s" (let* ((paging-key (concat prefix-keys " " which-key-paging-key)) (paging-key-bound (eq 'which-key-C-h-dispatch (key-binding (kbd paging-key)))) - (key (key-description (vector help-char))) + (key (if (fboundp 'help-key) (help-key) ; 29.1 + (key-description (vector help-char)))) (key (if paging-key-bound (concat key " or " which-key-paging-key) key)))