From 99b3250d04288260e3a6db864cda910d8093bee1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 18 Aug 2017 11:47:29 +0300 Subject: [PATCH] Non-ASCII support for man page section and header names MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * lisp/man.el (Man-name-regexp, Man-page-header-regexp) (Man-heading-regexp): Replace ASCII character classes by equivalent classes that allow non-ASCII characters. Suggested by Grégory Mounié . (Bug#27978) --- lisp/man.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/man.el b/lisp/man.el index 0e1c92956b3..13efc21b03d 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -278,7 +278,7 @@ Used in `bookmark-set' to get the default bookmark name." :type 'hook :group 'man) -(defvar Man-name-regexp "[-a-zA-Z0-9_­+][-a-zA-Z0-9_.:­+]*" +(defvar Man-name-regexp "[-[:alnum:]_­+][-[:alnum:]_.:­+]*" "Regular expression describing the name of a manpage (without section).") (defvar Man-section-regexp "[0-9][a-zA-Z0-9+]*\\|[LNln]" @@ -286,13 +286,13 @@ Used in `bookmark-set' to get the default bookmark name." (defvar Man-page-header-regexp (if (string-match "-solaris2\\." system-configuration) - (concat "^[-A-Za-z0-9_].*[ \t]\\(" Man-name-regexp + (concat "^[-[:alnum:]_].*[ \t]\\(" Man-name-regexp "(\\(" Man-section-regexp "\\))\\)$") (concat "^[ \t]*\\(" Man-name-regexp "(\\(" Man-section-regexp "\\))\\).*\\1")) "Regular expression describing the heading of a page.") -(defvar Man-heading-regexp "^\\([A-Z][A-Z0-9 /-]+\\)$" +(defvar Man-heading-regexp "^\\([[:upper:]][[:upper:]0-9 /-]+\\)$" "Regular expression describing a manpage heading entry.") (defvar Man-see-also-regexp "SEE ALSO" -- 2.39.2