From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: Re: Indentations, PERL Date: Wed, 27 Jun 2007 10:00:36 +0200 Message-ID: <46821924.2070608@gmx.at> References: <4681F9E8.7070502@comcast.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1182932760 20474 80.91.229.12 (27 Jun 2007 08:26:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2007 08:26:00 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: =?UTF-8?B?0JDQu9C10LrRgdCw0L3QtNGAINCf0L7Qu9GP0LrQvtCy?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 27 10:25:57 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I3SqZ-0005xj-PT for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jun 2007 10:25:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3SqZ-00072U-A1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jun 2007 04:25:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I3SqX-00072N-6n for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 04:25:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I3SqW-000727-HA for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 04:25:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3SqW-000724-E0 for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 04:25:52 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1I3SqV-0003Ab-TP for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 04:25:52 -0400 Original-Received: (qmail invoked by alias); 27 Jun 2007 07:59:10 -0000 Original-Received: from N846P019.adsl.highway.telekom.at (EHLO [62.47.49.179]) [62.47.49.179] by mail.gmx.net (mp049) with SMTP; 27 Jun 2007 09:59:10 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/MA3JkhfnMJy8FMbxxJPKjeFoS8gOwfpUMGQmfsX sZg6YYtmtWD4PW User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <4681F9E8.7070502@comcast.net> X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16008 Archived-At: > What I think is the bug, is a problem with automatic indentations when I > type PERL programs. Let me get right to the point and I'll paste first > the code how it is automatically indented: > > sub insert_sub { > return unless (save_slide()); > my $after = 0; > > prompt(0, 'New Subtitle', "Would you like to " . > "insert the new subtitle\n" . > Next, is how I believe would be a proper way to indent the same code: > > sub insert_sub { > return unless (save_slide()); > my $after = 0; > > prompt(0, 'New Subtitle', "Would you like to " . > "insert the new subtitle\n" . > "before the current one or after?", > [{GTK_ID => 'gtk-cancel', > LABEL => 'Cancel', > ALIGN => 'right', > SUB => sub { $after = -1;}}, > {GTK_ID => 'gtk-go-back', > LABEL => 'Before', > ALIGN => 'left', > SUB => sub {$after = 0;}}, > {GTK_ID => 'gtk-go-forward', > LABEL => 'After', > ALIGN => 'right', > SUB => sub {$after = 1}}, > ]); > > if ($after == 0) { > insert_before($srt_idx); > } elsif ($after == 1) { > insert_before($srt_idx + 1); > } > } > > (Somehow the exact spacing differ here, but I think you can see the > difference in general.) > > Basically after I enter "{... SUB => sub {}}," the indentation screws > up. I hope this makes sense. > > Thanks, > Alex. > > > _______________________________________________ > bug-gnu-emacs mailing list > bug-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs >