From: Eli Zaretskii Date: Fri, 18 Aug 2017 08:47:29 +0000 (+0300) Subject: Non-ASCII support for man page section and header names X-Git-Tag: emacs-26.0.90~427 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=99b3250d04288260e3a6db864cda910d8093bee1;p=emacs.git Non-ASCII support for man page section and header names * 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) --- 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"