From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Micah Cowan Newsgroups: gmane.emacs.help Subject: Re: How can I turn on abbrev mode by default? Date: 19 Oct 2003 01:47:11 -0700 Organization: CalWeb Internet Services, Inc. Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <1066347864.4501.19.camel@syr-24-59-77-252.twcny.rr.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1066553164 27975 80.91.224.253 (19 Oct 2003 08:46:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Oct 2003 08:46:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 19 10:46:02 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AB9CL-0003rw-00 for ; Sun, 19 Oct 2003 10:46:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AB9C4-0004qP-Us for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Oct 2003 04:45:44 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!news-in-sterling.nuthinbutnews.com!newshosting.com!news-xfer2.atl.newshosting.com!posted1.newshosting.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Original-Lines: 44 Original-NNTP-Posting-Host: 0cfb5b43.news.newshosting.com Original-X-Trace: DXC=GKOZ7UaFYLO_ORFg>oo@II7gYX5fdemc@CNUIoho9A_KGhdERAfY; >GY]GNFho7FDHN1A1lZZNYO@ Original-X-Complaints-To: abuse@calweb.com Original-Xref: shelby.stanford.edu gnu.emacs.help:117405 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13336 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13336 jan writes: > Dan Anderson 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