help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: enabling auto fill mode for XML documents


From: August
Subject: Re: enabling auto fill mode for XML documents
Date: Mon, 31 Jan 2005 14:05:19 +0100

On sön, 2005-01-30 at 20:28 +0100, Wolfgang Jeltsch wrote:
> Hello,
> 
> I want the auto fill minor mode to be automatically enabled for all buffers 
> using the nXML major mode.  Alas, all previous attempts and tipps to realize 
> this (like putting turn-on-auto-fill-mode in an nXML hook) didn't work.  What 
> is a good way to achieve what I want?
> 
> Best wishes,
> Wolfgang
> 
> 
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Just tried out the nXML major mode and for me it works fine with 
`(auto-fill-mode 1)' in the mode hook. I have the following lines in
my .emacs init file:

(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/nxml-
mode-20041004")
(load "rng-auto.el")
(defun my-nxml-mode-hook ()
  (auto-fill-mode 1))
(add-hook 'nxml-mode-hook 'my-nxml-mode-hook)

Also consider refill-mode as it refills the paragraph even when you
insert/delete words in the middle of it. If you want to use it, change
the mode hook to:

(defun my-nxml-mode-hook ()
  (refill-mode 1))

-- 
August




reply via email to

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