]> code.delx.au - gnu-emacs/commitdiff
Avoid hard-coding "M-x command" in docstrings
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 Aug 2015 21:08:47 +0000 (14:08 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 Aug 2015 21:09:47 +0000 (14:09 -0700)
* lisp/calendar/todo-mode.el (todo-mode):
* lisp/desktop.el (desktop-save-mode):
* lisp/edmacro.el (edit-kbd-macro):
* lisp/emacs-lisp/package.el (package-menu-execute):
* lisp/emulation/viper-cmd.el (viper-ask-level):
* lisp/emulation/viper-init.el (viper-expert-level):
* lisp/filesets.el (filesets-add-buffer):
* lisp/follow.el (follow-mode):
* lisp/gnus/auth-source.el (auth-sources):
* lisp/international/ogonek.el (ogonek-informacja)
(ogonek-information):
* lisp/net/tramp.el (tramp-process-actions):
* lisp/org/org-gnus.el (org-gnus-no-new-news):
* lisp/org/org.el (org-ellipsis):
* lisp/progmodes/python.el (python-shell-get-process-or-error):
* lisp/progmodes/vhdl-mode.el (vhdl-mode):
* lisp/server.el (server-start):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/userlock.el (ask-user-about-supersession-help):
* lisp/whitespace.el (whitespace-report-region):
Prefer (substitute-command-keys "`\\[foo-command]'")
to "`M-x foo-command'" in docstrings and the like.

19 files changed:
lisp/calendar/todo-mode.el
lisp/desktop.el
lisp/edmacro.el
lisp/emacs-lisp/package.el
lisp/emulation/viper-cmd.el
lisp/emulation/viper-init.el
lisp/filesets.el
lisp/follow.el
lisp/gnus/auth-source.el
lisp/international/ogonek.el
lisp/net/tramp.el
lisp/org/org-gnus.el
lisp/org/org.el
lisp/progmodes/python.el
lisp/progmodes/vhdl-mode.el
lisp/server.el
lisp/type-break.el
lisp/userlock.el
lisp/whitespace.el

index e780e4ee11e786a620951a7e6e9e5bc4467ef01d..925d00866d139320d567cf3eda99c0fb3664a771 100644 (file)
@@ -6598,7 +6598,9 @@ Added to `window-configuration-change-hook' in Todo mode."
 
 \\{todo-mode-map}"
   (if (called-interactively-p 'any)
 
 \\{todo-mode-map}"
   (if (called-interactively-p 'any)
-      (message "Type ‘M-x todo-show’ to enter Todo mode")
+      (message "%s"
+               (substitute-command-keys
+                "Type ‘\\[todo-show]’ to enter Todo mode"))
     (todo-modes-set-1)
     (todo-modes-set-2)
     (todo-modes-set-3)
     (todo-modes-set-1)
     (todo-modes-set-2)
     (todo-modes-set-3)
index c168f9c9d9aaf310233a6437d7881c7e9a530a4a..9d023e3dc89d393479fee3698036c1aa5d376f22 100644 (file)
@@ -165,8 +165,8 @@ one session to another.  In particular, Emacs will save the desktop when
 it exits (this may prompt you; see the option `desktop-save').  The next
 time Emacs starts, if this mode is active it will restore the desktop.
 
 it exits (this may prompt you; see the option `desktop-save').  The next
 time Emacs starts, if this mode is active it will restore the desktop.
 
-To manually save the desktop at any time, use the command `M-x desktop-save'.
-To load it, use `M-x desktop-read'.
+To manually save the desktop at any time, use the command `\\[desktop-save]'.
+To load it, use `\\[desktop-read]'.
 
 Once a desktop file exists, Emacs will auto-save it according to the
 option `desktop-auto-save-timeout'.
 
 Once a desktop file exists, Emacs will auto-save it according to the
 option `desktop-auto-save-timeout'.
index 84dfd4f1ebfabdac20be2be7cf659c0a04c03eab..acbd1e2f6b932571974c841bfd1b11316d6e888c 100644 (file)
@@ -89,7 +89,7 @@ Default nil means to write characters above \\177 in octal notation."
   "Edit a keyboard macro.
 At the prompt, type any key sequence which is bound to a keyboard macro.
 Or, type `C-x e' or RET to edit the last keyboard macro, `C-h l' to edit
   "Edit a keyboard macro.
 At the prompt, type any key sequence which is bound to a keyboard macro.
 Or, type `C-x e' or RET to edit the last keyboard macro, `C-h l' to edit
-the last 300 keystrokes as a keyboard macro, or `M-x' to edit a macro by
+the last 300 keystrokes as a keyboard macro, or `\\[execute-extended-command]' to edit a macro by
 its command name.
 With a prefix argument, format the macro in a more concise way."
   (interactive "kKeyboard macro to edit (C-x e, M-x, C-h l, or keys): \nP")
 its command name.
 With a prefix argument, format the macro in a more concise way."
   (interactive "kKeyboard macro to edit (C-x e, M-x, C-h l, or keys): \nP")
index 863a02df252ea21af8067b193c81241f3ade68d1..4ff6e07f851c6da6badd25ebcc84b81f46ea60df 100644 (file)
@@ -3193,7 +3193,8 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm."
             (if-let ((removable (package--removable-packages)))
                 (message "Package menu: Operation finished.  %d packages %s"
                   (length removable)
             (if-let ((removable (package--removable-packages)))
                 (message "Package menu: Operation finished.  %d packages %s"
                   (length removable)
-                  "are no longer needed, type `M-x package-autoremove' to remove them")
+                  (substitute-command-keys
+                   "are no longer needed, type `\\[package-autoremove]' to remove them"))
               (message (replace-regexp-in-string "__" "ed" message-template)
                 "finished"))))))))
 
               (message (replace-regexp-in-string "__" "ed" message-template)
                 "finished"))))))))
 
