unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Change major mode for nxml-mode
@ 2009-01-01  2:45 Lennart Borgman
  2009-01-01  2:55 ` Jason Rumney
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman @ 2009-01-01  2:45 UTC (permalink / raw)
  To: Emacs Devel

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)))))




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Change major mode for nxml-mode
  2009-01-01  2:45 Change major mode for nxml-mode Lennart Borgman
@ 2009-01-01  2:55 ` Jason Rumney
  2009-01-01  2:57   ` Lennart Borgman
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Rumney @ 2009-01-01  2:55 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: Emacs Devel

Lennart Borgman wrote:
> 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?
>   

2008-04-09  Lennart Borgman  <lennart.borgman@gmail.com>

    * nxml/nxml-mode.el (nxml-cleanup): New function.
    (nxml-mode): Add it to change-major-mode-hook.






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Change major mode for nxml-mode
  2009-01-01  2:55 ` Jason Rumney
@ 2009-01-01  2:57   ` Lennart Borgman
  0 siblings, 0 replies; 3+ messages in thread
From: Lennart Borgman @ 2009-01-01  2:57 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Emacs Devel

On Thu, Jan 1, 2009 at 3:55 AM, Jason Rumney <jasonr@gnu.org> wrote:
> Lennart Borgman wrote:
>>
>> 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?
>>
>
> 2008-04-09  Lennart Borgman  <lennart.borgman@gmail.com>
>
>   * nxml/nxml-mode.el (nxml-cleanup): New function.
>   (nxml-mode): Add it to change-major-mode-hook.

Ehum, thanks. Sorry.

Now I remember why I kept this function. For Emacs 22 users. Maybe I
will learn to put a note on such things. ;-)




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-01  2:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-01  2:45 Change major mode for nxml-mode Lennart Borgman
2009-01-01  2:55 ` Jason Rumney
2009-01-01  2:57   ` Lennart Borgman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).