summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Potortì <pot@gnu.org>1995-08-09 16:08:55 +0000
committerFrancesco Potortì <pot@gnu.org>1995-08-09 16:08:55 +0000
commit0fdc178046656012d5dd4be4a79d78341aaf5711 (patch)
treeadb0d2ae1dfd70f741435deefc55326478d70fec
parentc909e7c9218901669db9c9b227382285e390ee6c (diff)
downloademacs-0fdc178046656012d5dd4be4a79d78341aaf5711.tar.gz
* man.el (Man-translate-references): Anchor the regexps.
-rw-r--r--lisp/man.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/man.el b/lisp/man.el
index 98538d60b30..174a72455ec 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -422,17 +422,17 @@ that string instead of from the current buffer."
"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))))