aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHendrik Tews2021-01-24 20:48:13 +0100
committerhendriktews2021-01-31 21:42:52 +0100
commit5c82792a079e3a05202486e37834689a67a71b4e (patch)
tree0f7bcaa8d59b1d30c1ad481f241f6b4a1b3962fa /lib
parent58d6ec212c96cfd1f3ace6e8be16b1c46c66c718 (diff)
fix make magic problem with emacs 26 and older
Set text quoting style to get doc strings without unicode single quotation marks to keep the regular expressions in texi-docstring-magic working.
Diffstat (limited to 'lib')
-rw-r--r--lib/texi-docstring-magic.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/texi-docstring-magic.el b/lib/texi-docstring-magic.el
index 2d6a3cf4..2f20b078 100644
--- a/lib/texi-docstring-magic.el
+++ b/lib/texi-docstring-magic.el
@@ -347,7 +347,17 @@ With prefix arg, no errors on unknown symbols. (This results in
(interactive "P")
(save-excursion
(goto-char (point-min))
- (let ((magic (concat "^"
+ ;; Since emacs 26 grave accent and apostrophe are translated to
+ ;; unicode single quotation marks, \"`foo'" becomes "‘foo’", see
+ ;; Section Documentation -> Text Quoting Style (24.4 in emacs 27)
+ ;; in the elisp manual. This translation happens apparently
+ ;; already when accessing the documentation strings with
+ ;; `documentation-property' or similar functions; breaking the
+ ;; regular expressions for transforming the doc strings in this
+ ;; module. Set `text-quoting-style' to get the doc strings without
+ ;; this translation.
+ (let ((text-quoting-style 'grave)
+ (magic (concat "^"
(regexp-quote texi-docstring-magic-comment)
"\\s-*\\(\\(\\w\\|\\-\\)+\\)[ \t]*$"))
p