comparison lisp/nxml/rng-valid.el @ 87346:c5910db8e06e

(rng-error): Rename from rng-error-face.
author Jason Rumney <jasonr@gnu.org>
date Thu, 20 Dec 2007 15:18:18 +0000
parents 558565220fc2
children b9e8ab94c460
comparison
equal deleted inserted replaced
87345:ed205c40e81f 87346:c5910db8e06e
105 "Validation of XML using RELAX NG." 105 "Validation of XML using RELAX NG."
106 :group 'wp 106 :group 'wp
107 :group 'nxml 107 :group 'nxml
108 :group 'languages) 108 :group 'languages)
109 109
110 (defface rng-error-face '((t (:underline "red"))) 110 (defface rng-error '((t (:inherit font-lock-warning-face)))
111 "Face for highlighting XML errors." 111 "Face for highlighting XML errors."
112 :group 'relax-ng) 112 :group 'relax-ng)
113 113
114 (defcustom rng-state-cache-distance 2000 114 (defcustom rng-state-cache-distance 2000
115 "*Distance in characters between each parsing and validation state cache." 115 "*Distance in characters between each parsing and validation state cache."
222 222
223 Checks whether the buffer is a well-formed XML 1.0 document, 223 Checks whether the buffer is a well-formed XML 1.0 document,
224 conforming to the XML Namespaces Recommendation and valid against a 224 conforming to the XML Namespaces Recommendation and valid against a
225 RELAX NG schema. The mode-line indicates whether it is or not. Any 225 RELAX NG schema. The mode-line indicates whether it is or not. Any
226 parts of the buffer that cause it not to be are considered errors and 226 parts of the buffer that cause it not to be are considered errors and
227 are highlighted with `rng-error-face'. A description of each error is 227 are highlighted with face `rng-error'. A description of each error is
228 available as a tooltip. \\[rng-next-error] goes to the next error 228 available as a tooltip. \\[rng-next-error] goes to the next error
229 after point. Clicking mouse-1 on the word `Invalid' in the mode-line 229 after point. Clicking mouse-1 on the word `Invalid' in the mode-line
230 goes to the first error in the buffer. If the buffer changes, then it 230 goes to the first error in the buffer. If the buffer changes, then it
231 will be automatically rechecked when Emacs becomes idle; the 231 will be automatically rechecked when Emacs becomes idle; the
232 rechecking will be paused whenever there is input pending.. 232 rechecking will be paused whenever there is input pending..
766 ;; of the one that starts first is shown 766 ;; of the one that starts first is shown
767 (overlay-put overlay 'priority beg) 767 (overlay-put overlay 'priority beg)
768 (overlay-put overlay 'category 'rng-error) 768 (overlay-put overlay 'category 'rng-error)
769 (overlay-put overlay 'help-echo message)))))) 769 (overlay-put overlay 'help-echo message))))))
770 770
771 (put 'rng-error 'face 'rng-error-face) 771 (put 'rng-error 'face 'rng-error)
772 (put 'rng-error 'modification-hooks '(rng-error-modified)) 772 (put 'rng-error 'modification-hooks '(rng-error-modified))
773 773
774 ;; If we don't do this, then the front delimiter can move 774 ;; If we don't do this, then the front delimiter can move
775 ;; past the end delimiter. 775 ;; past the end delimiter.
776 (defun rng-error-modified (overlay after-p beg end &optional pre-change-len) 776 (defun rng-error-modified (overlay after-p beg end &optional pre-change-len)