all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* cperl indentation question
@ 2013-05-06 20:48 mgwmgw
  2013-05-07 14:12 ` Mary-Anne Wolf
  2013-05-07 15:39 ` Dmitry Gutov
  0 siblings, 2 replies; 6+ messages in thread
From: mgwmgw @ 2013-05-06 20:48 UTC (permalink / raw)
  To: Help-gnu-emacs

I have been using emacs since the 1980's,
and I am doing perl development using cperl mode.
The coding style rules where I work require that lines of source are less
than 80 characters wide.
Also, if I have a perl command like this
my $variable = "very long string"
.  " another very long string";
The continuation "." should line up under the double quote at the beginning
of the first line.
If I have a function/sub call
function("very long string"
            . " another very long string");
this lines up just fine,
but I have not figured out how to line this up without parens.
Any ideas?





--
View this message in context: http://emacs.1067599.n5.nabble.com/cperl-indentation-question-tp285311.html
Sent from the Emacs - Help mailing list archive at Nabble.com.



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

* Re: cperl indentation question
  2013-05-06 20:48 cperl indentation question mgwmgw
@ 2013-05-07 14:12 ` Mary-Anne Wolf
  2013-05-07 15:57   ` Andreas Röhler
  2013-05-07 15:39 ` Dmitry Gutov
  1 sibling, 1 reply; 6+ messages in thread
From: Mary-Anne Wolf @ 2013-05-07 14:12 UTC (permalink / raw)
  To: Help-gnu-emacs

I mean lining things up by hitting tab
and letting emacs work out the indentation,
in case I did not make that clear.




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

* Re: cperl indentation question
  2013-05-06 20:48 cperl indentation question mgwmgw
  2013-05-07 14:12 ` Mary-Anne Wolf
@ 2013-05-07 15:39 ` Dmitry Gutov
  1 sibling, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2013-05-07 15:39 UTC (permalink / raw)
  To: mgwmgw; +Cc: Help-gnu-emacs

mgwmgw <mgwmgw@comcast.net> writes:

> I have been using emacs since the 1980's,
> and I am doing perl development using cperl mode.
> The coding style rules where I work require that lines of source are less
> than 80 characters wide.
> Also, if I have a perl command like this
> my $variable = "very long string"
> .  " another very long string";
> The continuation "." should line up under the double quote at the beginning
> of the first line.
> If I have a function/sub call
> function("very long string"
>             . " another very long string");
> this lines up just fine,
> but I have not figured out how to line this up without parens.
> Any ideas?

I'd venture an guess that there's no such option.

You can request it via `M-x report-emacs-bug'.



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

* Re: cperl indentation question
  2013-05-07 14:12 ` Mary-Anne Wolf
@ 2013-05-07 15:57   ` Andreas Röhler
  2013-05-09 11:57     ` Luca Ferrari
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Röhler @ 2013-05-07 15:57 UTC (permalink / raw)
  To: help-gnu-emacs

Am 07.05.2013 16:12, schrieb Mary-Anne Wolf:
> I mean lining things up by hitting tab
> and letting emacs work out the indentation,
> in case I did not make that clear.
>
>
>

Hi Mary-Anne,

had a look into, as delt with indents in python-mode. However, seems a non-trivial task to tweak the mode itself.
May a command help you which call manually at this occasion? Something like:

If previous line is an assignement, indent to beginning of RHS. Otherwise indent to the beginning of previous line.
Interested?

Best,

Andreas



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

* Re: cperl indentation question
  2013-05-07 15:57   ` Andreas Röhler
@ 2013-05-09 11:57     ` Luca Ferrari
  2013-05-09 15:43       ` Andreas Röhler
  0 siblings, 1 reply; 6+ messages in thread
From: Luca Ferrari @ 2013-05-09 11:57 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, May 7, 2013 at 5:57 PM, Andreas Röhler
<andreas.roehler@easy-emacs.de> wrote:
> Am 07.05.2013 16:12, schrieb Mary-Anne Wolf:
>
>> I mean lining things up by hitting tab
>> and letting emacs work out the indentation,
>> in case I did not make that clear.
>>
>>

Does not sound simple to me and, as far as I know, should not even be
the right way of line up. However, it seems to me that a lot of other
IDEs do not follow your rule too.


Luca



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

* Re: cperl indentation question
  2013-05-09 11:57     ` Luca Ferrari
@ 2013-05-09 15:43       ` Andreas Röhler
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Röhler @ 2013-05-09 15:43 UTC (permalink / raw)
  To: help-gnu-emacs

Am 09.05.2013 13:57, schrieb Luca Ferrari:
> On Tue, May 7, 2013 at 5:57 PM, Andreas Röhler
> <andreas.roehler@easy-emacs.de> wrote:
>> Am 07.05.2013 16:12, schrieb Mary-Anne Wolf:
>>
>>> I mean lining things up by hitting tab
>>> and letting emacs work out the indentation,
>>> in case I did not make that clear.
>>>
>>>
>
> Does not sound simple to me and, as far as I know, should not even be
> the right way of line up. However, it seems to me that a lot of other
> IDEs do not follow your rule too.
>
>
> Luca
>
>

This rules are not mine, but that request by OP, writing:

"The coding style rules where I work"



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

end of thread, other threads:[~2013-05-09 15:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-06 20:48 cperl indentation question mgwmgw
2013-05-07 14:12 ` Mary-Anne Wolf
2013-05-07 15:57   ` Andreas Röhler
2013-05-09 11:57     ` Luca Ferrari
2013-05-09 15:43       ` Andreas Röhler
2013-05-07 15:39 ` Dmitry Gutov

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.