diff options
| author | Francesco Potortì | 1994-10-20 10:04:17 +0000 |
|---|---|---|
| committer | Francesco Potortì | 1994-10-20 10:04:17 +0000 |
| commit | f7046d47ca02fad4fccdfbce2f0b33b5995afef8 (patch) | |
| tree | eb58a322b8b455cfd7f26496d53911d69064789e /lisp | |
| parent | e9a79fb23e5198ad93e6979fb9a9639c8651cac4 (diff) | |
| download | emacs-f7046d47ca02fad4fccdfbce2f0b33b5995afef8.tar.gz emacs-f7046d47ca02fad4fccdfbce2f0b33b5995afef8.zip | |
* man.el (Man-init-defvars): Corrections to Man-filter-list.
(Man-fontify-manpage): Added cleaning of ksh manpage daggers.
(Man-fontify-manpage): Added cleaning of ksh manpage daggers.
(Man-bgproc-sentinel): Unconditionally call Man-cleanup-manpage.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/man.el | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/lisp/man.el b/lisp/man.el index 40629865bd2..179331ed43e 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/10/01 13:27:15 $ | 6 | ;; Last-Modified: $Date: 1994/10/06 10:28:26 $ |
| 7 | ;; Version: $Revision: 1.51 $ | 7 | ;; Version: $Revision: 1.52 $ |
| 8 | ;; Keywords: help | 8 | ;; Keywords: help |
| 9 | ;; Adapted-By: ESR, pot | 9 | ;; Adapted-By: ESR, pot |
| 10 | 10 | ||
| @@ -346,10 +346,8 @@ This is necessary if one wants to dump man.el with emacs." | |||
| 346 | (if Man-sed-script | 346 | (if Man-sed-script |
| 347 | (concat "-e '" Man-sed-script "'") | 347 | (concat "-e '" Man-sed-script "'") |
| 348 | "") | 348 | "") |
| 349 | "-e '/^[\001-\032]*$/d'" | ||
| 349 | "-e '/\e[789]/s///g'" | 350 | "-e '/\e[789]/s///g'" |
| 350 | "-e '/o\b+/s//o/g'" | ||
| 351 | "-e '/|\b-[-|\b]*/s//+/g'" | ||
| 352 | "-e '/^\\n$/D'" | ||
| 353 | "-e '/[Nn]o such file or directory/d'" | 351 | "-e '/[Nn]o such file or directory/d'" |
| 354 | "-e '/Reformatting page. Wait/d'" | 352 | "-e '/Reformatting page. Wait/d'" |
| 355 | "-e '/Reformatting entry. Wait/d'" | 353 | "-e '/Reformatting entry. Wait/d'" |
| @@ -361,6 +359,7 @@ This is necessary if one wants to dump man.el with emacs." | |||
| 361 | "-e '/^[ \t]*X[ \t]Version[ \t]1[01].*Release[ \t][0-9]/d'" | 359 | "-e '/^[ \t]*X[ \t]Version[ \t]1[01].*Release[ \t][0-9]/d'" |
| 362 | "-e '/^[A-za-z].*Last[ \t]change:/d'" | 360 | "-e '/^[A-za-z].*Last[ \t]change:/d'" |
| 363 | "-e '/^Sun[ \t]Release[ \t][0-9].*[0-9]$/d'" | 361 | "-e '/^Sun[ \t]Release[ \t][0-9].*[0-9]$/d'" |
| 362 | "-e '/[ \t]*Copyright [0-9]* UNIX System Laboratories, Inc.$/d'" | ||
| 364 | )) | 363 | )) |
| 365 | (cons | 364 | (cons |
| 366 | Man-awk-command | 365 | Man-awk-command |
| @@ -630,9 +629,6 @@ Same for the ANSI bold and normal escape sequences." | |||
| 630 | (backward-delete-char 2) | 629 | (backward-delete-char 2) |
| 631 | (put-text-property (1- (point)) (point) 'face 'underline)) | 630 | (put-text-property (1- (point)) (point) 'face 'underline)) |
| 632 | (goto-char (point-min)) | 631 | (goto-char (point-min)) |
| 633 | (while (re-search-forward "\e[789]" nil t) | ||
| 634 | (backward-delete-char 2)) | ||
| 635 | (goto-char (point-min)) | ||
| 636 | (while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t) | 632 | (while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t) |
| 637 | (replace-match "\\1") | 633 | (replace-match "\\1") |
| 638 | (put-text-property (1- (point)) (point) 'face 'bold)) | 634 | (put-text-property (1- (point)) (point) 'face 'bold)) |
| @@ -641,7 +637,7 @@ Same for the ANSI bold and normal escape sequences." | |||
| 641 | (backward-delete-char 2) | 637 | (backward-delete-char 2) |
| 642 | (put-text-property (1- (point)) (point) 'face 'bold)) | 638 | (put-text-property (1- (point)) (point) 'face 'bold)) |
| 643 | (goto-char (point-min)) | 639 | (goto-char (point-min)) |
| 644 | (while (re-search-forward "|\b-[-|\b]*" nil t) | 640 | (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) |
| 645 | (replace-match "+") | 641 | (replace-match "+") |
| 646 | (put-text-property (1- (point)) (point) 'face 'bold)) | 642 | (put-text-property (1- (point)) (point) 'face 'bold)) |
| 647 | (message "%s man page made up" Man-arguments)) | 643 | (message "%s man page made up" Man-arguments)) |
| @@ -649,22 +645,24 @@ Same for the ANSI bold and normal escape sequences." | |||
| 649 | (defun Man-cleanup-manpage () | 645 | (defun Man-cleanup-manpage () |
| 650 | "Remove overstriking and underlining from the current buffer." | 646 | "Remove overstriking and underlining from the current buffer." |
| 651 | (interactive) | 647 | (interactive) |
| 652 | (message "Please wait: cleaning up the %s man page..." Man-arguments) | 648 | (message "Please wait: cleaning up the %s man page..." |
| 653 | (goto-char (point-min)) | 649 | Man-arguments) |
| 654 | (while (re-search-forward "\e\\[[0-9]+m" nil t) (replace-match "")) | 650 | (or Man-sed-script |
| 655 | (goto-char (point-min)) | 651 | (progn |
| 656 | (while (search-forward "_\b" nil t) (backward-delete-char 2)) | 652 | (goto-char (point-min)) |
| 657 | (goto-char (point-min)) | 653 | (while (search-forward "_\b" nil t) (backward-delete-char 2)) |
| 658 | (while (search-forward "\b_" nil t) (backward-delete-char 2)) | 654 | (goto-char (point-min)) |
| 659 | (goto-char (point-min)) | 655 | (while (search-forward "\b_" nil t) (backward-delete-char 2)) |
| 660 | (while (re-search-forward "\e[789]" nil t) (backward-delete-char 2)) | 656 | (goto-char (point-min)) |
| 661 | (goto-char (point-min)) | 657 | (while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t) |
| 662 | (while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t) | 658 | (replace-match "\\1")) |
| 663 | (replace-match "\\1")) | 659 | (goto-char (point-min)) |
| 664 | (goto-char (point-min)) | 660 | (while (re-search-forward "\e\\[[0-9]+m" nil t) (replace-match "")) |
| 665 | (while (search-forward "o\b+" nil t) (backward-delete-char 2)) | 661 | (goto-char (point-min)) |
| 662 | (while (search-forward "o\b+" nil t) (backward-delete-char 2)) | ||
| 663 | )) | ||
| 666 | (goto-char (point-min)) | 664 | (goto-char (point-min)) |
| 667 | (while (re-search-forward "|\b-[-|\b]*" nil t) (replace-match "+")) | 665 | (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) (replace-match "+")) |
| 668 | (message "%s man page cleaned up" Man-arguments)) | 666 | (message "%s man page cleaned up" Man-arguments)) |
| 669 | 667 | ||
| 670 | (defun Man-bgproc-sentinel (process msg) | 668 | (defun Man-bgproc-sentinel (process msg) |
| @@ -702,8 +700,7 @@ Same for the ANSI bold and normal escape sequences." | |||
| 702 | (kill-buffer Man-buffer) | 700 | (kill-buffer Man-buffer) |
| 703 | (if Man-fontify-manpage-flag | 701 | (if Man-fontify-manpage-flag |
| 704 | (Man-fontify-manpage) | 702 | (Man-fontify-manpage) |
| 705 | (if (not Man-sed-script) | 703 | (Man-cleanup-manpage)) |
| 706 | (Man-cleanup-manpage))) | ||
| 707 | (run-hooks 'Man-cooked-hook) | 704 | (run-hooks 'Man-cooked-hook) |
| 708 | (Man-mode) | 705 | (Man-mode) |
| 709 | (set-buffer-modified-p nil) | 706 | (set-buffer-modified-p nil) |