all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* invoke cper-mode instead of perl-mode
@ 2003-07-01  1:07 Harry Putnam
  2003-07-01  3:02 ` Harry Putnam
  0 siblings, 1 reply; 2+ messages in thread
From: Harry Putnam @ 2003-07-01  1:07 UTC (permalink / raw)


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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: invoke cper-mode instead of perl-mode
  2003-07-01  1:07 invoke cper-mode instead of perl-mode Harry Putnam
@ 2003-07-01  3:02 ` Harry Putnam
  0 siblings, 0 replies; 2+ messages in thread
From: Harry Putnam @ 2003-07-01  3:02 UTC (permalink / raw)


Harry Putnam <reader@newsguy.com> writes:

> 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.

Ahaa, got the right one now interpreter-mode-alist.  And it is in the
section about modes.

>
> 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)

Still not getting abbrev-mode turned on when opening a perl script.
All other language modes seems to come up with abbrev-mode turned on.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-01  3:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-01  1:07 invoke cper-mode instead of perl-mode Harry Putnam
2003-07-01  3:02 ` Harry Putnam

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.