unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: PJ Weisberg <pj@irregularexpressions.net>
To: paxxus <paxxus@hotmail.com>
Cc: Help-gnu-emacs@gnu.org
Subject: Re: How can I enable minor mode, always?
Date: Wed, 27 Oct 2010 16:07:55 +0000	[thread overview]
Message-ID: <AANLkTimzoi7gZZxBSOKPpwcGt=UHt=ve5ZG21QmYYHs+@mail.gmail.com> (raw)
In-Reply-To: <30062842.post@talk.nabble.com>

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.



  parent reply	other threads:[~2010-10-27 16:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 19:46 How can I enable minor mode, always? paxxus
2010-10-23 10:57 ` PJ Weisberg
2010-10-23 15:15   ` Drew Adams
2010-10-26 23:49 ` paxxus
2010-10-27  6:43   ` Oleksandr Gavenko
2010-10-27 16:07   ` PJ Weisberg [this message]
2010-10-28  8:57     ` Oleksandr Gavenko
     [not found] <mailman.3.1287810110.20231.help-gnu-emacs@gnu.org>
2010-10-29 18:20 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTimzoi7gZZxBSOKPpwcGt=UHt=ve5ZG21QmYYHs+@mail.gmail.com' \
    --to=pj@irregularexpressions.net \
    --cc=Help-gnu-emacs@gnu.org \
    --cc=paxxus@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).