all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* spaces before function calls in perl
@ 2008-03-10 22:00 Karl Berry
  2008-03-11  6:38 ` Andreas Röhler
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Berry @ 2008-03-10 22:00 UTC (permalink / raw)
  To: help-gnu-emacs

The standard GNU style is to put spaces before function calls, and
between function arguments, as in:

  foo (1, 2, 3);

Does anyone happen to know of a way to get these spaces inserted
automatically (that is, when typing a "(" or ","), in a perl mode?  I
can imagine some ways to hack it up, but it seemed like it might already
exist.  I just couldn't find it.

Thanks,
Karl




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

* Re: spaces before function calls in perl
  2008-03-10 22:00 spaces before function calls in perl Karl Berry
@ 2008-03-11  6:38 ` Andreas Röhler
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Röhler @ 2008-03-11  6:38 UTC (permalink / raw)
  To: help-gnu-emacs

Am Montag, 10. März 2008 23:00 schrieb Karl Berry:
> The standard GNU style is to put spaces before function calls, and
> between function arguments, as in:
> 
>   foo (1, 2, 3);
> 
> Does anyone happen to know of a way to get these spaces inserted
> automatically (that is, when typing a "(" or ","), in a perl mode?  I
> can imagine some ways to hack it up, but it seemed like it might already
> exist.  I just couldn't find it.
> 
> Thanks,
> Karl
> 
> 
> 

It seems "cperl-mode.el" contains that kind of things:

,----
| (defcustom cperl-electric-lbrace-space nil
|   "*Non-nil (and non-null) means { after $ should be preceded by ` '.
`----

So a hack could start from there.

Andreas Röhler




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

* Re: spaces before function calls in perl
       [not found] <mailman.8676.1205186600.18990.help-gnu-emacs@gnu.org>
@ 2008-03-11 11:49 ` Johan Bockgård
  0 siblings, 0 replies; 3+ messages in thread
From: Johan Bockgård @ 2008-03-11 11:49 UTC (permalink / raw)
  To: help-gnu-emacs

karl@freefriends.org (Karl Berry) writes:

> The standard GNU style is to put spaces before function calls, and
> between function arguments, as in:
>
>   foo (1, 2, 3);
>
> Does anyone happen to know of a way to get these spaces inserted
> automatically (that is, when typing a "(" or ","), in a perl mode?  I
> can imagine some ways to hack it up, but it seemed like it might already
> exist.  I just couldn't find it.

M-( inserts a pair of parenthesis and the space.

-- 
Johan Bockgård


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

end of thread, other threads:[~2008-03-11 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-10 22:00 spaces before function calls in perl Karl Berry
2008-03-11  6:38 ` Andreas Röhler
     [not found] <mailman.8676.1205186600.18990.help-gnu-emacs@gnu.org>
2008-03-11 11:49 ` Johan Bockgård

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.