unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Steve Bickerton <bick@physics.mcmaster.ca>
Subject: printf formatting in Perl
Date: Fri, 08 Sep 2006 15:51:19 -0400	[thread overview]
Message-ID: <edshjp$484$1@informer1.cis.mcmaster.ca> (raw)

Hi All,

	I'm afraid I'm being a bit picky here, but I'd like to find a way to 
change the indentation used by emacs for the printf command in a Perl 
script.  When I use a printf statement which is longer than the line 
length, I'd prefer to put it on several lines, but subsequent lines 
don't come out indented with respect to the printf.

An example:

Example 1 (doesn't indent subsequent lines):

     printf STDOUT "This string fills a lot of the line: %.3f %.3f\n",
     $var1, $var2;


I've found a work-around by concatenating part of the string onto the 
subsequent line, like this:

Example 2 (does indent subsequent lines):

     printf STDOUT "This string fills a lot of the line: %.3f %.3f".
	"\n", $var1, $var2;


The indentation in example 2 is what I'm looking for, but without 
needing to concatenate.  Suggestions?

regards,
steve

                 reply	other threads:[~2006-09-08 19:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='edshjp$484$1@informer1.cis.mcmaster.ca' \
    --to=bick@physics.mcmaster.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).