From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: perl mode Date: Thu, 03 Oct 2013 22:46:06 -0400 Message-ID: References: <20131001160943.GA22473@messier31> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1380854793 23111 80.91.229.3 (4 Oct 2013 02:46:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Oct 2013 02:46:33 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Philippe Delavalade Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 04 04:46:35 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VRvPX-0008Ch-7Z for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Oct 2013 04:46:35 +0200 Original-Received: from localhost ([::1]:46034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRvPW-0006Zw-Ol for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Oct 2013 22:46:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRvPF-0006Zk-Aq for help-gnu-emacs@gnu.org; Thu, 03 Oct 2013 22:46:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRvP7-0003wT-W9 for help-gnu-emacs@gnu.org; Thu, 03 Oct 2013 22:46:17 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:4333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRvP7-0003wL-Rn for help-gnu-emacs@gnu.org; Thu, 03 Oct 2013 22:46:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFLd/fx/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFLd/fx/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="34722953" Original-Received: from 75-119-247-241.dsl.teksavvy.com (HELO pastel.home) ([75.119.247.241]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Oct 2013 22:42:42 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 1C65460281; Thu, 3 Oct 2013 22:46:06 -0400 (EDT) In-Reply-To: <20131001160943.GA22473@messier31> (Philippe Delavalade's message of "Tue, 1 Oct 2013 18:09:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93825 Archived-At: > #!/usr/bin/perl -w > use strict; > $\ = "\n"; > my $txt = 'Hello World !'; > main > { > if(1) > { > ($txt =~ m/Hello /) && (print "$'"); > } > print "Bye"; > } > exit(0); > If I run the "indent-region" command (after having marked the whole > script", identation is not correct. As far as I can tell, the only problem is that perl-mode doesn't like to start from a file with no indentation at all. Check `perl-nochange', which is a regexp that specifies lines that auto-indentation should not change. This includes all lines that start with ( or { or [. Stefan