Source

xemacsweb / batch-psgml-validate.el

Diff from to

File batch-psgml-validate.el

   (let (old-result-begin
         old-result-end
         new-result-begin
-        result)
+        result
+        file
+        line)
     (goto-char (point-min))
     (condition-case err
-        (setq result (sgml-next-trouble-spot))
+        (progn
+          (setq result (sgml-next-trouble-spot))
+          (unless (string= result "Ok")
+            (setf file (buffer-file-name))
+            (setq line (count-lines (point-min) (point)))))
       (error (message ">> Error: %s" (prin1-to-string err)))
       (t (message "trouble: %s" (prin1-to-string err))))
     (when insert-result
         (if sgml-last-element
             (message "validation error in %s"
                      (sgml-element-context-string sgml-last-element)))
-        (message "validation error:%d:%s"
-                 (count-lines (point-min) (point))
-                 (buffer-file-name)))
+        (message "at %s line %d." file line))
       (insert html-helper-htmldtd-version)
       (html-quote-region new-result-begin (point))
       (insert