From 5c82792a079e3a05202486e37834689a67a71b4e Mon Sep 17 00:00:00 2001 From: Hendrik Tews Date: Sun, 24 Jan 2021 20:48:13 +0100 Subject: 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. --- lib/texi-docstring-magic.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/texi-docstring-magic.el') 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 -- cgit v1.2.3