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: Oleksandr Gavenko
Subject: Re: How can I enable minor mode, always?
Date: Thu, 28 Oct 2010 11:57:25 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

On 27.10.2010 19:07, PJ Weisberg wrote:
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.
I dislike this behavior so wrote:

;; See also 'mode-require-final-newline'.
(add-hook 'text-mode-hook (lambda () (setq require-final-newline nil)))





reply via email to

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