From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ryan Newsgroups: gmane.emacs.devel Subject: Re: Improvements to adjust-parens Date: Mon, 25 Nov 2013 22:57:23 -0800 Message-ID: <52944653.9000500@thompsonclan.org> References: <5293C972.2020605@thompsonclan.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------070708080506030407080308" X-Trace: ger.gmane.org 1385454840 16820 80.91.229.3 (26 Nov 2013 08:34:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Nov 2013 08:34:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Barry OReilly Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 26 09:34:06 2013 Return-path: Envelope-to: ged-emacs-devel@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 1VlE5u-0001Fn-3R for ged-emacs-devel@m.gmane.org; Tue, 26 Nov 2013 09:34:06 +0100 Original-Received: from localhost ([::1]:57171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlE5t-0006zQ-O4 for ged-emacs-devel@m.gmane.org; Tue, 26 Nov 2013 03:34:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlCaY-0006v2-3N for emacs-devel@gnu.org; Tue, 26 Nov 2013 01:57:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlCaS-0006HS-6o for emacs-devel@gnu.org; Tue, 26 Nov 2013 01:57:38 -0500 Original-Received: from mail-pb0-f48.google.com ([209.85.160.48]:37891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlCaR-0006HI-SN for emacs-devel@gnu.org; Tue, 26 Nov 2013 01:57:32 -0500 Original-Received: by mail-pb0-f48.google.com with SMTP id md12so7410251pbc.21 for ; Mon, 25 Nov 2013 22:57:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=N8EG+cjORm6JpZm3uL1kDxoAfve+3kZEUnkHWyjYIaU=; b=SlUaYxlLK+2bBglsJgXXThHQ+TX6c73Kiu1rWLrBayKGcK1iSvpyyp0TpEkIOY6mDD Q/oZc0E5LWldFA4FYQctJrkALuCbMquEqVcXBp4p4BEa0GKFNscRZfmjPrgC6EsZdzLl McID+kijbdFqul39Dz+uUeWjUN/5rUFJVFC6hFa3pFQhmm76auu7uz8u/z0pc3cU2ld2 h8S5bktreOtmlzSyR1O3bINGmjBpBq7cnnasu4b/QJ8jYGLjyVo0HJb5q4CJ0LiVcKS/ 8oc7K+ncDt9kQU5aKhHyCQMN9mdSAraujliXaf58/y7Z1686lV0g6qL60RB66xoSTCrC NOaA== X-Gm-Message-State: ALoCoQmvcGtDmANDm7oHDIj8Qh40jrs8rlBmRVO3FsZXQBcDcrRVm8NavXiIvXWYhlboTvpLiswd X-Received: by 10.66.118.204 with SMTP id ko12mr1223564pab.184.1385449050720; Mon, 25 Nov 2013 22:57:30 -0800 (PST) Original-Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id iu7sm78136876pbc.45.2013.11.25.22.57.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Nov 2013 22:57:29 -0800 (PST) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.160.48 X-Mailman-Approved-At: Tue, 26 Nov 2013 03:34:01 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:165746 Archived-At: This is a multi-part message in MIME format. --------------070708080506030407080308 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Oh, I forgot to mention, the same changes are in a Github repo, in case you want to cherry-pick things: https://github.com/DarwinAwardWinner/adjust-parens On 11/25/13, 5:51 PM, Barry OReilly wrote: > > > I have recently started to use your adjust-parens package for > Emacs. I have made a few changes to my copy that I thought you > might want to incorporate upstream. I have attached a patch of all > my changes; below are the ChangeLog entries for my changes (also > inclued in the patch): > > * adjust-parens.el (adjust-parens-mode): Convert to minor mode > (global-adjust-parens-mode): Add globalized mode. Uses a custom > var to determine which modes to enable the mode in. > (adjust-parens-p): Only adjust parens after fixing indentation and > moving point to end of indentation. > (adjust-parens-and-indent): Correct handling of prefix arg. Now > only explicit numeric prefix arguments (i.e. not `C-u') affect the > number of parens adjusted, and negative & zero prefix are handled > correctly. > > * adjust-parens-tests.el (apt-mode-test): Add tests for minor mode > enabling/disabling > (apt-indent-dedent-test): Add tests for behavior when indentation > is incorrect or point is not at end of indentation > > The to main changes of interest are the conversion of > adjust-parens into a minor mode that can be enabled and disabled, > and the changing the initial behavior of the TAB key when the > current line is wrongly indented or the point is at the wrong > position. I hope you find this patch useful. Please let me know > what you think of it. > > > Thanks. adjust-parens is in ELPA which requires a copyright assignment > to FSF for non tiny changes. I'm not sure how to check whether you're > on the list of those who have completed the paperwork. > --------------070708080506030407080308 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Oh, I forgot to mention, the same changes are in a Github repo, in case you want to cherry-pick things: https://github.com/DarwinAwardWinner/adjust-parens

On 11/25/13, 5:51 PM, Barry OReilly wrote:

I have recently started to use your adjust-parens package for Emacs. I have made a few changes to my copy that I thought you might want to incorporate upstream. I have attached a patch of all my changes; below are the ChangeLog entries for my changes (also inclued in the patch):

    * adjust-parens.el (adjust-parens-mode): Convert to minor mode
    (global-adjust-parens-mode): Add globalized mode. Uses a custom
    var to determine which modes to enable the mode in.
    (adjust-parens-p): Only adjust parens after fixing indentation and
    moving point to end of indentation.
    (adjust-parens-and-indent): Correct handling of prefix arg. Now
    only explicit numeric prefix arguments (i.e. not `C-u') affect the
    number of parens adjusted, and negative & zero prefix are handled
    correctly.

    * adjust-parens-tests.el (apt-mode-test): Add tests for minor mode
    enabling/disabling
    (apt-indent-dedent-test): Add tests for behavior when indentation
    is incorrect or point is not at end of indentation

The to main changes of interest are the conversion of adjust-parens into a minor mode that can be enabled and disabled, and the changing the initial behavior of the TAB key when the current line is wrongly indented or the point is at the wrong position. I hope you find this patch useful. Please let me know what you think of it.


Thanks. adjust-parens is in ELPA which requires a copyright assignment
to FSF for non tiny changes. I'm not sure how to check whether you're
on the list of those who have completed the paperwork.


--------------070708080506030407080308--