# HG changeset patch # User Francesco Potort # Date 807984535 0 # Node ID c388f6f7f2108c6ce02a4f22dc1c070e284b8099 # Parent 4db1f387e85fa4b4ab52e4f3810c16a251b1e488 * man.el (Man-translate-references): Anchor the regexps. diff -r 4db1f387e85f -r c388f6f7f210 lisp/man.el --- a/lisp/man.el Tue Aug 08 21:22:16 1995 +0000 +++ b/lisp/man.el Wed Aug 09 16:08:55 1995 +0000 @@ -422,17 +422,17 @@ "Translates REF from \"chmod(2V)\" to \"2v chmod\" style. Leave it as is if already in that style. Possibly downcase and translate the section (see the Man-downcase-section-letters-flag -and the Man-section-translations-alist variables)." +and the Man-section-translations-alist variables)." (let ((name "") (section "") (slist Man-section-translations-alist)) (cond ;; "chmod(2V)" case ? - ((string-match (concat Man-reference-regexp "$") ref) + ((string-match (concat "^" Man-reference-regexp "$") ref) (setq name (Man-match-substring 1 ref) section (Man-match-substring 2 ref))) ;; "2v chmod" case ? - ((string-match (concat "\\(" Man-section-regexp + ((string-match (concat "^\\(" Man-section-regexp "\\) +\\(" Man-name-regexp "\\)$") ref) (setq name (Man-match-substring 2 ref) section (Man-match-substring 1 ref))))