Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Specific Indentation request for perl in Emacs

by Yoyoson (Novice)
on Aug 18, 2004 at 15:09 UTC ( [id://383989]=note: print w/replies, xml ) Need Help??


in reply to Re: Specific Indentation request for perl in Emacs
in thread Specific Indentation request for perl in Emacs

pdcawley,

I truly appreciate your reply, this is the closest I've been to solving this issue so far. Unfortunately, I'm having trouble getting it to work.
By default, my emacs uses perl-mode when I open a perl file or module. So I know how to switch into cperl-mode after I've started the buffer (M-x cperl-mode) and I know how to put the (setq ... ) line in my .emacs, except I'm wondering if I also need to start up cperl-mode automatically from within my .emacs to get this to work.

As for your advice against using this, I can definitely see the logic in your argument, the only thing is that this particular indentation nuance is a part of my workplace's official coding standard.

I guess my question then, is, how can I get cperl-mode to start up automatically in my .emacs, or how can I set that toggle-setting after I've started the buffer?

Thanks!!
  • Comment on Re^2: Specific Indentation request for perl in Emacs

Replies are listed 'Best First'.
Re^3: Specific Indentation request for perl in Emacs
by Yoyoson (Novice) on Aug 18, 2004 at 15:40 UTC
    Okay, I managed to get cperl-mode starting up automatically on my own - but the dang thing still doesn't work. I also found the variable cperl-indent-parens-as-block inside of my cperl-mode.el (it's version 4.32) so I don't think that's the issue here. I'm not sure what it could be.
      pdcawley's solution worked for me under xemacs... you do know that GNU emacs has both cperl-mode and perl-mode?

      What is the value of auto-mode-alist? You may be going into perl-mode instead of cperl-mode. Here's sample line that puts me in cperl-mode when opening a test file:

      (add-to-list 'auto-mode-alist '("\\.t$" . cperl-mode)) (setq cperl-indent-parens-as-block t)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://383989]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 04:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found