diff options
author | K. Handa <handa@gnu.org> | 2016-06-05 20:49:55 +0900 |
---|---|---|
committer | K. Handa <handa@gnu.org> | 2016-06-05 20:49:55 +0900 |
commit | 4ffe265b5192fd93137cd49fb204efdc4bda2887 (patch) | |
tree | 054528efc2f8deb55396df2c871d093ae270be5d /lisp/man.el | |
parent | 096d1347654803ee04771516c58701ddf210d898 (diff) | |
parent | 75de3640f147fad8bf1c4a7e393c8e294b9851f6 (diff) | |
download | emacs-4ffe265b5192fd93137cd49fb204efdc4bda2887.tar.gz |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp/man.el')
-rw-r--r-- | lisp/man.el | 13 |
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." (quit-restore-window (get-buffer-window (current-buffer) t) 'kill) (kill-buffer (current-buffer))) - (message "Can't find the %s manpage" - (Man-page-from-arguments args))) + ;; Entries hyphenated due to the window's width + ;; won't be found in the man database, so remove + ;; the hyphenation -- assuming Groff hyphenates + ;; either with hyphen-minus (ASCII 45, #x2d), + ;; hyphen (#x2010) or soft hyphen (#xad) -- and + ;; look again. + (if (string-match "[-‐]" args) + (let ((str (replace-match "" nil nil args))) + (Man-getpage-in-background str)) + (message "Can't find the %s manpage" + (Man-page-from-arguments args)))) (if Man-fontify-manpage-flag (message "%s man page formatted" |