Subject: [PATCH] woman.el: remove kerning escapes

From: Brendan O'Dea <[email-masked]>
Date: Fri, 4 Feb 2022 16:42:38 +1100

Severity: wishlist
Tags: patch

Some manual pages use kerning escapes* to correctly handle adjacent
roman and italic characters.  The woman function doesn't interpret them,
resulting in output such as the following from `ls'.

  ls [\,OPTION\/]... [\,FILE\/]...

  --color[=\,WHEN\/]
          colorize the  output; WHEN can be  'always' (default if
          omitted), 'auto', or 'never'; more info below

Attached is a trivial patch to remove them.

--bod

* https://www.gnu.org/software/groff/manual/html_node/Ligatures-and-Kerning.html#Ligatures-and-Kerning
--- woman.el.orig	2022-02-04 14:08:54.188622150 +1100
+++ woman.el	2022-02-04 14:08:51.254677185 +1100
@@ -2299,9 +2299,9 @@
       (replace-match woman-unpadded-space-string t t))
 
     ;; Discard optional hyphen \%; concealed newlines \<newline>;
-    ;; point-size change function \sN,\s+N, \s-N:
+    ;; kerning \/, \,; point-size change function \sN,\s+N, \s-N:
     (goto-char from)
-    (while (re-search-forward "\\\\\\([%\n]\\|s[-+]?[0-9]+\\)" nil t)
+    (while (re-search-forward "\\\\\\([%\n/,]\\|s[-+]?[0-9]+\\)" nil t)
       (woman-delete-match 0))
 
     ;; BEWARE: THIS SHOULD PROBABLY ALL BE DONE MUCH LATER!!!!!