aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2011-07-14 19:43:29 +0200
committerLars Magne Ingebrigtsen2011-07-14 19:43:29 +0200
commit2f5c602485ff9bd41b9d791b371f279a6379effa (patch)
tree15346bb12e8a0fb5e5317e9e3aae896d2ebbdd9f
parentdf9733bf6bbaa86c4af08160a0eec218e8d3ef3b (diff)
downloademacs-2f5c602485ff9bd41b9d791b371f279a6379effa.tar.gz
emacs-2f5c602485ff9bd41b9d791b371f279a6379effa.zip
* man.el (Man-fontify-manpage): Fix message when formatting the man page.
Fixes: debbugs:7929
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/man.el25
2 files changed, 19 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ec8f794f211..66783b9a5ed 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * man.el (Man-fontify-manpage): Fix message when formatting the
4 man page (bug#7929).
5
12011-07-14 Eli Zaretskii <eliz@gnu.org> 62011-07-14 Eli Zaretskii <eliz@gnu.org>
2 7
3 * buff-menu.el (Buffer-menu-buffer+size): Accept an additional 8 * buff-menu.el (Buffer-menu-buffer+size): Accept an additional
diff --git a/lisp/man.el b/lisp/man.el
index 8782b22c804..ed24e35f0ea 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -1108,7 +1108,7 @@ Same for the ANSI bold and normal escape sequences."
1108 (put-text-property (match-beginning 0) 1108 (put-text-property (match-beginning 0)
1109 (match-end 0) 1109 (match-end 0)
1110 'face Man-overstrike-face))) 1110 'face Man-overstrike-face)))
1111 (message "%s man page formatted" Man-arguments)) 1111 (message "%s man page formatted" (Man-page-from-arguments Man-arguments)))
1112 1112
1113(defun Man-highlight-references (&optional xref-man-type) 1113(defun Man-highlight-references (&optional xref-man-type)
1114 "Highlight the references on mouse-over. 1114 "Highlight the references on mouse-over.
@@ -1260,16 +1260,7 @@ manpage command."
1260 (let ((args Man-arguments)) 1260 (let ((args Man-arguments))
1261 (kill-buffer (current-buffer)) 1261 (kill-buffer (current-buffer))
1262 (error "Can't find the %s manpage" 1262 (error "Can't find the %s manpage"
1263 ;; Skip arguments and only print the page name. 1263 (Man-page-from-arguments args)))
1264 (mapconcat
1265 'identity
1266 (delete nil
1267 (mapcar
1268 (lambda (elem)
1269 (and (not (string-match "^-" elem))
1270 elem))
1271 (split-string args " ")))
1272 " ")))
1273 (set-buffer-modified-p nil)))) 1264 (set-buffer-modified-p nil))))
1274 ;; Restore case-fold-search before calling 1265 ;; Restore case-fold-search before calling
1275 ;; Man-notify-when-ready because it may switch buffers. 1266 ;; Man-notify-when-ready because it may switch buffers.
@@ -1281,6 +1272,18 @@ manpage command."
1281 (error "%s" err-mess)) 1272 (error "%s" err-mess))
1282 )))) 1273 ))))
1283 1274
1275(defun Man-page-from-arguments (args)
1276 ;; Skip arguments and only print the page name.
1277 (mapconcat
1278 'identity
1279 (delete nil
1280 (mapcar
1281 (lambda (elem)
1282 (and (not (string-match "^-" elem))
1283 elem))
1284 (split-string args " ")))
1285 " "))
1286
1284 1287
1285;; ====================================================================== 1288;; ======================================================================
1286;; set up manual mode in buffer and build alists 1289;; set up manual mode in buffer and build alists