summaryrefslogtreecommitdiff
path: root/lisp/woman.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-10-17 12:17:10 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-10-17 12:17:10 +0200
commitbee50664ae33deba3fe2284748f1e5a1622a1bb6 (patch)
treed6505903f26e4966660de4248a82012f7436b7e9 /lisp/woman.el
parentea47bcc431ee7e3fbb545ad05b12ed921923c468 (diff)
downloademacs-bee50664ae33deba3fe2284748f1e5a1622a1bb6.tar.gz
Make woman ignore the new groff kerning operators
* lisp/woman.el (woman-decode-region): Ignore the new groff kerning operators (bug#42219).
Diffstat (limited to 'lisp/woman.el')
-rw-r--r--lisp/woman.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/woman.el b/lisp/woman.el
index eeacceadc27..52f610b569f 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -2289,6 +2289,12 @@ Currently set only from \\='\\\" t in the first line of the source file.")
(setq fill-column woman-fill-column
tab-width woman-tab-width)
+ ;; Ignore the \, and \/ kerning operators. See
+ ;; https://www.gnu.org/software/groff/manual/groff.html#Ligatures-and-Kerning
+ (goto-char (point-min))
+ (while (re-search-forward "\\\\,\\|\\\\/" nil t)
+ (replace-match "" t t))
+
;; Hide unpaddable and digit-width spaces \(space) and \0:
(goto-char from)
(while (re-search-forward "\\\\[ 0]" nil t)