aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-11-22 04:37:43 +0000
committerRichard M. Stallman1994-11-22 04:37:43 +0000
commit1d56cc39c16d8cd7fd40a151c195b9f366ade48c (patch)
treef8972d194453aafd5ed698a2f76a84395d4e8052
parent4f4265abf2fc40fcf6f86e1a04d9c387ab97f976 (diff)
downloademacs-1d56cc39c16d8cd7fd40a151c195b9f366ade48c.tar.gz
emacs-1d56cc39c16d8cd7fd40a151c195b9f366ade48c.zip
(Man-bgproc-sentinel): No need for save-match-data.
-rw-r--r--lisp/man.el79
1 files changed, 39 insertions, 40 deletions
diff --git a/lisp/man.el b/lisp/man.el
index 587d244cc5a..719b12ee9d1 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -3,8 +3,8 @@
3;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
4 4
5;; Author: Barry A. Warsaw <bwarsaw@cen.com> 5;; Author: Barry A. Warsaw <bwarsaw@cen.com>
6;; Last-Modified: $Date: 1994/11/08 22:34:06 $ 6;; Last-Modified: $Date: 1994/11/09 12:38:31 $
7;; Version: $Revision: 1.58 $ 7;; Version: $Revision: 1.59 $
8;; Keywords: help 8;; Keywords: help
9;; Adapted-By: ESR, pot 9;; Adapted-By: ESR, pot
10 10
@@ -661,44 +661,43 @@ Same for the ANSI bold and normal escape sequences."
661 661
662 (save-excursion 662 (save-excursion
663 (set-buffer Man-buffer) 663 (set-buffer Man-buffer)
664 (save-match-data 664 (let ((case-fold-search nil))
665 (let ((case-fold-search nil)) 665 (goto-char (point-min))
666 (goto-char (point-min)) 666 (cond ((or (looking-at "No \\(manual \\)*entry for")
667 (cond ((or (looking-at "No \\(manual \\)*entry for") 667 (looking-at "[^\n]*: nothing appropriate$"))
668 (looking-at "[^\n]*: nothing appropriate$")) 668 (setq err-mess (buffer-substring (point)
669 (setq err-mess (buffer-substring (point) 669 (progn
670 (progn 670 (end-of-line) (point)))
671 (end-of-line) (point))) 671 delete-buff t))
672 delete-buff t)) 672 ((not (and (eq (process-status process) 'exit)
673 ((not (and (eq (process-status process) 'exit) 673 (= (process-exit-status process) 0)))
674 (= (process-exit-status process) 0))) 674 (setq err-mess
675 (setq err-mess 675 (concat (buffer-name Man-buffer)
676 (concat (buffer-name Man-buffer) 676 ": process "
677 ": process " 677 (let ((eos (1- (length msg))))
678 (let ((eos (1- (length msg)))) 678 (if (= (aref msg eos) ?\n)
679 (if (= (aref msg eos) ?\n) 679 (substring msg 0 eos) msg))))
680 (substring msg 0 eos) msg)))) 680 (goto-char (point-max))
681 (goto-char (point-max)) 681 (insert (format "\nprocess %s" msg))
682 (insert (format "\nprocess %s" msg)) 682 ))
683 )) 683 (if delete-buff
684 (if delete-buff 684 (kill-buffer Man-buffer)
685 (kill-buffer Man-buffer) 685 (if Man-fontify-manpage-flag
686 (if Man-fontify-manpage-flag 686 (Man-fontify-manpage)
687 (Man-fontify-manpage) 687 (Man-cleanup-manpage))
688 (Man-cleanup-manpage)) 688 (run-hooks 'Man-cooked-hook)
689 (run-hooks 'Man-cooked-hook) 689 (Man-mode)
690 (Man-mode) 690 (set-buffer-modified-p nil)
691 (set-buffer-modified-p nil) 691 ))
692 )) 692 ;; Restore case-fold-search before calling
693 ;; Restore case-fold-search before calling 693 ;; Man-notify-when-ready because it may switch buffers.
694 ;; Man-notify-when-ready because it may switch buffers. 694
695 695 (if (not delete-buff)
696 (if (not delete-buff) 696 (Man-notify-when-ready Man-buffer))
697 (Man-notify-when-ready Man-buffer)) 697
698 698 (if err-mess
699 (if err-mess 699 (error err-mess))
700 (error err-mess)) 700 ))))
701 )))))
702 701
703 702
704;; ====================================================================== 703;; ======================================================================