(nxml-mode): Use mode-line-process to indicate the use of degraded mode.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 16 Jan 2008 16:17:53 +0000 (16:17 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 16 Jan 2008 16:17:53 +0000 (16:17 +0000)
(nxml-degrade): Don't change mode-name.

lisp/ChangeLog
lisp/nxml/nxml-mode.el

index 73bfeb8..d426c72 100644 (file)
@@ -1,5 +1,9 @@
 2008-01-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * nxml/nxml-mode.el (nxml-mode): Use mode-line-process to indicate
+       the use of degraded mode.
+       (nxml-degrade): Don't change mode-name.
+
        * nxml/rng-nxml.el (rng-nxml-mode-init):
        Don't overwrite mode-line-process.
 
index aa6ac07..11faded 100644 (file)
@@ -510,6 +510,7 @@ Many aspects this mode can be customized using
   (kill-all-local-variables)
   (setq major-mode 'nxml-mode)
   (setq mode-name "nXML")
+  (set (make-local-variable 'mode-line-process) '((nxml-degraded "/degraded")))
   ;; We'll determine the fill prefix ourselves
   (make-local-variable 'adaptive-fill-mode)
   (setq adaptive-fill-mode nil)
@@ -573,8 +574,7 @@ Many aspects this mode can be customized using
       (nxml-with-unmodifying-text-property-changes
        (nxml-clear-face (point-min) (point-max))
        (nxml-set-fontified (point-min) (point-max))
-       (nxml-clear-inside (point-min) (point-max)))
-      (setq mode-name "nXML/degraded"))))
+       (nxml-clear-inside (point-min) (point-max))))))
 
 ;;; Change management