index 5e1620df57ce455f89fb291c97a03150568a5e4a..40a37c7d8b60f1f6241328ebb7a2b9305a979e44 100644 (file)
@@ -4782,10 +4782,10 @@ sensitive for VI-style look-and-feel."
          (setq repeated t))
        (setq dont-change-unless t
              level-changed t)
          (setq repeated t))
        (setq dont-change-unless t
              level-changed t)
-       (insert "
+       (insert (substitute-command-keys "
 Please specify your level of familiarity with the venomous VI PERil
 \(and the VI Plan for Emacs Rescue).
 Please specify your level of familiarity with the venomous VI PERil
 \(and the VI Plan for Emacs Rescue).
-You can change it at any time by typing `M-x viper-set-expert-level RET'
+You can change it at any time by typing `\\[viper-set-expert-level]'
 
  1 -- BEGINNER: Almost all Emacs features are suppressed.
        Feels almost like straight Vi.  File name completion and
 
  1 -- BEGINNER: Almost all Emacs features are suppressed.
        Feels almost like straight Vi.  File name completion and
@@ -4803,7 +4803,7 @@ You can change it at any time by typing `M-x viper-set-expert-level RET'
        viper-electric-mode, viper-want-ctl-h-help, viper-want-emacs-keys-in-vi,
        and viper-want-emacs-keys-in-insert.  Adjust these to your taste.
 
        viper-electric-mode, viper-want-ctl-h-help, viper-want-emacs-keys-in-vi,
        and viper-want-emacs-keys-in-insert.  Adjust these to your taste.
 
-Please, specify your level now: ")
+Please, specify your level now: "))
 
        (setq viper-expert-level (- (viper-read-char-exclusive) ?0))
        ) ; end while
 
        (setq viper-expert-level (- (viper-read-char-exclusive) ?0))
        ) ; end while
index e575eee6c93a0edfce6155979190d24eb8581a08..d03d703c1ed3a5827bcad1371bb3abb2921b3eb6 100644 (file)
@@ -279,7 +279,7 @@ The minor mode viper-vi-diehard-minor-mode is in effect when
 viper-expert-level is 1 or 2 or when viper-want-emacs-keys-in-vi is t.
 The minor mode viper-insert-diehard-minor-mode is in effect when
 viper-expert-level is 1 or 2 or if viper-want-emacs-keys-in-insert is t.
 viper-expert-level is 1 or 2 or when viper-want-emacs-keys-in-vi is t.
 The minor mode viper-insert-diehard-minor-mode is in effect when
 viper-expert-level is 1 or 2 or if viper-want-emacs-keys-in-insert is t.
-Use `M-x viper-set-expert-level' to change this.")
+Use `\\[viper-set-expert-level]' to change this.")
 
 ;; Max expert level supported by Viper.  This is NOT a user option.
 ;; It is here to make it hard for the user from resetting it.
 
 ;; Max expert level supported by Viper.  This is NOT a user option.
 ;; It is here to make it hard for the user from resetting it.
index f990333006b7e75bfa4d3c0d991cf696be681173..a30c187676b18e5b8b3a326643feb9a048965857 100644 (file)
@@ -1808,7 +1808,8 @@ User will be queried, if no fileset name is provided."
                        (progn
       (add-to-list 'filesets-data (list name '(:files)))
       (message
                        (progn
       (add-to-list 'filesets-data (list name '(:files)))
       (message
-       "Fileset %s created.  Call `M-x filesets-save-config' to save."
+       (substitute-command-keys
+        "Fileset %s created.  Call `\\[filesets-save-config]' to save.")
        name)
       (car filesets-data))))))
     (if entry
        name)
       (car filesets-data))))))
     (if entry
index abb874e756347e1edf4725cf309aaf2681152fab..d62d5577dabab64dc5eeeb6857d77aa788b57db5 100644 (file)
@@ -405,7 +405,7 @@ mileage may vary).
 
 To split one large window into two side-by-side windows, the commands
 `\\[split-window-right]' or \
 
 To split one large window into two side-by-side windows, the commands
 `\\[split-window-right]' or \
-`M-x follow-delete-other-windows-and-split' can be used.
+`\\[follow-delete-other-windows-and-split]' can be used.
 
 Only windows displayed in the same frame follow each other.
 
 
 Only windows displayed in the same frame follow each other.
 
index d502a3b3904a56ecb7bc020ba41c1aa3e4e0d6dd..0c0e63b100afc2beba29b3afcb34e406cac77397 100644 (file)
@@ -242,7 +242,7 @@ EPA/EPG set up, the file will be encrypted and decrypted
 automatically.  See Info node `(epa)Encrypting/decrypting gpg files'
 for details.
 
 automatically.  See Info node `(epa)Encrypting/decrypting gpg files'
 for details.
 
-It's best to customize this with `M-x customize-variable' because the choices
+It's best to customize this with `\\[customize-variable]' because the choices
 can get pretty complex."
   :group 'auth-source
   :version "24.1" ;; No Gnus
 can get pretty complex."
   :group 'auth-source
   :version "24.1" ;; No Gnus
