unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Micah Cowan <micah@cowan.name>
Subject: Re: How can I turn on abbrev mode by default?
Date: 19 Oct 2003 01:47:11 -0700	[thread overview]
Message-ID: <m3r819wr5c.fsf@localhost.localdomain> (raw)
In-Reply-To: mailman.1914.1066445255.21628.help-gnu-emacs@gnu.org

jan <janmar@iprimus.com.au> writes:

> Dan Anderson <dan@mathjunkies.com> writes:
> 
> > > Go to the customization for cperl-mode-hook by doing:
> > > 
> > >   M-x customize-option RET cperl-mode-hook
> > > 
> > > Then click on INS and type into the field:
> > > 
> > >   abbrev-mode
> > 
> > When I do that it tells me "No match".  CPerlmode is installed in my
> > .emacs.d/lisp directory.  Could this be the problem?
> 
> Another approach is to just add this to your .emacs file.
> 
> (add-hook 'hack-local-variables-hook
> 	  #'(lambda ()
> 	      (when (eq major-mode 'cperl-mode)
> 		(abbrev-mode 1))))

It seems more appropriate to do

  (add-hook 'cperl-mode-hook 'abbrev-mode)

or maybe

  (add-hook 'cperl-mode-hook #'(lambda () (abbrev-mode 1)))

> 
> But why not turn it on all the time. Abbrevs are mode sensitive
> anyway. It's even simpler too.
> 
> (add-hook 'hack-local-variables-hook
> 	  #'(lambda () (abbrev-mode 1)))

If that's truly what you want... This seems too much like a
shotgun-approach to me, tho': if you find yourself using it in
most of your modes, then maybe having an alist of modes to
either enable or disable it in might be slightly better...

Just my 2¢
-Micah

  parent reply	other threads:[~2003-10-19  8:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1828.1066331526.21628.help-gnu-emacs@gnu.org>
2003-10-16 21:31 ` How can I turn on abbrev mode by default? Micah Cowan
2003-10-16 23:44   ` Dan Anderson
2003-10-18 19:57     ` jan
     [not found]     ` <mailman.1914.1066445255.21628.help-gnu-emacs@gnu.org>
2003-10-19  8:47       ` Micah Cowan [this message]
     [not found]   ` <mailman.1838.1066347910.21628.help-gnu-emacs@gnu.org>
2003-10-17  7:18     ` Micah Cowan
2003-10-16 19:11 Dan Anderson

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=m3r819wr5c.fsf@localhost.localdomain \
    --to=micah@cowan.name \
    /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).