From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Kamphausen Newsgroups: gmane.emacs.help Subject: CPerl Indentation after subs with print in their names Date: Thu, 22 Nov 2007 17:43:06 +0100 Organization: Church of Emacs Message-ID: <85zlx6qlid.fsf@usenet.my.skamphausen.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1195753249 29734 80.91.229.12 (22 Nov 2007 17:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Nov 2007 17:40:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 22 18:40:54 2007 Return-path: Envelope-to: geh-help-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 1IvG2h-0000NJ-OX for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Nov 2007 18:40:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvG2T-0005jJ-Fp for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Nov 2007 12:40:33 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newsfeed.freenet.de!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 52 Original-X-Trace: news.albasani.net yXgbrN9ma7E9aJfjfRr2vcii2gse8/1/8bGbFBDTIOy88CATLxyVsmxG6xz73oP98tpmuo9R/t4rt2fOaKSVUzHaD1IsYOLUdGS9zB1ws8VHrHQWeWFceIkrREKgZrrR Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Thu, 22 Nov 2007 16:43:06 +0000 (UTC) X-User-ID: d3QjuTWd6kfRVz3rMNdwDR6JfTh1QYOs7ZCl4+HiHsU= Cancel-Lock: sha1:1hPpqF3Fdqp9XTDKjb3t6lrPOpw= sha1:yPsKUuDGTE8pRNEF/qsynL0mGKc= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-NNTP-Posting-Host: hJFZleITCejgIq9hQEg7J0WEJzzeRUj5xB6pVwaxsMU= Original-Xref: shelby.stanford.edu gnu.emacs.help:153978 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49410 Archived-At: Hi, today I came across a subtle mis-indentation in Perl-code. Assume a file like this: ---------------------------------------------------------------------- #! /usr/bin/perl use strict; use warnings; sub anything { print "OK\n"; } # here indentation is OK sub print_something { print "Something\n"; } # but here not ?? ---------------------------------------------------------------------- If I remove the "print_" from the the name of the subroutine everything indents correctly. I tried a few other special words from the Perl language: Function Indentation printf wrong while OK sprintf OK substr OK open OK This happens with: Gnu Emacs 22.1.1, cperl-version 5.22. Steps to reproduce: shell> emacs -q test.pl emacs> M-x cperl-mode emacs> M-x goto-line 12 ;; the line # but here not ?? emacs> TAB Is this a bug or some stupidity on my part? Regards, Stefan -- Stefan Kamphausen --- http://www.skamphausen.de a blessed +42 regexp of confusion (weapon in hand) You hit. The format string crumbles and turns to dust.