diff options
| author | Andreas Schwab | 2015-08-23 13:42:04 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2015-08-23 16:33:39 +0200 |
| commit | 0b0c9565d050bfecc581b342c40b719917395896 (patch) | |
| tree | 66db74031501dff2cd612095c62a6d065a25b023 | |
| parent | 70ff62413a17cbe5a4f218202a6a91c38d86c8c8 (diff) | |
| download | emacs-0b0c9565d050bfecc581b342c40b719917395896.tar.gz emacs-0b0c9565d050bfecc581b342c40b719917395896.zip | |
Revert "Prefer ‘format’ to ‘substitute-command-keys’"
This reverts commit 6af5aad26411ffe21c3fe4bc5438347110910111.
| -rw-r--r-- | lisp/cedet/mode-local.el | 9 | ||||
| -rw-r--r-- | lisp/cedet/srecode/srt-mode.el | 4 | ||||
| -rw-r--r-- | lisp/cus-theme.el | 4 | ||||
| -rw-r--r-- | lisp/descr-text.el | 11 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 20 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-generic.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eieio-opt.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 7 | ||||
| -rw-r--r-- | lisp/faces.el | 14 | ||||
| -rw-r--r-- | lisp/help-fns.el | 66 | ||||
| -rw-r--r-- | lisp/help.el | 8 | ||||
| -rw-r--r-- | src/doc.c | 9 | ||||
| -rw-r--r-- | src/syntax.c | 8 |
13 files changed, 97 insertions, 71 deletions
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index aa1dd65068f..3bdc3ea6155 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el | |||
| @@ -629,9 +629,10 @@ SYMBOL is a function that can be overridden." | |||
| 629 | (defun mode-local-print-binding (symbol) | 629 | (defun mode-local-print-binding (symbol) |
| 630 | "Print the SYMBOL binding." | 630 | "Print the SYMBOL binding." |
| 631 | (let ((value (symbol-value symbol))) | 631 | (let ((value (symbol-value symbol))) |
| 632 | (princ (format "\n ‘%s’ value is\n " symbol)) | 632 | (princ (format (substitute-command-keys "\n ‘%s’ value is\n ") |
| 633 | symbol)) | ||
| 633 | (if (and value (symbolp value)) | 634 | (if (and value (symbolp value)) |
| 634 | (princ (format "‘%s’" value)) | 635 | (princ (format (substitute-command-keys "‘%s’") value)) |
| 635 | (let ((pt (point))) | 636 | (let ((pt (point))) |
| 636 | (pp value) | 637 | (pp value) |
| 637 | (save-excursion | 638 | (save-excursion |
| @@ -689,7 +690,7 @@ SYMBOL is a function that can be overridden." | |||
| 689 | ) | 690 | ) |
| 690 | ((symbolp buffer-or-mode) | 691 | ((symbolp buffer-or-mode) |
| 691 | (setq mode buffer-or-mode) | 692 | (setq mode buffer-or-mode) |
| 692 | (princ (format "‘%s’\n" buffer-or-mode)) | 693 | (princ (format (substitute-command-keys "‘%s’\n") buffer-or-mode)) |
| 693 | ) | 694 | ) |
| 694 | ((signal 'wrong-type-argument | 695 | ((signal 'wrong-type-argument |
| 695 | (list 'buffer-or-mode buffer-or-mode)))) | 696 | (list 'buffer-or-mode buffer-or-mode)))) |
| @@ -699,7 +700,7 @@ SYMBOL is a function that can be overridden." | |||
| 699 | (while mode | 700 | (while mode |
| 700 | (setq table (get mode 'mode-local-symbol-table)) | 701 | (setq table (get mode 'mode-local-symbol-table)) |
| 701 | (when table | 702 | (when table |
| 702 | (princ (format "\n- From ‘%s’\n" mode)) | 703 | (princ (format (substitute-command-keys "\n- From ‘%s’\n") mode)) |
| 703 | (mode-local-print-bindings table)) | 704 | (mode-local-print-bindings table)) |
| 704 | (setq mode (get-mode-local-parent mode))))) | 705 | (setq mode (get-mode-local-parent mode))))) |
| 705 | 706 | ||
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el index efcfe4ba51d..48f055561ea 100644 --- a/lisp/cedet/srecode/srt-mode.el +++ b/lisp/cedet/srecode/srt-mode.el | |||
| @@ -258,9 +258,9 @@ we can tell font lock about them.") | |||
| 258 | (when (class-abstract-p C) | 258 | (when (class-abstract-p C) |
| 259 | (throw 'skip nil)) | 259 | (throw 'skip nil)) |
| 260 | 260 | ||
| 261 | (princ (format "‘")) | 261 | (princ (substitute-command-keys "‘")) |
| 262 | (princ name) | 262 | (princ name) |
| 263 | (princ (format "’")) | 263 | (princ (substitute-command-keys "’")) |
| 264 | (when (slot-exists-p C 'key) | 264 | (when (slot-exists-p C 'key) |
| 265 | (when key | 265 | (when key |
| 266 | (princ " - Character Key: ") | 266 | (princ " - Character Key: ") |
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index f8e5650db78..bc221e17c4b 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el | |||
| @@ -492,10 +492,10 @@ It includes all faces in list FACES." | |||
| 492 | '("" "c"))) | 492 | '("" "c"))) |
| 493 | doc) | 493 | doc) |
| 494 | (when fn | 494 | (when fn |
| 495 | (princ (format " in ‘")) | 495 | (princ (substitute-command-keys " in ‘")) |
| 496 | (help-insert-xref-button (file-name-nondirectory fn) | 496 | (help-insert-xref-button (file-name-nondirectory fn) |
| 497 | 'help-theme-def fn) | 497 | 'help-theme-def fn) |
| 498 | (princ (format "’"))) | 498 | (princ (substitute-command-keys "’"))) |
| 499 | (princ ".\n") | 499 | (princ ".\n") |
| 500 | (if (custom-theme-p theme) | 500 | (if (custom-theme-p theme) |
| 501 | (progn | 501 | (progn |
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 579278ceaa0..71233d406e1 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -161,8 +161,11 @@ otherwise." | |||
| 161 | ;; Buttons | 161 | ;; Buttons |
| 162 | (when (and button (not (widgetp wid-button))) | 162 | (when (and button (not (widgetp wid-button))) |
| 163 | (newline) | 163 | (newline) |
| 164 | (insert (format "Here is a ‘%S’ button labeled ‘%s’.\n\n" | 164 | (insert (substitute-command-keys "Here is a ‘") |
| 165 | button-type button-label))) | 165 | (format "%S" button-type) |
| 166 | (substitute-command-keys "’ button labeled ‘") | ||
| 167 | button-label | ||
| 168 | (substitute-command-keys "’.\n\n"))) | ||
| 166 | ;; Overlays | 169 | ;; Overlays |
| 167 | (when overlays | 170 | (when overlays |
| 168 | (newline) | 171 | (newline) |
| @@ -736,7 +739,9 @@ relevant to POS." | |||
| 736 | (when face | 739 | (when face |
| 737 | (insert (propertize " " 'display '(space :align-to 5)) | 740 | (insert (propertize " " 'display '(space :align-to 5)) |
| 738 | "face: ") | 741 | "face: ") |
| 739 | (insert (format "‘%s’\n" face)))))) | 742 | (insert (substitute-command-keys "‘") |
| 743 | (symbol-name face) | ||
| 744 | (substitute-command-keys "’\n")))))) | ||
| 740 | (insert "these terminal codes:\n") | 745 | (insert "these terminal codes:\n") |
| 741 | (dotimes (i (length disp-vector)) | 746 | (dotimes (i (length disp-vector)) |
| 742 | (insert (car (aref disp-vector i)) | 747 | (insert (car (aref disp-vector i)) |
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 6f436db7100..8ed50f4f530 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el | |||
| @@ -752,16 +752,16 @@ including `cl-block' and `cl-eval-when'." | |||
| 752 | ;; FIXME: Add a `cl-class-of' or `cl-typeof' or somesuch. | 752 | ;; FIXME: Add a `cl-class-of' or `cl-typeof' or somesuch. |
| 753 | (metatype (cl--class-name (symbol-value (aref class 0))))) | 753 | (metatype (cl--class-name (symbol-value (aref class 0))))) |
| 754 | (insert (symbol-name type) | 754 | (insert (symbol-name type) |
| 755 | (format " is a type (of kind ‘")) | 755 | (substitute-command-keys " is a type (of kind ‘")) |
| 756 | (help-insert-xref-button (symbol-name metatype) | 756 | (help-insert-xref-button (symbol-name metatype) |
| 757 | 'cl-help-type metatype) | 757 | 'cl-help-type metatype) |
| 758 | (insert (format "’)")) | 758 | (insert (substitute-command-keys "’)")) |
| 759 | (when location | 759 | (when location |
| 760 | (insert (format " in ‘")) | 760 | (insert (substitute-command-keys " in ‘")) |
| 761 | (help-insert-xref-button | 761 | (help-insert-xref-button |
| 762 | (help-fns-short-filename location) | 762 | (help-fns-short-filename location) |
| 763 | 'cl-type-definition type location 'define-type) | 763 | 'cl-type-definition type location 'define-type) |
| 764 | (insert (format "’"))) | 764 | (insert (substitute-command-keys "’"))) |
| 765 | (insert ".\n") | 765 | (insert ".\n") |
| 766 | 766 | ||
| 767 | ;; Parents. | 767 | ;; Parents. |
| @@ -771,10 +771,10 @@ including `cl-block' and `cl-eval-when'." | |||
| 771 | (insert " Inherits from ") | 771 | (insert " Inherits from ") |
| 772 | (while (setq cur (pop pl)) | 772 | (while (setq cur (pop pl)) |
| 773 | (setq cur (cl--class-name cur)) | 773 | (setq cur (cl--class-name cur)) |
| 774 | (insert (format "‘")) | 774 | (insert (substitute-command-keys "‘")) |
| 775 | (help-insert-xref-button (symbol-name cur) | 775 | (help-insert-xref-button (symbol-name cur) |
| 776 | 'cl-help-type cur) | 776 | 'cl-help-type cur) |
| 777 | (insert (format (if pl "’, " "’")))) | 777 | (insert (substitute-command-keys (if pl "’, " "’")))) |
| 778 | (insert ".\n"))) | 778 | (insert ".\n"))) |
| 779 | 779 | ||
| 780 | ;; Children, if available. ¡For EIEIO! | 780 | ;; Children, if available. ¡For EIEIO! |
| @@ -785,10 +785,10 @@ including `cl-block' and `cl-eval-when'." | |||
| 785 | (when ch | 785 | (when ch |
| 786 | (insert " Children ") | 786 | (insert " Children ") |
| 787 | (while (setq cur (pop ch)) | 787 | (while (setq cur (pop ch)) |
| 788 | (insert (format "‘")) | 788 | (insert (substitute-command-keys "‘")) |
| 789 | (help-insert-xref-button (symbol-name cur) | 789 | (help-insert-xref-button (symbol-name cur) |
| 790 | 'cl-help-type cur) | 790 | 'cl-help-type cur) |
| 791 | (insert (format (if ch "’, " "’")))) | 791 | (insert (substitute-command-keys (if ch "’, " "’")))) |
| 792 | (insert ".\n"))) | 792 | (insert ".\n"))) |
| 793 | 793 | ||
| 794 | ;; Type's documentation. | 794 | ;; Type's documentation. |
| @@ -804,10 +804,10 @@ including `cl-block' and `cl-eval-when'." | |||
| 804 | (when generics | 804 | (when generics |
| 805 | (insert (propertize "Specialized Methods:\n\n" 'face 'bold)) | 805 | (insert (propertize "Specialized Methods:\n\n" 'face 'bold)) |
| 806 | (dolist (generic generics) | 806 | (dolist (generic generics) |
| 807 | (insert (format "‘")) | 807 | (insert (substitute-command-keys "‘")) |
| 808 | (help-insert-xref-button (symbol-name generic) | 808 | (help-insert-xref-button (symbol-name generic) |
| 809 | 'help-function generic) | 809 | 'help-function generic) |
| 810 | (insert (format "’")) | 810 | (insert (substitute-command-keys "’")) |
| 811 | (pcase-dolist (`(,qualifiers ,args ,doc) | 811 | (pcase-dolist (`(,qualifiers ,args ,doc) |
| 812 | (cl--generic-method-documentation generic type)) | 812 | (cl--generic-method-documentation generic type)) |
| 813 | (insert (format " %s%S\n" qualifiers args) | 813 | (insert (format " %s%S\n" qualifiers args) |
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index cecd7378620..5d527619d6d 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el | |||
| @@ -864,11 +864,11 @@ MET-NAME is a cons (SYMBOL . SPECIALIZERS)." | |||
| 864 | (cl--generic-method-specializers method))) | 864 | (cl--generic-method-specializers method))) |
| 865 | (file (find-lisp-object-file-name met-name 'cl-defmethod))) | 865 | (file (find-lisp-object-file-name met-name 'cl-defmethod))) |
| 866 | (when file | 866 | (when file |
| 867 | (insert (format " in ‘")) | 867 | (insert (substitute-command-keys " in ‘")) |
| 868 | (help-insert-xref-button (help-fns-short-filename file) | 868 | (help-insert-xref-button (help-fns-short-filename file) |
| 869 | 'help-function-def met-name file | 869 | 'help-function-def met-name file |
| 870 | 'cl-defmethod) | 870 | 'cl-defmethod) |
| 871 | (insert (format "’.\n")))) | 871 | (insert (substitute-command-keys "’.\n")))) |
| 872 | (insert "\n" (or (nth 2 info) "Undocumented") "\n\n"))))))) | 872 | (insert "\n" (or (nth 2 info) "Undocumented") "\n\n"))))))) |
| 873 | 873 | ||
| 874 | (defun cl--generic-specializers-apply-to-type-p (specializers type) | 874 | (defun cl--generic-specializers-apply-to-type-p (specializers type) |
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index c4d6d35a13b..0b003360ed5 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el | |||
| @@ -141,11 +141,11 @@ are not abstract." | |||
| 141 | (setq location | 141 | (setq location |
| 142 | (find-lisp-object-file-name ctr def))) | 142 | (find-lisp-object-file-name ctr def))) |
| 143 | (when location | 143 | (when location |
| 144 | (insert (format " in ‘")) | 144 | (insert (substitute-command-keys " in ‘")) |
| 145 | (help-insert-xref-button | 145 | (help-insert-xref-button |
| 146 | (help-fns-short-filename location) | 146 | (help-fns-short-filename location) |
| 147 | 'cl-type-definition ctr location 'define-type) | 147 | 'cl-type-definition ctr location 'define-type) |
| 148 | (insert (format "’"))) | 148 | (insert (substitute-command-keys "’"))) |
| 149 | (insert ".\nCreates an object of class " (symbol-name ctr) ".") | 149 | (insert ".\nCreates an object of class " (symbol-name ctr) ".") |
| 150 | (goto-char (point-max)) | 150 | (goto-char (point-max)) |
| 151 | (if (autoloadp def) | 151 | (if (autoloadp def) |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index f7cd6a1870a..3d2dbdf8712 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -2204,7 +2204,7 @@ Otherwise no newline is inserted." | |||
| 2204 | "Installed" | 2204 | "Installed" |
| 2205 | (capitalize status)) | 2205 | (capitalize status)) |
| 2206 | 'font-lock-face 'package-status-builtin-face)) | 2206 | 'font-lock-face 'package-status-builtin-face)) |
| 2207 | (insert (format " in ‘")) | 2207 | (insert (substitute-command-keys " in ‘")) |
| 2208 | (let ((dir (abbreviate-file-name | 2208 | (let ((dir (abbreviate-file-name |
| 2209 | (file-name-as-directory | 2209 | (file-name-as-directory |
| 2210 | (if (file-in-directory-p pkg-dir package-user-dir) | 2210 | (if (file-in-directory-p pkg-dir package-user-dir) |
| @@ -2213,10 +2213,11 @@ Otherwise no newline is inserted." | |||
| 2213 | (help-insert-xref-button dir 'help-package-def pkg-dir)) | 2213 | (help-insert-xref-button dir 'help-package-def pkg-dir)) |
| 2214 | (if (and (package-built-in-p name) | 2214 | (if (and (package-built-in-p name) |
| 2215 | (not (package-built-in-p name version))) | 2215 | (not (package-built-in-p name version))) |
| 2216 | (insert (format "’,\n shadowing a ") | 2216 | (insert (substitute-command-keys |
| 2217 | "’,\n shadowing a ") | ||
| 2217 | (propertize "built-in package" | 2218 | (propertize "built-in package" |
| 2218 | 'font-lock-face 'package-status-builtin-face)) | 2219 | 'font-lock-face 'package-status-builtin-face)) |
| 2219 | (insert (format "’"))) | 2220 | (insert (substitute-command-keys "’"))) |
| 2220 | (if signed | 2221 | (if signed |
| 2221 | (insert ".") | 2222 | (insert ".") |
| 2222 | (insert " (unsigned).")) | 2223 | (insert " (unsigned).")) |
diff --git a/lisp/faces.el b/lisp/faces.el index 15ed699aaa8..e628ee7870b 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1436,10 +1436,12 @@ If FRAME is omitted or nil, use the selected frame." | |||
| 1436 | (when alias | 1436 | (when alias |
| 1437 | (setq face alias) | 1437 | (setq face alias) |
| 1438 | (insert | 1438 | (insert |
| 1439 | (format "\n %s is an alias for the face ‘%s’.\n%s" | 1439 | (format (substitute-command-keys |
| 1440 | "\n %s is an alias for the face ‘%s’.\n%s") | ||
| 1440 | f alias | 1441 | f alias |
| 1441 | (if (setq obsolete (get f 'obsolete-face)) | 1442 | (if (setq obsolete (get f 'obsolete-face)) |
| 1442 | (format " This face is obsolete%s; use ‘%s’ instead.\n" | 1443 | (format (substitute-command-keys |
| 1444 | " This face is obsolete%s; use ‘%s’ instead.\n") | ||
| 1443 | (if (stringp obsolete) | 1445 | (if (stringp obsolete) |
| 1444 | (format " since %s" obsolete) | 1446 | (format " since %s" obsolete) |
| 1445 | "") | 1447 | "") |
| @@ -1457,11 +1459,13 @@ If FRAME is omitted or nil, use the selected frame." | |||
| 1457 | (help-xref-button 1 'help-customize-face f))) | 1459 | (help-xref-button 1 'help-customize-face f))) |
| 1458 | (setq file-name (find-lisp-object-file-name f 'defface)) | 1460 | (setq file-name (find-lisp-object-file-name f 'defface)) |
| 1459 | (when file-name | 1461 | (when file-name |
| 1460 | (princ (format "Defined in ‘%s’" | 1462 | (princ (substitute-command-keys "Defined in ‘")) |
| 1461 | (file-name-nondirectory file-name))) | 1463 | (princ (file-name-nondirectory file-name)) |
| 1464 | (princ (substitute-command-keys "’")) | ||
| 1462 | ;; Make a hyperlink to the library. | 1465 | ;; Make a hyperlink to the library. |
| 1463 | (save-excursion | 1466 | (save-excursion |
| 1464 | (re-search-backward (format "‘\\([^‘’]+\\)’") nil t) | 1467 | (re-search-backward |
| 1468 | (substitute-command-keys "‘\\([^‘’]+\\)’") nil t) | ||
| 1465 | (help-xref-button 1 'help-face-def f file-name)) | 1469 | (help-xref-button 1 'help-face-def f file-name)) |
| 1466 | (princ ".") | 1470 | (princ ".") |
| 1467 | (terpri) | 1471 | (terpri) |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 8ed9a477399..afd09ca6df5 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -319,7 +319,9 @@ suitable file is found, return nil." | |||
| 319 | (when remapped | 319 | (when remapped |
| 320 | (princ "Its keys are remapped to ") | 320 | (princ "Its keys are remapped to ") |
| 321 | (princ (if (symbolp remapped) | 321 | (princ (if (symbolp remapped) |
| 322 | (format "‘%s’" remapped) | 322 | (concat (substitute-command-keys "‘") |
| 323 | (symbol-name remapped) | ||
| 324 | (substitute-command-keys "’")) | ||
| 323 | "an anonymous command")) | 325 | "an anonymous command")) |
| 324 | (princ ".\n")) | 326 | (princ ".\n")) |
| 325 | 327 | ||
| @@ -353,16 +355,18 @@ suitable file is found, return nil." | |||
| 353 | (insert "\nThis function has a compiler macro") | 355 | (insert "\nThis function has a compiler macro") |
| 354 | (if (symbolp handler) | 356 | (if (symbolp handler) |
| 355 | (progn | 357 | (progn |
| 356 | (insert (format " ‘%s’" handler)) | 358 | (insert (format (substitute-command-keys " ‘%s’") handler)) |
| 357 | (save-excursion | 359 | (save-excursion |
| 358 | (re-search-backward (format "‘\\([^‘’]+\\)’") nil t) | 360 | (re-search-backward (substitute-command-keys "‘\\([^‘’]+\\)’") |
| 361 | nil t) | ||
| 359 | (help-xref-button 1 'help-function handler))) | 362 | (help-xref-button 1 'help-function handler))) |
| 360 | ;; FIXME: Obsolete since 24.4. | 363 | ;; FIXME: Obsolete since 24.4. |
| 361 | (let ((lib (get function 'compiler-macro-file))) | 364 | (let ((lib (get function 'compiler-macro-file))) |
| 362 | (when (stringp lib) | 365 | (when (stringp lib) |
| 363 | (insert (format " in ‘%s’" lib)) | 366 | (insert (format (substitute-command-keys " in ‘%s’") lib)) |
| 364 | (save-excursion | 367 | (save-excursion |
| 365 | (re-search-backward (format "‘\\([^‘’]+\\)’") nil t) | 368 | (re-search-backward (substitute-command-keys "‘\\([^‘’]+\\)’") |
| 369 | nil t) | ||
| 366 | (help-xref-button 1 'help-function-cmacro function lib))))) | 370 | (help-xref-button 1 'help-function-cmacro function lib))))) |
| 367 | (insert ".\n")))) | 371 | (insert ".\n")))) |
| 368 | 372 | ||
| @@ -417,13 +421,13 @@ suitable file is found, return nil." | |||
| 417 | (get function | 421 | (get function |
| 418 | 'derived-mode-parent)))) | 422 | 'derived-mode-parent)))) |
| 419 | (when parent-mode | 423 | (when parent-mode |
| 420 | (insert (format "\nParent mode: ‘")) | 424 | (insert (substitute-command-keys "\nParent mode: ‘")) |
| 421 | (let ((beg (point))) | 425 | (let ((beg (point))) |
| 422 | (insert (format "%s" parent-mode)) | 426 | (insert (format "%s" parent-mode)) |
| 423 | (make-text-button beg (point) | 427 | (make-text-button beg (point) |
| 424 | 'type 'help-function | 428 | 'type 'help-function |
| 425 | 'help-args (list parent-mode))) | 429 | 'help-args (list parent-mode))) |
| 426 | (insert (format "’.\n"))))) | 430 | (insert (substitute-command-keys "’.\n"))))) |
| 427 | 431 | ||
| 428 | (defun help-fns--obsolete (function) | 432 | (defun help-fns--obsolete (function) |
| 429 | ;; Ignore lambda constructs, keyboard macros, etc. | 433 | ;; Ignore lambda constructs, keyboard macros, etc. |
| @@ -438,9 +442,10 @@ suitable file is found, return nil." | |||
| 438 | " is obsolete") | 442 | " is obsolete") |
| 439 | (when (nth 2 obsolete) | 443 | (when (nth 2 obsolete) |
| 440 | (insert (format " since %s" (nth 2 obsolete)))) | 444 | (insert (format " since %s" (nth 2 obsolete)))) |
| 441 | (insert (cond ((stringp use) | 445 | (insert (cond ((stringp use) (concat ";\n" use)) |
| 442 | (concat ";\n" (substitute-command-keys use))) | 446 | (use (format (substitute-command-keys |
| 443 | (use (format ";\nuse ‘%s’ instead." use)) | 447 | ";\nuse ‘%s’ instead.") |
| 448 | use)) | ||
| 444 | (t ".")) | 449 | (t ".")) |
| 445 | "\n")))) | 450 | "\n")))) |
| 446 | 451 | ||
| @@ -476,7 +481,8 @@ FILE is the file where FUNCTION was probably defined." | |||
| 476 | (format ";\nin Lisp code %s" interactive-only)) | 481 | (format ";\nin Lisp code %s" interactive-only)) |
| 477 | ((and (symbolp 'interactive-only) | 482 | ((and (symbolp 'interactive-only) |
| 478 | (not (eq interactive-only t))) | 483 | (not (eq interactive-only t))) |
| 479 | (format ";\nin Lisp code use ‘%s’ instead." | 484 | (format (substitute-command-keys |
| 485 | ";\nin Lisp code use ‘%s’ instead.") | ||
| 480 | interactive-only)) | 486 | interactive-only)) |
| 481 | (t ".")) | 487 | (t ".")) |
| 482 | "\n"))))) | 488 | "\n"))))) |
| @@ -545,7 +551,8 @@ FILE is the file where FUNCTION was probably defined." | |||
| 545 | ;; Aliases are Lisp functions, so we need to check | 551 | ;; Aliases are Lisp functions, so we need to check |
| 546 | ;; aliases before functions. | 552 | ;; aliases before functions. |
| 547 | (aliased | 553 | (aliased |
| 548 | (format "an alias for ‘%s’" real-def)) | 554 | (format (substitute-command-keys "an alias for ‘%s’") |
| 555 | real-def)) | ||
| 549 | ((autoloadp def) | 556 | ((autoloadp def) |
| 550 | (format "%s autoloaded %s" | 557 | (format "%s autoloaded %s" |
| 551 | (if (commandp def) "an interactive" "an") | 558 | (if (commandp def) "an interactive" "an") |
| @@ -579,22 +586,24 @@ FILE is the file where FUNCTION was probably defined." | |||
| 579 | (with-current-buffer standard-output | 586 | (with-current-buffer standard-output |
| 580 | (save-excursion | 587 | (save-excursion |
| 581 | (save-match-data | 588 | (save-match-data |
| 582 | (when (re-search-backward (format "alias for ‘\\([^‘’]+\\)’") | 589 | (when (re-search-backward (substitute-command-keys |
| 590 | "alias for ‘\\([^‘’]+\\)’") | ||
| 583 | nil t) | 591 | nil t) |
| 584 | (help-xref-button 1 'help-function real-def))))) | 592 | (help-xref-button 1 'help-function real-def))))) |
| 585 | 593 | ||
| 586 | (when file-name | 594 | (when file-name |
| 587 | (princ (format " in ‘")) | 595 | (princ (substitute-command-keys " in ‘")) |
| 588 | ;; We used to add .el to the file name, | 596 | ;; We used to add .el to the file name, |
| 589 | ;; but that's completely wrong when the user used load-file. | 597 | ;; but that's completely wrong when the user used load-file. |
| 590 | (princ (if (eq file-name 'C-source) | 598 | (princ (if (eq file-name 'C-source) |
| 591 | "C source code" | 599 | "C source code" |
| 592 | (help-fns-short-filename file-name))) | 600 | (help-fns-short-filename file-name))) |
| 593 | (princ (format "’")) | 601 | (princ (substitute-command-keys "’")) |
| 594 | ;; Make a hyperlink to the library. | 602 | ;; Make a hyperlink to the library. |
| 595 | (with-current-buffer standard-output | 603 | (with-current-buffer standard-output |
| 596 | (save-excursion | 604 | (save-excursion |
| 597 | (re-search-backward (format "‘\\([^‘’]+\\)’") nil t) | 605 | (re-search-backward (substitute-command-keys "‘\\([^‘’]+\\)’") |
| 606 | nil t) | ||
| 598 | (help-xref-button 1 'help-function-def function file-name)))) | 607 | (help-xref-button 1 'help-function-def function file-name)))) |
| 599 | (princ ".") | 608 | (princ ".") |
| 600 | (with-current-buffer (help-buffer) | 609 | (with-current-buffer (help-buffer) |
| @@ -727,14 +736,17 @@ it is displayed along with the global value." | |||
| 727 | 736 | ||
| 728 | (if file-name | 737 | (if file-name |
| 729 | (progn | 738 | (progn |
| 730 | (princ (format " is a variable defined in ‘")) | 739 | (princ (substitute-command-keys |
| 740 | " is a variable defined in ‘")) | ||
| 731 | (princ (if (eq file-name 'C-source) | 741 | (princ (if (eq file-name 'C-source) |
| 732 | "C source code" | 742 | "C source code" |
| 733 | (file-name-nondirectory file-name))) | 743 | (file-name-nondirectory file-name))) |
| 734 | (princ (format "’.\n")) | 744 | (princ (substitute-command-keys "’.\n")) |
| 735 | (with-current-buffer standard-output | 745 | (with-current-buffer standard-output |
| 736 | (save-excursion | 746 | (save-excursion |
| 737 | (re-search-backward (format "‘\\([^‘’]+\\)’") nil t) | 747 | (re-search-backward (substitute-command-keys |
| 748 | "‘\\([^‘’]+\\)’") | ||
| 749 | nil t) | ||
| 738 | (help-xref-button 1 'help-variable-def | 750 | (help-xref-button 1 'help-variable-def |
| 739 | variable file-name))) | 751 | variable file-name))) |
| 740 | (if valvoid | 752 | (if valvoid |
| @@ -864,7 +876,8 @@ if it is given a local binding.\n"))) | |||
| 864 | ;; Mention if it's an alias. | 876 | ;; Mention if it's an alias. |
| 865 | (unless (eq alias variable) | 877 | (unless (eq alias variable) |
| 866 | (setq extra-line t) | 878 | (setq extra-line t) |
| 867 | (princ (format " This variable is an alias for ‘%s’.\n" | 879 | (princ (format (substitute-command-keys |
| 880 | " This variable is an alias for ‘%s’.\n") | ||
| 868 | alias))) | 881 | alias))) |
| 869 | 882 | ||
| 870 | (when obsolete | 883 | (when obsolete |
| @@ -872,9 +885,9 @@ if it is given a local binding.\n"))) | |||
| 872 | (princ " This variable is obsolete") | 885 | (princ " This variable is obsolete") |
| 873 | (if (nth 2 obsolete) | 886 | (if (nth 2 obsolete) |
| 874 | (princ (format " since %s" (nth 2 obsolete)))) | 887 | (princ (format " since %s" (nth 2 obsolete)))) |
| 875 | (princ (cond ((stringp use) | 888 | (princ (cond ((stringp use) (concat ";\n " use)) |
| 876 | (concat ";\n " (substitute-command-keys use))) | 889 | (use (format (substitute-command-keys |
| 877 | (use (format ";\n use ‘%s’ instead." | 890 | ";\n use ‘%s’ instead.") |
| 878 | (car obsolete))) | 891 | (car obsolete))) |
| 879 | (t "."))) | 892 | (t "."))) |
| 880 | (terpri)) | 893 | (terpri)) |
| @@ -905,7 +918,7 @@ if it is given a local binding.\n"))) | |||
| 905 | ;; Otherwise, assume it was set directly. | 918 | ;; Otherwise, assume it was set directly. |
| 906 | (setq file (car file) | 919 | (setq file (car file) |
| 907 | dir-file nil))) | 920 | dir-file nil))) |
| 908 | (princ (format | 921 | (princ (substitute-command-keys |
| 909 | (if dir-file | 922 | (if dir-file |
| 910 | "by the file\n ‘" | 923 | "by the file\n ‘" |
| 911 | "for the directory\n ‘"))) | 924 | "for the directory\n ‘"))) |
| @@ -913,7 +926,7 @@ if it is given a local binding.\n"))) | |||
| 913 | (insert-text-button | 926 | (insert-text-button |
| 914 | file 'type 'help-dir-local-var-def | 927 | file 'type 'help-dir-local-var-def |
| 915 | 'help-args (list variable file))) | 928 | 'help-args (list variable file))) |
| 916 | (princ (format "’.\n")))) | 929 | (princ (substitute-command-keys "’.\n")))) |
| 917 | (princ " This variable's value is file-local.\n"))) | 930 | (princ " This variable's value is file-local.\n"))) |
| 918 | 931 | ||
| 919 | (when (memq variable ignored-local-variables) | 932 | (when (memq variable ignored-local-variables) |
| @@ -937,7 +950,8 @@ file-local variable.\n") | |||
| 937 | (princ "if its value\n satisfies the predicate ") | 950 | (princ "if its value\n satisfies the predicate ") |
| 938 | (princ (if (byte-code-function-p safe-var) | 951 | (princ (if (byte-code-function-p safe-var) |
| 939 | "which is a byte-compiled expression.\n" | 952 | "which is a byte-compiled expression.\n" |
| 940 | (format "‘%s’.\n" safe-var)))) | 953 | (format (substitute-command-keys "‘%s’.\n") |
| 954 | safe-var)))) | ||
| 941 | 955 | ||
| 942 | (if extra-line (terpri)) | 956 | (if extra-line (terpri)) |
| 943 | (princ "Documentation:\n") | 957 | (princ "Documentation:\n") |
diff --git a/lisp/help.el b/lisp/help.el index a8991b5f82b..db87d5852b6 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -964,12 +964,14 @@ documentation for the major and minor modes of that buffer." | |||
| 964 | (let* ((mode major-mode) | 964 | (let* ((mode major-mode) |
| 965 | (file-name (find-lisp-object-file-name mode nil))) | 965 | (file-name (find-lisp-object-file-name mode nil))) |
| 966 | (when file-name | 966 | (when file-name |
| 967 | (princ (format " defined in ‘%s’" | 967 | (princ (concat (substitute-command-keys " defined in ‘") |
| 968 | (file-name-nondirectory file-name))) | 968 | (file-name-nondirectory file-name) |
| 969 | (substitute-command-keys "’"))) | ||
| 969 | ;; Make a hyperlink to the library. | 970 | ;; Make a hyperlink to the library. |
| 970 | (with-current-buffer standard-output | 971 | (with-current-buffer standard-output |
| 971 | (save-excursion | 972 | (save-excursion |
| 972 | (re-search-backward (format "‘\\([^‘’]+\\)’") nil t) | 973 | (re-search-backward (substitute-command-keys "‘\\([^‘’]+\\)’") |
| 974 | nil t) | ||
| 973 | (help-xref-button 1 'help-function-def mode file-name))))) | 975 | (help-xref-button 1 'help-function-def mode file-name))))) |
| 974 | (princ ":\n") | 976 | (princ ":\n") |
| 975 | (princ (documentation major-mode))))) | 977 | (princ (documentation major-mode))))) |
| @@ -927,13 +927,14 @@ Otherwise, return a new string. */) | |||
| 927 | if (NILP (tem)) | 927 | if (NILP (tem)) |
| 928 | { | 928 | { |
| 929 | name = Fsymbol_name (name); | 929 | name = Fsymbol_name (name); |
| 930 | insert1 (CALLN (Fformat, build_string ("\nUses keymap "uLSQM))); | 930 | insert1 (Fsubstitute_command_keys |
| 931 | (build_string ("\nUses keymap "uLSQM))); | ||
| 931 | insert_from_string (name, 0, 0, | 932 | insert_from_string (name, 0, 0, |
| 932 | SCHARS (name), | 933 | SCHARS (name), |
| 933 | SBYTES (name), 1); | 934 | SBYTES (name), 1); |
| 934 | insert1 (CALLN (Fformat, | 935 | insert1 (Fsubstitute_command_keys |
| 935 | (build_string | 936 | (build_string |
| 936 | (uRSQM", which is not currently defined.\n")))); | 937 | (uRSQM", which is not currently defined.\n"))); |
| 937 | if (start[-1] == '<') keymap = Qnil; | 938 | if (start[-1] == '<') keymap = Qnil; |
| 938 | } | 939 | } |
| 939 | else if (start[-1] == '<') | 940 | else if (start[-1] == '<') |
diff --git a/src/syntax.c b/src/syntax.c index 30560affdf0..d45936b2b28 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -1333,11 +1333,9 @@ DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value, | |||
| 1333 | insert_string (" (nestable)"); | 1333 | insert_string (" (nestable)"); |
| 1334 | 1334 | ||
| 1335 | if (prefix) | 1335 | if (prefix) |
| 1336 | { | 1336 | insert1 (Fsubstitute_command_keys |
| 1337 | AUTO_STRING (prefixdoc, | 1337 | (build_string |
| 1338 | ",\n\t is a prefix character for `backward-prefix-chars'"); | 1338 | (",\n\t is a prefix character for `backward-prefix-chars'"))); |
| 1339 | insert1 (Fsubstitute_command_keys (prefixdoc)); | ||
| 1340 | } | ||
| 1341 | 1339 | ||
| 1342 | return syntax; | 1340 | return syntax; |
| 1343 | } | 1341 | } |