From f7ee23e587b01f179284b5554c67d579a2def676 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 15 Aug 2015 17:23:14 -0700 Subject: [PATCH] substitute-command-keys a few more doc strings * lisp/allout.el (outlineify-sticky): * lisp/files.el (hack-one-local-variable--obsolete): * lisp/help-fns.el (help-fns--obsolete, describe-variable): Use substitute-command-keys on some doc strings so that they don't use hard-coded key bindings or quoting styles. --- lisp/allout.el | 5 +++-- lisp/files.el | 3 ++- lisp/help-fns.el | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/allout.el b/lisp/allout.el index db87cb1128..025cb17c20 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -6378,8 +6378,9 @@ for details on preparing Emacs for automatic allout activation." (if (allout-goto-prefix) t (allout-open-topic 2) - (insert (concat "Dummy outline topic header -- see" - "`allout-mode' docstring: `^Hm'.")) + (insert (substitute-command-keys + (concat "Dummy outline topic header -- see" + " ‘allout-mode’ docstring: ‘\\[describe-mode]’."))) (allout-adjust-file-variable "allout-layout" (or allout-layout '(-1 : 0)))))) ;;;_ > allout-file-vars-section-data () diff --git a/lisp/files.el b/lisp/files.el index a371344d11..dd0f28681d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3554,7 +3554,8 @@ It is dangerous if either of these conditions are met: (since (nth 2 o))) (message "%s is obsolete%s; %s" var (if since (format " (since %s)" since)) - (if (stringp instead) instead + (if (stringp instead) + (substitute-command-keys instead) (format "use `%s' instead" instead))))))) (defun hack-one-local-variable (var val) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a5d3834043..71bcdb6e75 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -438,7 +438,8 @@ suitable file is found, return nil." " is obsolete") (when (nth 2 obsolete) (insert (format " since %s" (nth 2 obsolete)))) - (insert (cond ((stringp use) (concat ";\n" use)) + (insert (cond ((stringp use) + (concat ";\n" (substitute-command-keys use))) (use (format ";\nuse ‘%s’ instead." use)) (t ".")) "\n")))) @@ -871,7 +872,8 @@ if it is given a local binding.\n"))) (princ " This variable is obsolete") (if (nth 2 obsolete) (princ (format " since %s" (nth 2 obsolete)))) - (princ (cond ((stringp use) (concat ";\n " use)) + (princ (cond ((stringp use) + (concat ";\n " (substitute-command-keys use))) (use (format ";\n use ‘%s’ instead." (car obsolete))) (t "."))) -- 2.39.2