summaryrefslogtreecommitdiff
path: root/lisp/calc
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-11-22 11:45:44 +0100
committerStefan Kangas <stefan@marxist.se>2021-11-22 12:04:19 +0100
commit4a3ba8528bc8b8f083251cbebe46e5978e9ec816 (patch)
tree4612762962ae0547ce297c30f3e212406a9f56b4 /lisp/calc
parente91f71676c19127dd90efabfc0da36483aa53a82 (diff)
downloademacs-4a3ba8528bc8b8f083251cbebe46e5978e9ec816.tar.gz
Use substitute-command-keys for literal key sequences
* lisp/abbrev.el (expand-region-abbrevs): * lisp/calc/calc-graph.el (calc-graph-show-dumb): * lisp/calc/calc-help.el (calc-help-for-help): * lisp/calc/calc-mode.el (calc-auto-why): * lisp/calc/calc.el (calc-do): * lisp/calculator.el (calculator-mode): * lisp/dired-aux.el (dired-create-files) (dired-do-create-files-regexp, dired-create-files-non-directory): * lisp/dired-x.el (dired-virtual): * lisp/dired.el (dired-mark-region, dired-unmark-all-files): * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): * lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode): * lisp/epa-ks.el (epa-ks--display-keys): * lisp/erc/erc.el (erc-toggle-debug-irc-protocol): * lisp/files.el (save-some-buffers): * lisp/gnus/gnus-dired.el (gnus-dired-find-file-mailcap) (gnus-dired-print): * lisp/gnus/gnus-group.el (gnus-keep-same-level): * lisp/gnus/gnus-score.el (gnus-score-find-trace): * lisp/gnus/gnus.el (to-list): * lisp/gnus/message.el (message--send-mail-maybe-partially): * lisp/mail/supercite.el (sc-set-variable): * lisp/minibuffer.el (minibuffer-inactive-mode): * lisp/progmodes/etags.el (select-tags-table): * lisp/progmodes/idlw-shell.el (idlwave-shell-mode) (idlwave-shell-char-mode-loop): * lisp/replace.el (query-replace-help): * lisp/simple.el (set-variable): * lisp/subr.el (read-char-from-minibuffer): * lisp/textmodes/ispell.el (ispell-help, ispell-message): * lisp/textmodes/reftex-global.el (reftex-find-duplicate-labels): * lisp/textmodes/reftex-vars.el (reftex-toc-include-file-boundaries) (reftex-toc-include-labels, reftex-toc-include-index-entries) (reftex-toc-include-context, reftex-toc-follow-mode) (reftex-index-include-context, reftex-index-follow-mode) (reftex-enable-partial-scans) (reftex-auto-update-selection-buffers) (reftex-highlight-selection): * lisp/time.el (display-time-update): * lisp/vc/ediff-help.el (ediff-help-for-quick-help): * lisp/vc/ediff-init.el (ediff-keep-variants): * lisp/vc/ediff-ptch.el (ediff-fixup-patch-map) (ediff-patch-file-internal): * lisp/windmove.el (windmove-delete-default-keybindings): Use 'substitute-command-keys' for literal key sequences. * lisp/userlock.el (userlock--fontify-key): Remove function. (ask-user-about-lock, ask-user-about-lock-help) (ask-user-about-supersession-threat) (ask-user-about-supersession-help): Use 'substitute-command-keys' for literal key sequences. * lisp/ibuffer.el (ibuffer-unmark-all): Use 'substitute-command-keys' for command.
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/calc-graph.el3
-rw-r--r--lisp/calc/calc-help.el28
-rw-r--r--lisp/calc/calc-misc.el42
-rw-r--r--lisp/calc/calc-mode.el9
-rw-r--r--lisp/calc/calc.el3
5 files changed, 46 insertions, 39 deletions
diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el
index 7891e35c40f..b6ee124a72f 100644
--- a/lisp/calc/calc-graph.el
+++ b/lisp/calc/calc-graph.el
@@ -969,7 +969,8 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
(define-key calc-dumb-map "\C-c\C-c" 'exit-recursive-edit)))
(use-local-map calc-dumb-map)
(setq truncate-lines t)
- (message "Type `q' or `C-c C-c' to return to Calc")
+ (message (substitute-command-keys
+ "Type \\`q' or \\`C-c C-c' to return to Calc"))
(recursive-edit)
(bury-buffer "*Gnuplot Trail*")))
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index 8481d0b5e9d..2633d64fe42 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -50,25 +50,25 @@
(beep))))
(defun calc-help-for-help (arg)
- "You have typed `h', the Calc help character. Type a Help option:
+ "You have typed \\`h', the Calc help character. Type a Help option:
-B calc-describe-bindings. Display a table of all key bindings.
-H calc-full-help. Display all `?' key messages at once.
+\\`B' calc-describe-bindings. Display a table of all key bindings.
+\\`H' calc-full-help. Display all \\`?' key messages at once.
-I calc-info. Read the Calc manual using the Info system.
-T calc-tutorial. Read the Calc tutorial using the Info system.
-S calc-info-summary. Read the Calc summary using the Info system.
+\\`I' calc-info. Read the Calc manual using the Info system.
+\\`T' calc-tutorial. Read the Calc tutorial using the Info system.
+\\`S' calc-info-summary. Read the Calc summary using the Info system.
-C calc-describe-key-briefly. Look up the command name for a given key.
-K calc-describe-key. Look up a key's documentation in the manual.
-F calc-describe-function. Look up a function's documentation in the manual.
-V calc-describe-variable. Look up a variable's documentation in the manual.
+\\`C' calc-describe-key-briefly. Look up the command name for a given key.
+\\`K' calc-describe-key. Look up a key's documentation in the manual.
+\\`F' calc-describe-function. Look up a function's documentation in the manual.
+\\`V' calc-describe-variable. Look up a variable's documentation in the manual.
-N calc-view-news. Display Calc history of changes.
+\\`N' calc-view-news. Display Calc history of changes.
-C-c Describe conditions for copying Calc.
-C-d Describe how you can get a new copy of Calc or report a bug.
-C-w Describe how there is no warranty for Calc."
+\\`C-c' Describe conditions for copying Calc.
+\\`C-d' Describe how you can get a new copy of Calc or report a bug.
+\\`C-w' Describe how there is no warranty for Calc."
(interactive "P")
(if calc-dispatch-help
(let (key)
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index c8394e8c2fa..1c4438e7f7a 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -216,26 +216,28 @@ Calc user interface as before (either C-x * C or C-x * K; initially C-x * C)."
(defun calc-help ()
(interactive)
(let ((msgs
- '("Press `h' for complete help; press `?' repeatedly for a summary"
- "Letter keys: Negate; Precision; Yank; Why; Xtended cmd; Quit"
- "Letter keys: SHIFT + Undo, reDo; Inverse, Hyperbolic, Option"
- "Letter keys: SHIFT + sQrt; Sin, Cos, Tan; Exp, Ln, logB"
- "Letter keys: SHIFT + Floor, Round; Abs, conJ, arG; Pi"
- "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro; Keep-args"
- "Other keys: +, -, *, /, ^, \\ (int div), : (frac div)"
- "Other keys: & (1/x), | (concat), % (modulo), ! (factorial)"
- "Other keys: \\=' (alg-entry), = (eval), \\=` (edit); M-RET (last-args)"
- "Other keys: SPC/RET (enter/dup), LFD (over); < > (scroll horiz)"
- "Other keys: DEL (drop), M-DEL (drop-above); { } (scroll vert)"
- "Other keys: TAB (swap/roll-dn), M-TAB (roll-up)"
- "Other keys: [ , ; ] (vector), ( , ) (complex), ( ; ) (polar)"
- "Prefix keys: Algebra, Binary/business, Convert, Display"
- "Prefix keys: Functions, Graphics, Help, J (select)"
- "Prefix keys: Kombinatorics/statistics, Modes, Store/recall"
- "Prefix keys: Trail/time, Units/statistics, Vector/matrix"
- "Prefix keys: Z (user), SHIFT + Z (define)"
- "Prefix keys: prefix + ? gives further help for that prefix"
- " Calc by Dave Gillespie, daveg@synaptics.com")))
+ ;; FIXME: Change these to `substitute-command-keys' syntax.
+ (mapcar #'substitute-command-keys
+ '("Press \\`h' for complete help; press \\`?' repeatedly for a summary"
+ "Letter keys: Negate; Precision; Yank; Why; Xtended cmd; Quit"
+ "Letter keys: SHIFT + Undo, reDo; Inverse, Hyperbolic, Option"
+ "Letter keys: SHIFT + sQrt; Sin, Cos, Tan; Exp, Ln, logB"
+ "Letter keys: SHIFT + Floor, Round; Abs, conJ, arG; Pi"
+ "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro; Keep-args"
+ "Other keys: +, -, *, /, ^, \\ (int div), : (frac div)"
+ "Other keys: & (1/x), | (concat), % (modulo), ! (factorial)"
+ "Other keys: \\=' (alg-entry), = (eval), \\=` (edit); M-RET (last-args)"
+ "Other keys: \\`SPC'/\\`RET' (enter/dup), LFD (over); < > (scroll horiz)"
+ "Other keys: \\`DEL' (drop), \\`M-DEL' (drop-above); { } (scroll vert)"
+ "Other keys: \\`TAB' (swap/roll-dn), \\`M-TAB' (roll-up)"
+ "Other keys: [ , ; ] (vector), ( , ) (complex), ( ; ) (polar)"
+ "Prefix keys: Algebra, Binary/business, Convert, Display"
+ "Prefix keys: Functions, Graphics, Help, J (select)"
+ "Prefix keys: Kombinatorics/statistics, Modes, Store/recall"
+ "Prefix keys: Trail/time, Units/statistics, Vector/matrix"
+ "Prefix keys: Z (user), SHIFT + Z (define)"
+ "Prefix keys: prefix + ? gives further help for that prefix"
+ " Calc by Dave Gillespie, daveg@synaptics.com"))))
(if calc-full-help-flag
msgs
(if (or calc-inverse-flag calc-hyperbolic-flag)
diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el
index 68c8b90ac3b..211b8e661fd 100644
--- a/lisp/calc/calc-mode.el
+++ b/lisp/calc/calc-mode.el
@@ -109,11 +109,14 @@
(setq n (and (not (eq calc-auto-why t)) (if calc-auto-why t 1))))
(calc-change-mode 'calc-auto-why n nil)
(cond ((null n)
- (message "User must press `w' to explain unsimplified results"))
+ (message (substitute-command-keys
+ "User must press \\`w' to explain unsimplified results")))
((eq n t)
- (message "Automatically doing `w' to explain unsimplified results"))
+ (message (substitute-command-keys
+ "Automatically doing \\`w' to explain unsimplified results")))
(t
- (message "Automatically doing `w' only for unusual messages")))))
+ (message (substitute-command-keys
+ "Automatically doing \\`w' only for unusual messages"))))))
(defun calc-group-digits (n)
(interactive "P")
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index bd4ec4ff2f0..9774ddff402 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1621,7 +1621,8 @@ See calc-keypad for details."
(stringp (nth 1 err))
(string-match "max-specpdl-size\\|max-lisp-eval-depth"
(nth 1 err)))
- (error "Computation got stuck or ran too long. Type `M' to increase the limit")
+ (error (substitute-command-keys
+ "Computation got stuck or ran too long. Type \\`M' to increase the limit"))
(setq calc-aborted-prefix nil)
(signal (car err) (cdr err)))))
(when calc-aborted-prefix