]> git.eshelyaron.com Git - emacs.git/commitdiff
Make `man' more portable
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 22 Apr 2025 06:45:34 +0000 (08:45 +0200)
committerEshel Yaron <me@eshelyaron.com>
Tue, 22 Apr 2025 17:57:17 +0000 (19:57 +0200)
* lisp/man.el (Man-init-defvars): Use [:cntrl:].  Character ranges
with octal numbers aren't portable enough.  (Bug#77944)

(cherry picked from commit fc5e905dc90e21b1a381bde42e22c06f45c17e16)

lisp/man.el

index 65b7b85749c83ce059334a8204781b8cc11223e1..d1b3b5b0ffd2ef3227812c93e3ee8c3ca47ce504 100644 (file)
@@ -625,9 +625,7 @@ This is necessary if one wants to dump man.el with Emacs."
             (if Man-sed-script
                 (concat "-e '" Man-sed-script "'")
               "")
-             ;; Use octal numbers.  Otherwise, \032 (Ctrl-Z) would
-             ;; suspend remote connections.
-            "-e '/^[\\o001-\\o032][\\o001-\\o032]*$/d'"
+            "-e '/^[[:cntrl:]][[:cntrl:]]*$/d'"
             "-e '/\e[789]/s///g'"
             "-e '/Reformatting page.  Wait/d'"
             "-e '/Reformatting entry.  Wait/d'"
@@ -762,7 +760,7 @@ Different man programs support this feature in different ways.
 The default Debian man program (\"man-db\") has a `--local-file'
 \(or `-l') option for this purpose.  The default Red Hat man
 program has no such option, but interprets any name containing
-a \"/\" as a local filename.  The function returns either `man-db'
+a \"/\" as a local filename.  The function returns either `man-db',
 `man', or nil."
   (if (eq Man-support-local-filenames 'auto-detect)
       (with-connection-local-variables