From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.help Subject: invoke cper-mode instead of perl-mode Date: Mon, 30 Jun 2003 18:07:47 -0700 Organization: Still searching... Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1057021860 31086 80.91.224.249 (1 Jul 2003 01:11:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 1 Jul 2003 01:11:00 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 01 03:10:58 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19X9fd-000853-00 for ; Tue, 01 Jul 2003 03:10:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19X9eX-0007KL-At for gnu-help-gnu-emacs@m.gmane.org; Mon, 30 Jun 2003 21:09:49 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19X9dF-0005s3-BH for help-gnu-emacs@gnu.org; Mon, 30 Jun 2003 21:08:29 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19X9d3-0005iR-SW for help-gnu-emacs@gnu.org; Mon, 30 Jun 2003 21:08:19 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19X9cc-0005dO-45 for help-gnu-emacs@gnu.org; Mon, 30 Jun 2003 21:07:50 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19X9c9-0007rd-00 for ; Tue, 01 Jul 2003 03:07:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19X9c8-0007rR-00 for ; Tue, 01 Jul 2003 03:07:20 +0200 Original-Lines: 22 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:CIo0WSQGOVgevaadSUCRqJEyEEM= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:11358 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11358 There must be more to do than add to auto-mode-alist, to get emacs to open perl scripts in cperl mode. I have this in .emacs: (wrapped for mail) (setq auto-mode-alist (cons '("\\.\\([pP]\\([Llm]\\|erl\\)\\|al\\)\\'" . cperl-mode ) auto-mode-alist)) Which does work on any files matching the regex, but still, files with no extension but are still perl scripts with the perl shebang get opened in perl-mode instead of cperl-mode. I don't see this explained under `How Major Modes are Chosen' or `Major Modes' in the manual so apparently it is another variable that does this. A further problem is that files that emacs knows how to open get opened with abbrev-mode enabled. But the ones openned in cperl-mode do not have abbrev-mode enabled. I have these in .emacs: (setq default-abbrev-mode t) (read-abbrev-file)