diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-20 19:19:07 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-20 19:28:38 +0100 |
| commit | adcbf00d7740e44ea997c06ce89473b5824674d8 (patch) | |
| tree | 9eee6872bb9e5cd120c0118fad1ea92d113cf1f2 /compat-29.el | |
| parent | 5988ede6867fc9e85bf9b0064b709676e68b0e2b (diff) | |
compat-29: Add substitute-quotes
Diffstat (limited to 'compat-29.el')
| -rw-r--r-- | compat-29.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compat-29.el b/compat-29.el index 6d6adfe..60f5b2e 100644 --- a/compat-29.el +++ b/compat-29.el @@ -1124,6 +1124,20 @@ command exists in this specific map, but it doesn't have the (delete (last key) submap))) def)) +;;;; 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))) + ;;;; Defined in button.el (compat-defun button--properties (callback data help-echo) ;; <compat-tests:buttonize> |
