diff options
| author | Francesco Potortì | 1995-08-09 16:08:55 +0000 |
|---|---|---|
| committer | Francesco Potortì | 1995-08-09 16:08:55 +0000 |
| commit | 2f2228c0cc00793de8dc0fb2d08447950165c0a9 (patch) | |
| tree | 2d567faef0c3ded4a9a8d12dcaa62e3ddad4a5e4 | |
| parent | 7973cfa85ed76ee5f6d94c80c8281603bd0753ec (diff) | |
| download | emacs-2f2228c0cc00793de8dc0fb2d08447950165c0a9.tar.gz emacs-2f2228c0cc00793de8dc0fb2d08447950165c0a9.zip | |
* man.el (Man-translate-references): Anchor the regexps.
| -rw-r--r-- | lisp/man.el | 6 |
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." | |||
| 422 | "Translates REF from \"chmod(2V)\" to \"2v chmod\" style. | 422 | "Translates REF from \"chmod(2V)\" to \"2v chmod\" style. |
| 423 | Leave it as is if already in that style. Possibly downcase and | 423 | Leave it as is if already in that style. Possibly downcase and |
| 424 | translate the section (see the Man-downcase-section-letters-flag | 424 | translate the section (see the Man-downcase-section-letters-flag |
| 425 | and the Man-section-translations-alist variables)." | 425 | and the Man-section-translations-alist variables)." |
| 426 | (let ((name "") | 426 | (let ((name "") |
| 427 | (section "") | 427 | (section "") |
| 428 | (slist Man-section-translations-alist)) | 428 | (slist Man-section-translations-alist)) |
| 429 | (cond | 429 | (cond |
| 430 | ;; "chmod(2V)" case ? | 430 | ;; "chmod(2V)" case ? |
| 431 | ((string-match (concat Man-reference-regexp "$") ref) | 431 | ((string-match (concat "^" Man-reference-regexp "$") ref) |
| 432 | (setq name (Man-match-substring 1 ref) | 432 | (setq name (Man-match-substring 1 ref) |
| 433 | section (Man-match-substring 2 ref))) | 433 | section (Man-match-substring 2 ref))) |
| 434 | ;; "2v chmod" case ? | 434 | ;; "2v chmod" case ? |
| 435 | ((string-match (concat "\\(" Man-section-regexp | 435 | ((string-match (concat "^\\(" Man-section-regexp |
| 436 | "\\) +\\(" Man-name-regexp "\\)$") ref) | 436 | "\\) +\\(" Man-name-regexp "\\)$") ref) |
| 437 | (setq name (Man-match-substring 2 ref) | 437 | (setq name (Man-match-substring 2 ref) |
| 438 | section (Man-match-substring 1 ref)))) | 438 | section (Man-match-substring 1 ref)))) |