summaryrefslogtreecommitdiff
path: root/lisp/help-fns.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-09-10 07:37:36 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-09-10 07:37:36 +0200
commit6cd9e586cc065f02d69c97b23163ec91ccc2b5dd (patch)
tree27fae333c1437be0e05f119593720be3f28f43ca /lisp/help-fns.el
parent54c3794899ef2d4d88812fb445b6e2acc85a2720 (diff)
downloademacs-6cd9e586cc065f02d69c97b23163ec91ccc2b5dd.tar.gz
New function substitute-quotes
* lisp/help.el (substitute-quotes): New function. (Bug#51040) * doc/lispref/help.texi (Keys in Documentation): Document substitute-quotes. * test/lisp/help-tests.el (help-tests-substitute-quotes): New test. * lisp/cedet/srecode/srt-mode.el (srecode-macro-help): * lisp/cus-theme.el (describe-theme-1): * lisp/emacs-lisp/cl-extra.el (cl--describe-class): * lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): * lisp/emacs-lisp/package.el (describe-package-1): * lisp/help-fns.el (help-fns--parent-mode, help-fns--var-risky) (help-fns--var-file-local, help-fns--var-bufferlocal) (describe-face): * lisp/help.el (substitute-command-keys): * lisp/progmodes/octave.el (octave-help): Use the new function instead of 'substitute-command-keys'.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r--lisp/help-fns.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index dac4a03cd94..d5b576de285 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -712,13 +712,13 @@ the C sources, too."
(get function
'derived-mode-parent))))
(when parent-mode
- (insert (substitute-command-keys " Parent mode: `"))
+ (insert (substitute-quotes " Parent mode: `"))
(let ((beg (point)))
(insert (format "%s" parent-mode))
(make-text-button beg (point)
'type 'help-function
'help-args (list parent-mode)))
- (insert (substitute-command-keys "'.\n")))))
+ (insert (substitute-quotes "'.\n")))))
(defun help-fns--obsolete (function)
;; Ignore lambda constructs, keyboard macros, etc.
@@ -1559,7 +1559,7 @@ This cancels value editing without updating the value."
(princ " This variable may be risky if used as a \
file-local variable.\n")
(when (assq variable safe-local-variable-values)
- (princ (substitute-command-keys
+ (princ (substitute-quotes
" However, you have added it to \
`safe-local-variable-values'.\n")))))
@@ -1609,8 +1609,8 @@ variable.\n")))
(insert-text-button
file 'type 'help-dir-local-var-def
'help-args (list variable file)))
- (princ (substitute-command-keys "'.\n"))))
- (princ (substitute-command-keys
+ (princ (substitute-quotes "'.\n"))))
+ (princ (substitute-quotes
" This variable's value is file-local.\n")))))))
(add-hook 'help-fns-describe-variable-functions #'help-fns--var-watchpoints)
@@ -1690,10 +1690,10 @@ variable.\n")))
((not permanent-local))
((bufferp locus)
(princ
- (substitute-command-keys
+ (substitute-quotes
" This variable's buffer-local value is permanent.\n")))
(t
- (princ (substitute-command-keys
+ (princ (substitute-quotes
" This variable's value is permanent \
if it is given a local binding.\n"))))))
@@ -1770,9 +1770,9 @@ If FRAME is omitted or nil, use the selected frame."
(setq help-mode--current-data (list :symbol f))
(setq help-mode--current-data (list :symbol f
:file file-name))
- (princ (substitute-command-keys "Defined in `"))
+ (princ (substitute-quotes "Defined in `"))
(princ (help-fns-short-filename file-name))
- (princ (substitute-command-keys "'"))
+ (princ (substitute-quotes "'"))
;; Make a hyperlink to the library.
(save-excursion
(re-search-backward