[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cperl-mode and abbrevs
From: |
Harry Putnam |
Subject: |
cperl-mode and abbrevs |
Date: |
Wed, 02 Jul 2003 08:11:35 -0700 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
Having trouble getting abbrevs to turn on by default in cperl-mode
I have this in .emacs:
(setq default-abbrev-mode t)
(read-abbrev-file)
And abbrevs are turned on in the other language modes I use.
sh bash ksh c perl
It may have something to do with the way I've forced cperl-mode on
perl files. Maybe this isn't the way to do it.
(setq auto-mode-alist
(cons '("\\.\\([pP]\\([Llm]\\|erl\\)\\|al\\)\\'" \
. cperl-mode ) auto-mode-alist))
(setq interpreter-mode-alist
(cons '("perl" . cperl-mode)
interpreter-mode-alist))
Can anyone tell what I need to do to turn on abbrevs when cperl-mode
comes up?
I tried hacking up a hook but don't realy know how to write one.
(defun hp-cperl-mode-hook()
"Turns on abbrev mode in cperl mode"
(setq default-abbrev-mode t)
(read-abbrev-file))
(add-hook 'cperl-mode-hook 'hp-cperl-mode-hook)
This is now commented out since it didn't improve things at all.
- cperl-mode and abbrevs,
Harry Putnam <=