emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nxml-mode does not remove its overlays


From: Lennart Borgman (gmail)
Subject: nxml-mode does not remove its overlays
Date: Sat, 08 Mar 2008 20:22:19 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Could this be added to nxml.el?

;; This should be run in `change-major-mode-hook'."
;; Should be part of nxml.el IMO
(defun nxml-change-mode ()
  ;; Remove overlays used by nxml-mode.
  (save-excursion
    (unless (and (= (point-min) 1)
                 (= (point-max) (1+ (buffer-size))))
      (widen))
    (rng-validate-mode 0)
    (let ((inhibit-read-only t)
          (buffer-undo-list t)
          (modified (buffer-modified-p)))
      (nxml-with-invisible-motion
        (remove-text-properties (point-min) (point-max) '(face nil)))
      (set-buffer-modified-p modified))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]