comparison lisp/man.el @ 57699:f633084f70ae

(Man-cleanup-manpage): Instead of interactive-p, use an arg set non-nil by the interactive spec.
author Richard M. Stallman <rms@gnu.org>
date Tue, 26 Oct 2004 08:27:26 +0000
parents 060e08bf63fe
children 78ec31c498b7 0fe073a08cef
comparison
equal deleted inserted replaced
57698:5e84f3fe94f0 57699:f633084f70ae
891 (match-end button-pos) 891 (match-end button-pos)
892 'type type 892 'type type
893 'Man-target-string (match-string target-pos) 893 'Man-target-string (match-string target-pos)
894 ))))) 894 )))))
895 895
896 (defun Man-cleanup-manpage () 896 (defun Man-cleanup-manpage (&optional interactive)
897 "Remove overstriking and underlining from the current buffer." 897 "Remove overstriking and underlining from the current buffer.
898 (interactive) 898 Normally skip any jobs that should have been done by the sed script,
899 but when called interactively, do those jobs even if the sed
900 script would have done them."
901 (interactive "p")
899 (message "Please wait: cleaning up the %s man page..." 902 (message "Please wait: cleaning up the %s man page..."
900 Man-arguments) 903 Man-arguments)
901 (if (or (interactive-p) (not Man-sed-script)) 904 (if (or interactive (not Man-sed-script))
902 (progn 905 (progn
903 (goto-char (point-min)) 906 (goto-char (point-min))
904 (while (search-forward "_\b" nil t) (backward-delete-char 2)) 907 (while (search-forward "_\b" nil t) (backward-delete-char 2))
905 (goto-char (point-min)) 908 (goto-char (point-min))
906 (while (search-forward "\b_" nil t) (backward-delete-char 2)) 909 (while (search-forward "\b_" nil t) (backward-delete-char 2))