index 27ac17ca80e74b542dd23eb773e39c378606bfe9..9e5a450135794addba16d6d694ba43f97d119866 100644 (file)
@@ -75,7 +75,7 @@ are given in the following order:
 Je/sli czytasz ten tekst, to albo przegl/adasz plik /xr/od/lowy
 biblioteki `ogonek.el', albo wywo/la/le/s polecenie `ogonek-jak'.
 W drugim przypadku mo/zesz usun/a/c tekst z ekranu, stosuj/ac
 Je/sli czytasz ten tekst, to albo przegl/adasz plik /xr/od/lowy
 biblioteki `ogonek.el', albo wywo/la/le/s polecenie `ogonek-jak'.
 W drugim przypadku mo/zesz usun/a/c tekst z ekranu, stosuj/ac
-polecenie `M-x kill-buffer'.
+polecenie `\\[kill-buffer]'.
 
 Niniejsza biblioteka dostarcza funkcji do zmiany kodowania polskich
 znak/ow diakrytycznych. Funkcje te mo/zna pogrupowa/c nast/epuj/aco.
 
 Niniejsza biblioteka dostarcza funkcji do zmiany kodowania polskich
 znak/ow diakrytycznych. Funkcje te mo/zna pogrupowa/c nast/epuj/aco.
