aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Berman2016-06-05 13:14:44 +0200
committerStephen Berman2016-06-05 13:14:44 +0200
commit75de3640f147fad8bf1c4a7e393c8e294b9851f6 (patch)
treea1ea18642c03c798b755256821bb34ad88d894ea
parent700afe62a4cbd9ecf24551ddc4747e6319fb51a2 (diff)
downloademacs-75de3640f147fad8bf1c4a7e393c8e294b9851f6.tar.gz
emacs-75de3640f147fad8bf1c4a7e393c8e294b9851f6.zip
man.el: Fix links on hyphenated words (bug#23647)
* lisp/man.el (Man-bgproc-sentinel): Make links work on hyphenated words.
-rw-r--r--lisp/man.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/man.el b/lisp/man.el
index 5acf90baf28..0410626c655 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -1430,8 +1430,17 @@ manpage command."
1430 (quit-restore-window 1430 (quit-restore-window
1431 (get-buffer-window (current-buffer) t) 'kill) 1431 (get-buffer-window (current-buffer) t) 'kill)
1432 (kill-buffer (current-buffer))) 1432 (kill-buffer (current-buffer)))
1433 (message "Can't find the %s manpage" 1433 ;; Entries hyphenated due to the window's width
1434 (Man-page-from-arguments args))) 1434 ;; won't be found in the man database, so remove
1435 ;; the hyphenation -- assuming Groff hyphenates
1436 ;; either with hyphen-minus (ASCII 45, #x2d),
1437 ;; hyphen (#x2010) or soft hyphen (#xad) -- and
1438 ;; look again.
1439 (if (string-match "[-‐­]" args)
1440 (let ((str (replace-match "" nil nil args)))
1441 (Man-getpage-in-background str))
1442 (message "Can't find the %s manpage"
1443 (Man-page-from-arguments args))))
1435 1444
1436 (if Man-fontify-manpage-flag 1445 (if Man-fontify-manpage-flag
1437 (message "%s man page formatted" 1446 (message "%s man page formatted"