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

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

Re: How can I enable minor mode, always?


From: PJ Weisberg
Subject: Re: How can I enable minor mode, always?
Date: Wed, 27 Oct 2010 16:07:55 +0000

On Tue, Oct 26, 2010 at 11:49 PM, paxxus <paxxus@hotmail.com> wrote:
>
> Thanks for the suggestions.
>
> I used fundamental-mode, always. It turns out that you can't add hooks to
> that mode, so I changed my default mode to text-mode, and then added this
> hook:
>
> (add-hook 'text-mode-hook (lambda () (interactive) (highlight-80+-mode 1)))
>
> The define-globalized-minor-mode also looks interesting, I'll try that out.
>
> I have now worked a couple of days in text-mode instead of fundamental-mode,
> and I can't detect any difference at all (which is good for what I want). Is
> there a difference other than the hook stuff?

It looks like the most noticeable difference between text-mode and
fundamental-mode is that by default text-mode puts a newline at the
end of the file when you save if there isn't one already.  It's the
simplest mode other than fundamental, after all.

And I would argue that after-change-major-mode-hook *is*
fundamental-mode's equivalent of text-mode-hook, since all major modes
are supposedly derived from fundamental-mode and those are the hooks
that get run when you switch into any mode.



reply via email to

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