From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#11118: Patch Date: Thu, 29 Mar 2012 23:34:50 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1333078546 13540 80.91.229.3 (30 Mar 2012 03:35:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Mar 2012 03:35:46 +0000 (UTC) Cc: 11118@debbugs.gnu.org To: Peter Oliver Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 30 05:35:45 2012 Return-path: Envelope-to: geb-bug-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 1SDScq-0003gl-NV for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Mar 2012 05:35:44 +0200 Original-Received: from localhost ([::1]:38417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDScp-0006U7-MD for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Mar 2012 23:35:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDScm-0006Tx-DR for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2012 23:35:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDSck-0008Hg-EV for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2012 23:35:39 -0400 Original-Received: from [140.186.70.43] (port=38886 helo=debbugs.gnu.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDSck-0008HT-At for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2012 23:35:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SDT78-0000j7-AY for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 00:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2012 04:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11118 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11118-submit@debbugs.gnu.org id=B11118.13330804102771 (code B ref 11118); Fri, 30 Mar 2012 04:07:02 +0000 Original-Received: (at 11118) by debbugs.gnu.org; 30 Mar 2012 04:06:50 +0000 Original-Received: from localhost ([127.0.0.1]:45716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDT6v-0000ib-Pm for submit@debbugs.gnu.org; Fri, 30 Mar 2012 00:06:50 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:27501) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDT6T-0000hs-GP; Fri, 30 Mar 2012 00:06:49 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFAKU/KE9MCqRV/2dsb2JhbACBX5x7eacJhhkEmxmECQ X-IronPort-AV: E=Sophos;i="4.73,1,1325480400"; d="scan'208";a="170645505" Original-Received: from 76-10-164-85.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([76.10.164.85]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Mar 2012 23:34:50 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 92470AE14B; Thu, 29 Mar 2012 23:34:50 -0400 (EDT) In-Reply-To: (Peter Oliver's message of "Thu, 29 Mar 2012 19:56:31 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:58309 Archived-At: tags 11118 pending thanks The patch looks very good. We can't install it just now because we're in feature freeze, so we'll keep it for when the trunk opens again for new features. Thank you, Stefan >>>>> "Peter" == Peter Oliver writes: > === modified file 'etc/NEWS' > --- etc/NEWS 2012-03-27 20:24:48 +0000 > +++ etc/NEWS 2012-03-28 21:12:42 +0000 > @@ -784,6 +784,11 @@ > If `nxml-bind-meta-tab-to-complete-flag' is non-nil (the default), > this performs tag completion. > +** Perl mode > + > +*** There is a new option, perl-indent-parens-as-block, which causes > +non-block closing brackets to be aligned with the line of the opening bracket. > + > --- > ** Prolog mode has been completely revamped, with lots of additional > functionality such as more intelligent indentation, electricity, support for > === modified file 'lisp/ChangeLog' > --- lisp/ChangeLog 2012-03-29 14:00:00 +0000 > +++ lisp/ChangeLog 2012-03-29 18:46:19 +0000 > @@ -1,3 +1,9 @@ > +2012-03-28 Peter Oliver > + > + * progmodes/perl-mode.el (perl-indent-parens-as-block): New option > + to align non-block closing brackets with the opening line > + (bug#11118). > + > 2012-03-28 Sam Steingold > * calendar/calendar.el (calendar-exit): Use `quit-windows-on' > === modified file 'lisp/progmodes/perl-mode.el' > --- lisp/progmodes/perl-mode.el 2012-03-15 03:09:26 +0000 > +++ lisp/progmodes/perl-mode.el 2012-03-28 20:28:08 +0000 > @@ -510,6 +510,12 @@ > If nil, continued arguments are aligned with the first argument." > :type '(choice integer (const nil)) > :group 'perl) > +(defcustom perl-indent-parens-as-block nil > + "*Non-nil means that non-block ()-, {}- and []-groups are indented as blocks. > +The closing bracket is aligned with the line of the opening > +bracket, not the contents of the brackets." > + :type 'boolean > + :group 'perl) > (defcustom perl-tab-always-indent tab-always-indent > "Non-nil means TAB in Perl mode always indents the current line. > @@ -852,7 +858,8 @@ > (cond ((nth 3 state) state) ; In a quoted string? > ((null containing-sexp) ; Line is at top level. > (skip-chars-forward " \t\f") > - (if (= (following-char) ?{) > + (if (memq (following-char) > + (if perl-indent-parens-as-block '(?\{ ?\( ?\[) '(?\{))) > 0 ; move to beginning of line if it starts a function body > ;; indent a little if this is a continuation line > (perl-backward-to-noncomment) > @@ -896,7 +903,9 @@ > 0 perl-continued-statement-offset) > (current-column) > (if (save-excursion (goto-char indent-point) > - (looking-at "[ \t]*{")) > + (looking-at > + (if perl-indent-parens-as-block > + "[ \t]*[{(\[]" "[ \t]*{"))) > perl-continued-brace-offset 0))) > ;; This line starts a new statement. > ;; Position at last unclosed open.