Function: substitute-quotes
substitute-quotes is a byte-compiled function defined in compat-29.el.
Signature
(substitute-quotes STRING)
Documentation
[Compatibility function for substitute-quotes, defined in Emacs 29.1. See
(compat) Emacs 29.1' for more details.]
Substitute quote characters for display. Each grave accent ` is replaced by
left quote, and each apostrophe ' is replaced by right quote. Left and right
quote characters are specified by text-quoting-style(var)/text-quoting-style(fun).
Source Code
;; Defined in ~/.emacs.d/elpa/compat-30.1.0.1/compat-29.el
;;;; Defined in help.el
(compat-defun substitute-quotes (string) ;; <compat-tests:substitute-quotes>
"Substitute quote characters for display.
Each grave accent \\=` is replaced by left quote, and each
apostrophe \\=' is replaced by right quote. Left and right quote
characters are specified by `text-quoting-style'."
(cond ((eq (text-quoting-style) 'curve)
(string-replace "`" "‘"
(string-replace "'" "’" string)))
((eq (text-quoting-style) 'straight)
(string-replace "`" "'" string))
(t string)))