From 7c9d92054d28e9ee4f617a51c6b6aa628372c03b Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 10 Jan 2024 18:32:52 +0100 Subject: [PATCH] ; Stop advertising obsolete 'help-follow{,-mouse}' * lisp/faces.el (list-faces-display) * lisp/international/mule-diag.el (list-character-sets): Suggest 'push-button' instead of 'help-follow' and 'help-follow-mouse'. --- lisp/faces.el | 16 ++++++++-------- lisp/international/mule-diag.el | 5 +---- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index b774070c613..a85ffa21299 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1479,7 +1479,8 @@ argument, prompt for a regular expression using `read-regexp'." (mapcar (lambda (f) (let ((s (symbol-name f))) (when (or all-faces (string-match-p regexp s)) - (setq max-length (max (length s) max-length)) + (setq max-length (max (string-width s) + max-length)) f))) (sort (face-list) #'string-lessp)))) (unless faces @@ -1489,13 +1490,12 @@ argument, prompt for a regular expression using `read-regexp'." (with-help-window "*Faces*" (with-current-buffer standard-output (setq truncate-lines t) - (insert - (substitute-command-keys - (concat - "\\Use " - (if (display-mouse-p) "\\[help-follow-mouse] or ") - "\\[help-follow] on a face name to customize it\n" - "or on its sample text for a description of the face.\n\n"))) + (insert (format line-format + (substitute-command-keys + "Face (\\\\[push-button] for details)")) + "Sample\n" + (make-string (1- max-length) ?-) " " + (make-string (string-width list-faces-sample-text) ?-) "\n") (setq help-xref-stack nil) (dolist (face faces) (setq face-name (symbol-name face)) diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index e8556119995..e195354a2a9 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -75,10 +75,7 @@ but still shows the full information." ;; Insert header. (insert "Supplementary character sets are shown below.\n") (insert - (substitute-command-keys - (concat "Use " - (if (display-mouse-p) "\\[help-follow-mouse] or ") - "\\[help-follow]:\n"))) + (substitute-command-keys "Use \\\\[push-button]:\n")) (insert " on a column title to sort by that title,") (indent-to 48) (insert "+----DIMENSION\n") -- 2.39.5