Mercurial > emacs
comparison lisp/textmodes/tex-mode.el @ 45055:b9c9078b245d
(tex-validate-buffer): Use `occur-revert-arguments' instead of setting
`occur-nlines' and `occur-buffer'. Don't test for `input-pending-p'
in loop. Set text property `occur-target' instead of `occur'.
author | Colin Walters <walters@gnu.org> |
---|---|
date | Wed, 01 May 2002 05:22:08 +0000 |
parents | 6c699f1e076c |
children | 7177a47bc557 |
comparison
equal
deleted
inserted
replaced
45054:a25f9d4a291c | 45055:b9c9078b245d |
---|---|
975 (with-output-to-temp-buffer "*Occur*" | 975 (with-output-to-temp-buffer "*Occur*" |
976 (princ "Mismatches:\n") | 976 (princ "Mismatches:\n") |
977 (save-excursion | 977 (save-excursion |
978 (set-buffer standard-output) | 978 (set-buffer standard-output) |
979 (occur-mode) | 979 (occur-mode) |
980 (setq occur-buffer buffer) | 980 ;; This won't actually work...Really, this whole thing should |
981 (setq occur-nlines 0)) | 981 ;; be rewritten instead of being a hack on top of occur. |
982 (setq occur-revert-arguments (list nil 0 (list buffer)))) | |
982 (save-excursion | 983 (save-excursion |
983 (goto-char (point-max)) | 984 (goto-char (point-max)) |
984 (while (and (not (input-pending-p)) (not (bobp))) | 985 (while (and (not (bobp))) |
985 (let ((end (point)) | 986 (let ((end (point)) |
986 prev-end) | 987 prev-end) |
987 ;; Scan the previous paragraph for invalidities. | 988 ;; Scan the previous paragraph for invalidities. |
988 (if (search-backward "\n\n" nil t) | 989 (if (search-backward "\n\n" nil t) |
989 (progn | 990 (progn |
1020 (add-text-properties | 1021 (add-text-properties |
1021 text-beg (- text-end 1) | 1022 text-beg (- text-end 1) |
1022 '(mouse-face highlight | 1023 '(mouse-face highlight |
1023 help-echo "mouse-2: go to this invalidity")) | 1024 help-echo "mouse-2: go to this invalidity")) |
1024 (put-text-property text-beg (- text-end 1) | 1025 (put-text-property text-beg (- text-end 1) |
1025 'occur tem))))) | 1026 'occur-target tem))))) |
1026 (goto-char prev-end)))) | 1027 (goto-char prev-end)))) |
1027 (with-current-buffer standard-output | 1028 (with-current-buffer standard-output |
1028 (if (eq num-matches 0) | 1029 (if (eq num-matches 0) |
1029 (insert "None!\n")) | 1030 (insert "None!\n")) |
1030 (if (interactive-p) | 1031 (if (interactive-p) |