;; the versioned ChangeLog.N rather than the unversioned ChangeLog.
(zerop (call-process "make" nil nil nil
"-C" root "change-history-nocommit"))
- (error "Problem updating ChangeLog, try \"C-u M-x authors RET\""))
+ (error (substitute-command-keys
+ "Problem updating ChangeLog, try \"\\[universal-argument] \\[authors]\"")))
(let ((logs (process-lines find-program root "-name" "ChangeLog*"))
(table (make-hash-table :test 'equal))
(buffer-name "*Authors*")
(buf (get-buffer-create "*abbrev-suggest*")))
(set-buffer buf)
(erase-buffer)
- (insert "** Abbrev expansion usage **
+ (insert (substitute-command-keys "** Abbrev expansion usage **
Below is a list of expansions for which abbrevs are defined, and
the number of times the expansion was typed manually. To display
-and edit all abbrevs, type `M-x edit-abbrevs RET'\n\n")
+and edit all abbrevs, type \\[edit-abbrevs].\n\n"))
(dolist (expansion totals)
(insert (format " %s: %d\n" (car expansion) (cdr expansion))))
(display-buffer buf)))
"Initial height of Calculator window.")
(defcalcmodevar calc-display-trail t
- "If non-nil, M-x calc creates a window to display Calculator trail.")
+ "If non-nil, \\[calc] creates a window to display Calculator trail.")
(defcalcmodevar calc-show-selections t
"If non-nil, selected sub-formulas are shown by obscuring rest of formula.
(with-current-buffer (calc-trail-buffer)
(and calc-display-trail
(calc-trail-display 1 t)))
- (message "Welcome to the GNU Emacs Calculator! Press `?' or `h' for help, `q' to quit")
+ (message (substitute-command-keys
+ (concat "Welcome to the GNU Emacs Calculator! \\<calc-mode-map>"
+ "Press \\[calc-help] or \\[calc-help-prefix] for help, \\[calc-quit] to quit")))
(run-hooks 'calc-start-hook)
(and (windowp full-display)
(window-point full-display)
#'completion-locate-db-error "27.1")
(defun completion-locate-db-error ()
;; recursive error: really scrod
- (error "Completion database corrupted. Try M-x clear-all-completions. Send bug report"))
+ (error (substitute-command-keys
+ "Completion database corrupted. Try \\[clear-all-completions]. Send bug report")))
;; WRITES
(defun add-completion-to-tail-if-new (string)
\\[dired-omit-mode]\t-- toggle omitting of files
\\[dired-mark-sexp]\t-- mark by Lisp expression
-To see the options you can set, use M-x customize-group RET dired-x RET.
+To see the options you can set, use \\[customize-group] RET dired-x RET.
See also the functions:
`dired-flag-extension'
`dired-virtual'
(mapconcat #'symbol-name available " "))))
(mapc (lambda (p) (package-install p 'dont-select)) available)))
((> difference 0)
- (message "Packages that are not available: %d (the rest is already installed), maybe you need to `M-x package-refresh-contents'"
+ (message (substitute-command-keys
+ "Packages that are not available: %d (the rest is already \
+installed), maybe you need to \\[package-refresh-contents]")
difference))
(t
(message "All your packages are already installed"))))))
To submit a bug report or to contact the author, type :submitReport in Vi
command mode. To shoo Viper away and return to pure Emacs (horror!), type:
- M-x viper-go-away
+ \\[viper-go-away]
This startup message appears whenever you load Viper, unless you type `y' now."
))
colors to display. Otherwise, this command computes a list of
colors that the current display can handle. Customize
`list-colors-sort' to change the order in which colors are shown.
-Type `g' or \\[revert-buffer] after customizing `list-colors-sort'
-to redisplay colors in the new order.
+Type \\<help-mode-map>\\[revert-buffer] after customizing \
+`list-colors-sort' to redisplay colors in
+the new order.
-If the optional argument BUFFER-NAME is nil, it defaults to *Colors*.
+If the optional argument BUFFER-NAME is nil, it defaults to \"*Colors*\".
If the optional argument CALLBACK is non-nil, it should be a
function to call each time the user types RET or clicks on a
(with-output-to-temp-buffer "*Bug Help*"
(princ (substitute-command-keys
(format "\
-You invoked the command M-x report-emacs-bug,
+You invoked the command \\[report-emacs-bug],
but you decided not to mail the bug report to the Emacs maintainers.
If you want to mail it to someone else instead,
(setq initialized t)))
(if (and buffer-auto-save-file-name
(file-exists-p buffer-auto-save-file-name))
- (message "Auto save file for draft message exists; consider M-x mail-recover"))
+ (message (substitute-command-keys
+ "Auto save file for draft message exists; consider \\[mail-recover]")))
initialized))
(declare-function dired-view-file "dired" ())
;; after this function returns, overwriting any message we do here.
(when (and (called-interactively-p 'interactive) (not menu-bar-mode))
(run-with-idle-timer 0 nil 'message
- "Menu Bar mode disabled. Use M-x menu-bar-mode to make the menu bar appear.")))
+ (substitute-command-keys
+ "Menu Bar mode disabled. \
+Use \\[menu-bar-mode] to make the menu bar appear."))))
;;;###autoload
;; (This does not work right unless it comes after the above definition.)
with a version control system, to revert on one machine after pulling
changes from another. I believe the procedure must be like this:
-1. M-x org-save-all-org-buffers
+1. \\[org-save-all-org-buffers]
2. Pull changes from the other machine, resolve conflicts
-3. M-x org-revert-all-org-buffers"
+3. \\[org-revert-all-org-buffers]"
(interactive)
(unless (yes-or-no-p "Revert all Org buffers from their files? ")
(user-error "Abort"))
"The following Makefile rules define the dependencies for all (non-
expanded) grammars in directory \"%s\".\n
They are stored in the kill-ring, i.e., you can insert them with C-y
-into your Makefile. You can also invoke M-x antlr-show-makefile-rules
+into your Makefile. You can also invoke \\[antlr-show-makefile-rules]
from within a Makefile to insert them directly.\n\n\n"
"Introduction to use with \\[antlr-show-makefile-rules].
It is a format string and used with substitution DIRECTORY/%s where
(unless in-makefile
(copy-region-as-kill (point-min) (point-max))
(goto-char (point-min))
- (insert (format antlr-help-rules-intro dirname)))))
+ (insert (format (substitute-command-keys antlr-help-rules-intro)
+ dirname)))))
;;;###autoload
(defun antlr-show-makefile-rules ()
;; Apparently we're not running with -i=mi (or we're, for
;; instance, debugging something inside a Docker instance with
;; Emacs on the outside).
- (let ((msg "Error: Either -i=mi wasn't specified on the GDB command line, or the extra socket couldn't be established. Consider using `M-x gud-gdb' instead."))
+ (let ((msg (substitute-command-keys
+ "Error: Either -i=mi wasn't specified on the GDB command line,\
+ or the extra socket couldn't be established. Consider using \\[gud-gdb] instead.")))
(message msg)
(setq string (concat (propertize msg 'font-lock-face 'error)
"\n" string)))
xscheme-signal-death-message)
(progn
(beep)
- (message
-"The Scheme process has died! Do M-x reset-scheme to restart it"))))))
+ (message (substitute-command-keys
+"The Scheme process has died! Type \\[reset-scheme] to restart it")))))))
(defun xscheme-process-filter-initialize (running-p)
(setq xscheme-process-filter-state 'idle)
reference size, line height, space width, average character width.
To get the info for another specific font (say Helvetica), do the following:
- create a new buffer
-- generate the PostScript image to a file (C-u M-x ps-print-buffer)
+- generate the PostScript image to a file (\\[universal-argument] \\[ps-print-buffer])
- open this file and delete the leading `%' (which is the PostScript comment
character) from the line
`% 3 cm 20 cm moveto 10/Courier ReportFontInfo showpage'
(setq-local recentf-edit-list nil)
(widget-insert
(format-message
- "Click on OK to delete selected files from the recent list.
-Click on Cancel or type `q' to cancel.\n"))
+ (substitute-command-keys
+ "Click on OK to delete selected files from the recent list.
+Click on Cancel or type \\[recentf-cancel-dialog] to cancel.\n")))
;; Insert the list of files as checkboxes
(dolist (item recentf-list)
(widget-create 'checkbox
", or type the corresponding digit key,"
"")
" to open it.\n"
- (format-message "Click on Cancel or type `q' to cancel.\n"))
+ (substitute-command-keys
+ "Click on Cancel or type \\[recentf-cancel-dialog] to cancel.\n"))
;; Use a L&F that looks like the recentf menu.
(tree-widget-set-theme "folder")
(apply #'widget-create
(interactive)
(ediff-barf-if-not-control-buffer)
(run-hooks 'ediff-suspend-hook)
- (message
- "To resume, type M-x eregistry and select the desired Ediff session"))
+ (message (substitute-command-keys
+ "To resume, type \\[eregistry] and select the desired Ediff session")))
;; ediff-barf-if-not-control-buffer ensures only called from ediff.
(declare-function ediff-version "ediff" ())
("->" cvs-secondary-branch-prefix))))
" " cvs-mode-line-process))
(if buffer-file-name
- (error "Use M-x cvs-quickdir to get a *cvs* buffer"))
+ (error (substitute-command-keys
+ "Use \\[cvs-quickdir] to get a *cvs* buffer")))
(buffer-disable-undo)
;;(setq-local goal-column cvs-cursor-column)
(setq-local revert-buffer-function 'cvs-mode-revert-buffer)
(vc-bzr-command "info" t 0 dir)
(buffer-string)))
(shelve (vc-bzr-shelve-list))
- (shelve-help-echo "Use M-x vc-bzr-shelve to create shelves")
+ (shelve-help-echo (substitute-command-keys
+ "Use \\[vc-bzr-shelve] to create shelves"))
(root-dir (vc-bzr-root dir))
(pending-merge
;; FIXME: looking for .bzr/checkout/merge-hashes is not a