Mercurial > emacs
comparison lisp/man.el @ 9210:8d35fd88194d
* man.el (Man-init-defvars, Man-cleanup-manpage,
Man-fontify-manpage): fix previous fix.
author | Francesco Potortì <pot@gnu.org> |
---|---|
date | Sat, 01 Oct 1994 13:27:15 +0000 |
parents | 5c7bf3247185 |
children | 1ce43418547c |
comparison
equal
deleted
inserted
replaced
9209:6ca1c82b40f4 | 9210:8d35fd88194d |
---|---|
1 ;;; man.el --- browse UNIX manual pages | 1 ;;; man.el --- browse UNIX manual pages |
2 | 2 |
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/09/22 12:10:16 $ | 6 ;; Last-Modified: $Date: 1994/09/29 12:42:45 $ |
7 ;; Version: $Revision: 1.49 $ | 7 ;; Version: $Revision: 1.50 $ |
8 ;; Keywords: help | 8 ;; Keywords: help |
9 ;; Adapted-By: ESR, pot | 9 ;; Adapted-By: ESR, pot |
10 | 10 |
11 ;; This file is part of GNU Emacs. | 11 ;; This file is part of GNU Emacs. |
12 | 12 |
329 (if Man-sed-script | 329 (if Man-sed-script |
330 (concat "-e '" Man-sed-script "'") | 330 (concat "-e '" Man-sed-script "'") |
331 "") | 331 "") |
332 "-e '/\e[789]/s///g'" | 332 "-e '/\e[789]/s///g'" |
333 "-e '/o\b+/s//o/g'" | 333 "-e '/o\b+/s//o/g'" |
334 "-e '/|\b-/s//+/g'" | 334 "-e '/|\b-[-|\b]*/s//+/g'" |
335 "-e '/^\\n$/D'" | 335 "-e '/^\\n$/D'" |
336 "-e '/[Nn]o such file or directory/d'" | 336 "-e '/[Nn]o such file or directory/d'" |
337 "-e '/Reformatting page. Wait/d'" | 337 "-e '/Reformatting page. Wait/d'" |
338 "-e '/Reformatting entry. Wait/d'" | 338 "-e '/Reformatting entry. Wait/d'" |
339 "-e '/^[ \t]*Hewlett-Packard[ \t]Company[ \t]*-[ \t][0-9]*[ \t]-/d'" | 339 "-e '/^[ \t]*Hewlett-Packard[ \t]Company[ \t]*-[ \t][0-9]*[ \t]-/d'" |
614 (put-text-property (1- (point)) (point) 'face 'underline)) | 614 (put-text-property (1- (point)) (point) 'face 'underline)) |
615 (goto-char (point-min)) | 615 (goto-char (point-min)) |
616 (while (re-search-forward "\e[789]" nil t) | 616 (while (re-search-forward "\e[789]" nil t) |
617 (backward-delete-char 2)) | 617 (backward-delete-char 2)) |
618 (goto-char (point-min)) | 618 (goto-char (point-min)) |
619 (while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t) | |
620 (replace-match "\\1") | |
621 (put-text-property (1- (point)) (point) 'face 'bold)) | |
622 (goto-char (point-min)) | |
619 (while (search-forward "o\b+" nil t) | 623 (while (search-forward "o\b+" nil t) |
620 (backward-delete-char 2) | 624 (backward-delete-char 2) |
621 (put-text-property (1- (point)) (point) 'face 'bold)) | 625 (put-text-property (1- (point)) (point) 'face 'bold)) |
622 (while (search-forward "|\b-" nil t) | 626 (goto-char (point-min)) |
627 (while (re-search-forward "|\b-[-|\b]*" nil t) | |
623 (replace-match "+") | 628 (replace-match "+") |
624 (put-text-property (1- (point)) (point) 'face 'bold)) | |
625 (goto-char (point-min)) | |
626 (while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t) | |
627 (replace-match "\\1") | |
628 (put-text-property (1- (point)) (point) 'face 'bold)) | 629 (put-text-property (1- (point)) (point) 'face 'bold)) |
629 (message "%s man page made up" Man-arguments)) | 630 (message "%s man page made up" Man-arguments)) |
630 | 631 |
631 (defun Man-cleanup-manpage () | 632 (defun Man-cleanup-manpage () |
632 "Remove overstriking and underlining from the current buffer." | 633 "Remove overstriking and underlining from the current buffer." |
639 (goto-char (point-min)) | 640 (goto-char (point-min)) |
640 (while (search-forward "\b_" nil t) (backward-delete-char 2)) | 641 (while (search-forward "\b_" nil t) (backward-delete-char 2)) |
641 (goto-char (point-min)) | 642 (goto-char (point-min)) |
642 (while (re-search-forward "\e[789]" nil t) (backward-delete-char 2)) | 643 (while (re-search-forward "\e[789]" nil t) (backward-delete-char 2)) |
643 (goto-char (point-min)) | 644 (goto-char (point-min)) |
644 (while (search-forward "o\b+" nil t) (backward-delete-char 2)) | |
645 (goto-char (point-min)) | |
646 (while (search-forward "|\b-" nil t) (replace-match "+")) | |
647 (goto-char (point-min)) | |
648 (while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t) | 645 (while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t) |
649 (replace-match "\\1")) | 646 (replace-match "\\1")) |
647 (goto-char (point-min)) | |
648 (while (search-forward "o\b+" nil t) (backward-delete-char 2)) | |
649 (goto-char (point-min)) | |
650 (while (re-search-forward "|\b-[-|\b]*" nil t) (replace-match "+")) | |
650 (message "%s man page cleaned up" Man-arguments)) | 651 (message "%s man page cleaned up" Man-arguments)) |
651 | 652 |
652 (defun Man-bgproc-sentinel (process msg) | 653 (defun Man-bgproc-sentinel (process msg) |
653 "Manpage background process sentinel." | 654 "Manpage background process sentinel." |
654 (let ((Man-buffer (process-buffer process)) | 655 (let ((Man-buffer (process-buffer process)) |