@@ -174,7 +174,7 @@ znak/ow diakrytycznych. Funkcje te mo/zna pogrupowa/c nast/epuj/aco.
 
 If you read this text then you are either looking at the library's
 source text or you have called the `ogonek-how' command. In the
 
 If you read this text then you are either looking at the library's
 source text or you have called the `ogonek-how' command. In the
-latter case you may remove this text using `M-x kill-buffer'.
+latter case you may remove this text using `\\[kill-buffer]'.
 
 The library provides functions for changing the encoding of Polish
 diacritic characters, the ones with an `ogonek' below or above them.
 
 The library provides functions for changing the encoding of Polish
 diacritic characters, the ones with an `ogonek' below or above them.
index e534b5841b6dc59f333349dab1419641734e720a..193d70b230a168f304472356e97048bfc2ee95c0 100644 (file)
@@ -3594,9 +3594,10 @@ connection buffer."
           (cond
            ((eq exit 'permission-denied) "Permission denied")
            ((eq exit 'process-died)
           (cond
            ((eq exit 'permission-denied) "Permission denied")
            ((eq exit 'process-died)
-            (concat
-             "Tramp failed to connect.  If this happens repeatedly, try\n"
-             "    `M-x tramp-cleanup-this-connection'"))
+             (substitute-command-keys
+              (concat
+               "Tramp failed to connect.  If this happens repeatedly, try\n"
+               "    `\\[tramp-cleanup-this-connection]'")))
            ((eq exit 'timeout)
             (format
              "Timeout reached, see buffer `%s' for details"
            ((eq exit 'timeout)
             (format
              "Timeout reached, see buffer `%s' for details"
index 8b616f0a0ffeab81ad5b1e23c2fee861c19475f9..06f00a4950c1d329c00a11fc70aa5348c44223cf 100644 (file)
@@ -291,7 +291,7 @@ If `org-store-link' was called with a prefix arg the meaning of
        (group (gnus-group-jump-to-group group))))
 
 (defun org-gnus-no-new-news ()
        (group (gnus-group-jump-to-group group))))
 
 (defun org-gnus-no-new-news ()
-  "Like `M-x gnus' but doesn't check for new news."
+  "Like `\\[gnus]' but doesn't check for new news."
   (if (not (gnus-alive-p)) (if org-gnus-no-server (gnus-no-server) (gnus))))
 
 (provide 'org-gnus)
   (if (not (gnus-alive-p)) (if org-gnus-no-server (gnus-no-server) (gnus))))
 
 (provide 'org-gnus)
index 0cc185c0d7509caaa2f0acf1d2e3d5f89e4b1788..326fb96fa1307006628921faeeacf438ad4752ee 100644 (file)
@@ -827,7 +827,7 @@ When nil, just use the standard three dots.
 When a string, use that string instead.
 When a face, use the standard 3 dots, but with the specified face.
 The change affects only Org-mode (which will then use its own display table).
 When a string, use that string instead.
 When a face, use the standard 3 dots, but with the specified face.
 The change affects only Org-mode (which will then use its own display table).
-Changing this requires executing `M-x org-mode RET' in a buffer to become
+Changing this requires executing `\\[org-mode]' in a buffer to become
 effective."
   :group 'org-startup
   :type '(choice (const :tag "Default" nil)
 effective."
   :group 'org-startup
   :type '(choice (const :tag "Default" nil)
index 0b7b9b7f5019e9015e5a7d27c41735684177bc3d..189cd3759f5337e98f053d02871eb2ceafa5fd46 100644 (file)
@@ -2720,7 +2720,8 @@ of `error' with a user-friendly message."
   (or (python-shell-get-process)
       (if interactivep
           (user-error
   (or (python-shell-get-process)
       (if interactivep
           (user-error
-           "Start a Python process first with `M-x run-python' or `%s'."
+           "Start a Python process first with ‘%s’ or ‘%s’."
+           (substitute-command-keys "\\[run-python]")
            ;; Get the binding.
            (key-description
             (where-is-internal
            ;; Get the binding.
            (key-description
             (where-is-internal
index 2edacf4e69a1ec60a6d3eeed42971ea8b338fb74..451acd2cb9c0db2dee6000be23c57bc4e2bc7b88 100644 (file)
@@ -4421,7 +4421,7 @@ Usage:
     according to option `vhdl-argument-list-indent'.
 
       If option `vhdl-indent-tabs-mode' is nil, spaces are used instead of
     according to option `vhdl-argument-list-indent'.
 
       If option `vhdl-indent-tabs-mode' is nil, spaces are used instead of
-    tabs.  `M-x tabify' and `M-x untabify' allow to convert spaces to tabs
+    tabs.  `\\[tabify]' and `\\[untabify]' allow to convert spaces to tabs
     and vice versa.
 
       Syntax-based indentation can be very slow in large files.  Option
     and vice versa.
 
       Syntax-based indentation can be very slow in large files.  Option
@@ -4732,7 +4732,7 @@ Usage:
     `vhdl-highlight-translate-off' is non-nil.
 
       For documentation and customization of the used colors see
     `vhdl-highlight-translate-off' is non-nil.
 
       For documentation and customization of the used colors see
-    customization group `vhdl-highlight-faces' (`M-x customize-group').  For
+    customization group `vhdl-highlight-faces' (`\\[customize-group]').  For
     highlighting of matching parenthesis, see customization group
     `paren-showing'.  Automatic buffer highlighting is turned on/off by
     option `global-font-lock-mode' (`font-lock-auto-fontify' in XEmacs).
     highlighting of matching parenthesis, see customization group
     `paren-showing'.  Automatic buffer highlighting is turned on/off by
     option `global-font-lock-mode' (`font-lock-auto-fontify' in XEmacs).
@@ -4792,14 +4792,14 @@ Usage:
     sessions using the \"Save Options\" menu entry.
 
       Options and their detailed descriptions can also be accessed by using
     sessions using the \"Save Options\" menu entry.
 
       Options and their detailed descriptions can also be accessed by using
-    the \"Customize\" menu entry or the command `M-x customize-option' (`M-x
-    customize-group' for groups).  Some customizations only take effect
+    the \"Customize\" menu entry or the command `\\[customize-option]'
+    (`\\[customize-group]' for groups).  Some customizations only take effect
     after some action (read the NOTE in the option documentation).
     Customization can also be done globally (i.e. site-wide, read the
     INSTALL file).
 
       Not all options are described in this documentation, so go and see
     after some action (read the NOTE in the option documentation).
     Customization can also be done globally (i.e. site-wide, read the
     INSTALL file).
 
       Not all options are described in this documentation, so go and see
-    what other useful user options there are (`M-x vhdl-customize' or menu)!
+    what other useful user options there are (`\\[vhdl-customize]' or menu)!
 
 
   FILE EXTENSIONS:
 
 
   FILE EXTENSIONS:
@@ -4828,7 +4828,7 @@ Usage:
 Maintenance:
 ------------
 
 Maintenance:
 ------------
 
-To submit a bug report, enter `M-x vhdl-submit-bug-report' within VHDL Mode.
+To submit a bug report, enter `\\[vhdl-submit-bug-report]' within VHDL Mode.
 Add a description of the problem and include a reproducible test case.
 
 Questions and enhancement requests can be sent to <reto@gnu.org>.
 Add a description of the problem and include a reproducible test case.
 
 Questions and enhancement requests can be sent to <reto@gnu.org>.
index b6b0e97aa366c55bb41a333a51b2576dcfd5140d..bcadcc4317abefbeb243e99af979a35ece3d689a 100644 (file)
@@ -624,8 +624,9 @@ To force-start a server, do \\[server-force-delete] and then
         (concat "Unable to start the Emacs server.\n"
                 (format "There is an existing Emacs server, named %S.\n"
                         server-name)
         (concat "Unable to start the Emacs server.\n"
                 (format "There is an existing Emacs server, named %S.\n"
                         server-name)
-                "To start the server in this Emacs process, stop the existing
-server or call `M-x server-force-delete' to forcibly disconnect it.")
+                (substitute-command-keys
+                  "To start the server in this Emacs process, stop the existing
+server or call `\\[server-force-delete]' to forcibly disconnect it."))
         :warning)
        (setq leave-dead t))
       ;; If this Emacs already had a server, clear out associated status.
         :warning)
        (setq leave-dead t))
       ;; If this Emacs already had a server, clear out associated status.
index 5a12f02f87656650de05f3d200b4b9c08e021292..c7043b5c0e4c50b83e1b34bf7a213005517c5f88 100644 (file)
@@ -803,8 +803,9 @@ this or ask the user to start one right now."
    (type-break-mode-line-message-mode)
    (t
     (beep t)
    (type-break-mode-line-message-mode)
    (t
     (beep t)
-    (message "%sYou should take a typing break now.  Do `M-x type-break'."
-             (type-break-time-stamp))
+    (message "%sYou should take a typing break now.  Do ‘%s’."
+             (type-break-time-stamp)
+             (substitute-command-keys "\\[type-break]"))
     (sit-for 1)
     (beep t)
     ;; return nil so query caller knows to reset reminder, as if user
     (sit-for 1)
     (beep t)
     ;; return nil so query caller knows to reset reminder, as if user
index c47bc4c9bd1060e1b776a0370c1b40bfb5ebe527..781023c7449a6d187ac1100cd799b9014fb31882 100644 (file)
@@ -142,7 +142,7 @@ If you say `r' to revert, the contents of the buffer are refreshed
 from the file on disk.
 If you say `n', the change you started to make will be aborted.
 
 from the file on disk.
 If you say `n', the change you started to make will be aborted.
 
-Usually, you should type `n' and then `M-x revert-buffer',
+Usually, you should type `n' and then `\\[revert-buffer]',
 to get the latest version of the file, then make the change again.")
     (with-current-buffer standard-output
       (help-mode))))
 to get the latest version of the file, then make the change again.")
     (with-current-buffer standard-output
       (help-mode))))
index a1a6c3ce04abdfc68f915acfe1ea303d41ae780a..ddc37f10180df94144fb9eaf23853ca15e343d61 100644 (file)
@@ -1866,9 +1866,11 @@ cleaning up these problems."
              (whitespace-insert-value ws-tab-width)
              (when has-bogus
                (goto-char (point-max))
              (whitespace-insert-value ws-tab-width)
              (when has-bogus
                (goto-char (point-max))
-               (insert " Type `M-x whitespace-cleanup'"
+               (insert (substitute-command-keys
+                         " Type ‘\\[whitespace-cleanup]’")
                        " to cleanup the buffer.\n\n"
                        " to cleanup the buffer.\n\n"
-                       " Type `M-x whitespace-cleanup-region'"
+                       (substitute-command-keys
+                         " Type ‘\\[whitespace-cleanup-region]’")
                        " to cleanup a region.\n\n"))
              (whitespace-display-window (current-buffer)))))
        has-bogus))))
                        " to cleanup a region.\n\n"))
              (whitespace-display-window (current-buffer)))))
        has-bogus))))