in reply to Emacs CPerl mode electric parentheses: get extra space in there?

Use the source! A brief spelunk through cperl-mode.el leads me to think you could override cperl-electric-paren and add in some spaces. If you're an Emacs Lisp noob, may I suggest you pick up a copy of the Writing GNU Extensions for Emacs book (ignore the pirates at the top of that search result!). It's well worth the time to learn how to extend your favorite editor.

-sam

  • Comment on Re: Emacs CPerl mode electric parentheses: get extra space in there?

Replies are listed 'Best First'.
Re^2: Emacs CPerl mode electric parentheses: get extra space in there?
by Anonymous Monk on Jul 01, 2008 at 19:11 UTC

    Thanks for the running start, Sam. Guess I'm gonna have to finally bite the bullet and dive into learning elisp (it's been on the TODO list for a while anyway). As an aside though, interesting that there doesn't seem to be an easy "(setq cperl-gimme-more-space t)" way of setting it. I'd have guessed that many programmers would prefer the extra space.

      Good luck. I personally don't use any of the electric stuff in cperl-mode. I don't bother formatting my code as I type anymore, I just run it all through Perl::Tidy at the end.

      -sam

        Ugh, you slob! I'll bet you've got corn chip crumbs in your couch cushions too! ;)