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

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

Re: problem getting hooks to be active


From: Kai Großjohann
Subject: Re: problem getting hooks to be active
Date: Fri, 15 Aug 2003 14:59:33 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

pemente@northpark.edu (Eric Pement) writes:

>    (add-hook 'sgml-mode-hook'
>         (lambda ()
>           (setq tab-width 2)

Do you know what tab-width does?  I'm guessing that the code is doing
what you tell it to, but it's not what you expect.

If the file contains literal tab characters, then the above line will
change how they are shown on screen.  It has absolutely (well,
almost) nothing to do with the TAB key.

>           (setq indent-tabs-mode nil)

Hm.  Well, do you have tab characters in your files?

>         (setq fill-column 85)

How do you know it is not taking effect?  What happens when you hit M-q?

>    ))

A completely wild speculation is that you actually want to set
sgml-indent-data to t to make it indent more often.  Then you want to
set sgml-indent-step to 2 (which is the default, afaik).

And for filling, maybe you want to turn on auto-fill mode?

Does this help?

If it doesn't, please explain in more detail what is happening.  For
example, show us an XML file, then describe which keys you press at
which location, and then show us the result you get and the result
you want to get instead.
-- 
Two cafe au lait please, but without milk.


reply via email to

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