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

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

Re: auto-indent


From: Michael P. Soulier
Subject: Re: auto-indent
Date: 18 Nov 2002 17:44:52 GMT
User-agent: slrn/0.9.7.4 (Linux)

On 16 Nov 2002 02:51:37 GMT, Michael P. Soulier <msoulier@storm.ca._nospam>
wrote:
>     Hey people. How would I modify auto-fill mode so that it works the same
> way as auto-indent in Vi? All I want it to do is, when it wraps the line,
> indent to the same position as the previous line. 

    Ok, I'm trying to do this by rebinding the return key. This is for
sgml-mode, where I'm doing it like so:

(defun my-sgml-mode-hook ()
  "My personal sgml mode customizations."
  (setq sgml-indent-step nil)
  (setq sgml-indent-data nil)
  (define-key sgml-mode-map [RET]
    '(lambda ()
       (newline)
       (indent-relative)))
  )

    This apparently shows up in the sgml-mode-map, but when I go into an xml
file in sgml-mode (with help from xxml-mode), and do a C-h k RET, it says that
the key is still bound to newline. How can that be? Why isn't this working?

    Thanks,
    Mike

-- 
Michael P. Soulier <msoulier@storm.ca>, GnuPG pub key: 5BC8BE08
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix
HTML Email Considered Harmful: http://expita.com/nomime.html


reply via email to

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