emacs-devel
[Top][All Lists]
Advanced

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

Change major mode for nxml-mode


From: Lennart Borgman
Subject: Change major mode for nxml-mode
Date: Thu, 1 Jan 2009 03:45:27 +0100

I have had this comment for long in nXhtml and nearly forgot about it.
Does someone know if this is fixed (in some way) now?

;; 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
    (save-restriction
      (widen)
      (rng-validate-mode -1)
      (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]