]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/man.el (Man-reference-regexp, Man-default-man-entry):
authorGlenn Morris <rgm@gnu.org>
Mon, 6 Jun 2016 17:04:43 +0000 (13:04 -0400)
committerGlenn Morris <rgm@gnu.org>
Mon, 6 Jun 2016 17:04:43 +0000 (13:04 -0400)
Handle U+2010 hyphen at eol, as used when LANG=en_US.utf8.

lisp/man.el

index 0410626c6552949c7e23697fd53d33a6f84b4ea5..d127decfebd8497411944ae66f67972d577ee225 100644 (file)
@@ -308,7 +308,7 @@ This regular expression should start with a `^' character.")
 
 (defvar Man-reference-regexp
   (concat "\\(" Man-name-regexp
-         "\\(\n[ \t]+" Man-name-regexp "\\)*\\)[ \t]*(\\("
+         "\\(‐?\n[ \t]+" Man-name-regexp "\\)*\\)[ \t]*(\\("
          Man-section-regexp "\\))")
   "Regular expression describing a reference to another manpage.")
 
@@ -779,7 +779,7 @@ POS defaults to `point'."
       ;;     see this-
       ;;     command-here(1)
       ;; Note: This code gets executed iff our entry is after POS.
-      (when (looking-at "[ \t\r\n]+\\([-a-zA-Z0-9._+:]+\\)([0-9])")
+      (when (looking-at "‐?[ \t\r\n]+\\([-a-zA-Z0-9._+:]+\\)([0-9])")
        (setq word (concat word (match-string-no-properties 1)))
        ;; Make sure the section number gets included by the code below.
        (goto-char (match-end 1)))