summaryrefslogtreecommitdiff
path: root/lisp/man.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2003-09-08 11:56:09 +0000
committerKenichi Handa <handa@m17n.org>2003-09-08 11:56:09 +0000
commit463f5630a5e7cbe7f042bc1175d1fa1c4e98860f (patch)
tree3287d0c628fea2249abf4635b3a4f45bedd6f8c4 /lisp/man.el
parent4256310de631bd57c78b88b5131caa073315b3d7 (diff)
downloademacs-463f5630a5e7cbe7f042bc1175d1fa1c4e98860f.tar.gz
emacs-463f5630a5e7cbe7f042bc1175d1fa1c4e98860f.tar.bz2
emacs-463f5630a5e7cbe7f042bc1175d1fa1c4e98860f.zip
New directory
Diffstat (limited to 'lisp/man.el')
-rw-r--r--lisp/man.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/man.el b/lisp/man.el
index 075c38866fb..a2ff8ad3d53 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -569,15 +569,19 @@ 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-no-properties start (point))))
+ (setq word (buffer-substring 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.
- (concat word
+ (forward-word 1)
+ ;; Use `format' here to clear any text props from `word'.
+ (format "%s%s"
+ word
(if (looking-at
(concat "[ \t]*([ \t]*\\(" Man-section-regexp "\\)[ \t]*)"))
- (format "(%s)" (match-string-no-properties 1)))))))
+ (format "(%s)" (match-string 1))
+ "")))))
;; ======================================================================
@@ -1304,5 +1308,4 @@ Specify which REFERENCE to use; default is based on word at point."
(provide 'man)
-;;; arch-tag: 587cda76-8e23-4594-b1f3-89b6b09a0d47
;;; man.el ends here