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.