unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* cperl printf indentation
@ 2003-09-12 16:52 Dan Jacobson
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Jacobson @ 2003-09-12 16:52 UTC (permalink / raw)


Should hitting tab on each line in cperl mode really indent like this?:
    printf "%.1f\t%.1f\t%s\n",
      $F[0] - $C - $A * $F[0] - $B * $F[1],
	$F[1] + $D - $A * $F[1] - $B * $F[0],
	  "@F";

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

* Re: cperl printf indentation
       [not found] <Pine.LNX.4.44.0309130245060.10051-100000@salmon.pepperfish.net>
@ 2003-09-13  4:47 ` Dan Jacobson
  2003-09-14 20:54   ` Vivek
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Jacobson @ 2003-09-13  4:47 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Vivek> No, it should do something like this:

Vivek> printf "%.1f\t%.1f\t%s\n",
Vivek>   $F[0] - $C - $A * $F[0] - $B * $F[1],
Vivek>   $F[1] + $D - $A * $F[1] - $B * $F[0],
Vivek>   "@F";

Well, there must be something else at work in
http://jidanni.org/geo/taiwan_datums/programs/twd6797thl
when you hit TAB on those lines.

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

* Re: cperl printf indentation
  2003-09-13  4:47 ` Dan Jacobson
@ 2003-09-14 20:54   ` Vivek
  2003-09-14 23:53     ` Dan Jacobson
  0 siblings, 1 reply; 5+ messages in thread
From: Vivek @ 2003-09-14 20:54 UTC (permalink / raw)
  Cc: bug-gnu-emacs

On Sat, 13 Sep 2003, Dan Jacobson wrote:

> Vivek> No, it should do something like this:
>
> Vivek> printf "%.1f\t%.1f\t%s\n",
> Vivek>   $F[0] - $C - $A * $F[0] - $B * $F[1],
> Vivek>   $F[1] + $D - $A * $F[1] - $B * $F[0],
> Vivek>   "@F";
>
> Well, there must be something else at work in
> http://jidanni.org/geo/taiwan_datums/programs/twd6797thl
> when you hit TAB on those lines.

Yes, probably - which emacs, cperl-mode file, and with what
settings in your .emacs are you using?

( Also note: if you load perl-mode after loading cperl-mode,
  it pretty much destroys cperl-mode's ability to function:
  to avoid this, I generally have (defalias 'perl-mode 'cperl-mode)
  in my .emacs )

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

* Re: cperl printf indentation
  2003-09-14 20:54   ` Vivek
@ 2003-09-14 23:53     ` Dan Jacobson
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Jacobson @ 2003-09-14 23:53 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Vivek> which emacs, cperl-mode file, and with what settings in your
Vivek> .emacs are you using?

cperl-version's value is "4.23"
# dlocate cperl-mode
emacs21-common: /usr/share/emacs/21.3/lisp/progmodes/cperl-mode.elc
# apt-cache policy emacs21-common
  Installed: 21.3-2

Vivek> ( Also note: if you load perl-mode after loading cperl-mode,
Vivek>   it pretty much destroys cperl-mode's ability to function:
Vivek>   to avoid this, I generally have (defalias 'perl-mode 'cperl-mode)
Vivek>   in my .emacs )

In http://jidanni.org/comp/emacs.txt I use fset. Should I use defalias instead?

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

* Re: cperl printf indentation
       [not found] <Pine.LNX.4.44.0309170100240.20010-100000@salmon.pepperfish.net>
@ 2003-09-18  3:25 ` Dan Jacobson
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Jacobson @ 2003-09-18  3:25 UTC (permalink / raw)
  Cc: ilya, bug-gnu-emacs

> Wait, please try hitting TABs on each line in this in emacs -q:
> #-*-cperl-*-
> while (<>) {
>   printf "%.1f %.1f @f\n",
>     $f[0] + $c + $a * $f[0] + $b * $f[1],
>       $f[1] + $d + $a * $f[1] + $b * $f[0];
> }
> printf "%.1f %.1f @f\n",
>   $f[0] + $c + $a * $f[0] + $b * $f[1],
>   $f[1] + $d + $a * $f[1] + $b * $f[0];

V> Ok, there I get the same as you - it's never an issue for me, though
V> because I always put the brackets in around function parameters.

OK, bug has been found. I will CC those concerned.

>> So, it seems that being in the "while" is messing things up!

V> Brackets are your friends, Punctuation is good :)

(I think you mean you want me to use printf() instead of printf.)

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

end of thread, other threads:[~2003-09-18  3:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.44.0309170100240.20010-100000@salmon.pepperfish.net>
2003-09-18  3:25 ` cperl printf indentation Dan Jacobson
     [not found] <Pine.LNX.4.44.0309130245060.10051-100000@salmon.pepperfish.net>
2003-09-13  4:47 ` Dan Jacobson
2003-09-14 20:54   ` Vivek
2003-09-14 23:53     ` Dan Jacobson
2003-09-12 16:52 Dan Jacobson

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).