diff options
| author | John Paul Wallington | 2003-08-24 18:08:01 +0000 |
|---|---|---|
| committer | John Paul Wallington | 2003-08-24 18:08:01 +0000 |
| commit | 6c5acd7fbb603fd242162ad2326ebafb7c37d2ab (patch) | |
| tree | 28a6708de0ee50aae565f16e958dd54ed801b737 | |
| parent | fa1d74c5d114897b457b01dd1299c917c5f34bbc (diff) | |
| download | emacs-6c5acd7fbb603fd242162ad2326ebafb7c37d2ab.tar.gz emacs-6c5acd7fbb603fd242162ad2326ebafb7c37d2ab.zip | |
(Man-default-man-entry): Strip text properties when
snarfing parts of entry because `format' preserves properties.
| -rw-r--r-- | lisp/man.el | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/man.el b/lisp/man.el index a2ff8ad3d53..a3085e41501 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -569,19 +569,16 @@ This guess is based on the text surrounding the cursor." | |||
| 569 | (skip-chars-backward "-a-zA-Z0-9._+:") | 569 | (skip-chars-backward "-a-zA-Z0-9._+:") |
| 570 | (let ((start (point))) | 570 | (let ((start (point))) |
| 571 | (skip-chars-forward "-a-zA-Z0-9._+:") | 571 | (skip-chars-forward "-a-zA-Z0-9._+:") |
| 572 | (setq word (buffer-substring start (point)))) | 572 | (setq word (buffer-substring-no-properties start (point)))) |
| 573 | (if (string-match "[._]+$" word) | 573 | (if (string-match "[._]+$" word) |
| 574 | (setq word (substring word 0 (match-beginning 0)))) | 574 | (setq word (substring word 0 (match-beginning 0)))) |
| 575 | ;; If looking at something like ioctl(2) or brc(1M), include the | 575 | ;; If looking at something like ioctl(2) or brc(1M), include the |
| 576 | ;; section number in the returned value. Remove text properties. | 576 | ;; section number in the returned value. Remove text properties. |
| 577 | (forward-word 1) | 577 | (forward-word 1) |
| 578 | ;; Use `format' here to clear any text props from `word'. | 578 | (concat word |
| 579 | (format "%s%s" | ||
| 580 | word | ||
| 581 | (if (looking-at | 579 | (if (looking-at |
| 582 | (concat "[ \t]*([ \t]*\\(" Man-section-regexp "\\)[ \t]*)")) | 580 | (concat "[ \t]*([ \t]*\\(" Man-section-regexp "\\)[ \t]*)")) |
| 583 | (format "(%s)" (match-string 1)) | 581 | (format "(%s)" (match-string-no-properties 1))))))) |
| 584 | ""))))) | ||
| 585 | 582 | ||
| 586 | 583 | ||
| 587 | ;; ====================================================================== | 584 | ;; ====================================================================== |