summaryrefslogtreecommitdiff
path: root/lisp/man.el
diff options
context:
space:
mode:
authorJohn Paul Wallington <jpw@pobox.com>2003-08-24 18:08:01 +0000
committerJohn Paul Wallington <jpw@pobox.com>2003-08-24 18:08:01 +0000
commit6c5acd7fbb603fd242162ad2326ebafb7c37d2ab (patch)
tree28a6708de0ee50aae565f16e958dd54ed801b737 /lisp/man.el
parentfa1d74c5d114897b457b01dd1299c917c5f34bbc (diff)
downloademacs-6c5acd7fbb603fd242162ad2326ebafb7c37d2ab.tar.gz
(Man-default-man-entry): Strip text properties when
snarfing parts of entry because `format' preserves properties.
Diffstat (limited to 'lisp/man.el')
-rw-r--r--lisp/man.el9
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."
(skip-chars-backward "-a-zA-Z0-9._+:")
(let ((start (point)))
(skip-chars-forward "-a-zA-Z0-9._+:")
- (setq word (buffer-substring start (point))))
+ (setq word (buffer-substring-no-properties start (point))))
(if (string-match "[._]+$" word)
(setq word (substring word 0 (match-beginning 0))))
;; If looking at something like ioctl(2) or brc(1M), include the
;; section number in the returned value. Remove text properties.
(forward-word 1)
- ;; Use `format' here to clear any text props from `word'.
- (format "%s%s"
- word
+ (concat word
(if (looking-at
(concat "[ \t]*([ \t]*\\(" Man-section-regexp "\\)[ \t]*)"))
- (format "(%s)" (match-string 1))
- "")))))
+ (format "(%s)" (match-string-no-properties 1)))))))
;; ======================================================================