comparison lisp/nxml/nxml-mode.el @ 87793:b0683497550c

(nxml-mode): Use mode-line-process to indicate the use of degraded mode. (nxml-degrade): Don't change mode-name.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 16 Jan 2008 16:17:53 +0000
parents a38e332c61af
children b6c62ca6da76
comparison
equal deleted inserted replaced
87792:c689fd3b9cfd 87793:b0683497550c
508 \\[customize-group] nxml RET." 508 \\[customize-group] nxml RET."
509 (interactive) 509 (interactive)
510 (kill-all-local-variables) 510 (kill-all-local-variables)
511 (setq major-mode 'nxml-mode) 511 (setq major-mode 'nxml-mode)
512 (setq mode-name "nXML") 512 (setq mode-name "nXML")
513 (set (make-local-variable 'mode-line-process) '((nxml-degraded "/degraded")))
513 ;; We'll determine the fill prefix ourselves 514 ;; We'll determine the fill prefix ourselves
514 (make-local-variable 'adaptive-fill-mode) 515 (make-local-variable 'adaptive-fill-mode)
515 (setq adaptive-fill-mode nil) 516 (setq adaptive-fill-mode nil)
516 (make-local-variable 'forward-sexp-function) 517 (make-local-variable 'forward-sexp-function)
517 (setq forward-sexp-function 'nxml-forward-balanced-item) 518 (setq forward-sexp-function 'nxml-forward-balanced-item)
571 (save-restriction 572 (save-restriction
572 (widen) 573 (widen)
573 (nxml-with-unmodifying-text-property-changes 574 (nxml-with-unmodifying-text-property-changes
574 (nxml-clear-face (point-min) (point-max)) 575 (nxml-clear-face (point-min) (point-max))
575 (nxml-set-fontified (point-min) (point-max)) 576 (nxml-set-fontified (point-min) (point-max))
576 (nxml-clear-inside (point-min) (point-max))) 577 (nxml-clear-inside (point-min) (point-max))))))
577 (setq mode-name "nXML/degraded"))))
578 578
579 ;;; Change management 579 ;;; Change management
580 580
581 (defun nxml-after-change (start end pre-change-length) 581 (defun nxml-after-change (start end pre-change-length)
582 ;; Work around bug in insert-file-contents. 582 ;; Work around bug in insert-file-contents.