From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 07 10:05:19 2015 Received: (at submit) by debbugs.gnu.org; 7 Jan 2015 15:05:19 +0000 Received: from localhost ([127.0.0.1]:39402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8sAg-0002m5-Mi for submit@debbugs.gnu.org; Wed, 07 Jan 2015 10:05:19 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59423) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8sAe-0002lw-CL for submit@debbugs.gnu.org; Wed, 07 Jan 2015 10:05:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8sAd-0004uD-0D for submit@debbugs.gnu.org; Wed, 07 Jan 2015 10:05:16 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8sAc-0004u9-U6 for submit@debbugs.gnu.org; Wed, 07 Jan 2015 10:05:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8sAb-0001C2-L6 for bug-gnu-emacs@gnu.org; Wed, 07 Jan 2015 10:05:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8sAa-0004tl-Be for bug-gnu-emacs@gnu.org; Wed, 07 Jan 2015 10:05:13 -0500 Received: from r0.smtpout1.alwaysdata.com ([2001:41d0:8:2928::1:0]:51834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8sAa-0004tH-0I for bug-gnu-emacs@gnu.org; Wed, 07 Jan 2015 10:05:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alwaysdata.net; s=ryuslash; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=Owns90zjShhpfNDcztQkXlK5QMuL0ucNNvxBLDXJdHo=; b=UnqUp9O/FumfcP7BY/7eSFbEgEgcwG42g6vADNFbqSlkpUUVkqe8Q1rmtoOAR7FAjYdtkXewCpYY17qOr7G9ISlq9H0H51O2gM7jJljBtqvAZxkSnjAPAp3yDmLxDgyOZkkWtSYHe8Q70ZG+rUlDZOx/xmYxXOAE/YSAs0JZIqI=; Received: from [2a02:1812:2518:ce00:f24d:a2ff:fede:451c] (helo=localhost) by smtpout1.alwaysdata.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.77) (envelope-from ) id 1Y8sAT-0005qO-9R for bug-gnu-emacs@gnu.org; Wed, 07 Jan 2015 16:05:05 +0100 From: Tom Willemse To: bug-gnu-emacs@gnu.org Subject: 25.0.50; Add electric-pair-local-mode Date: Wed, 07 Jan 2015 16:05:04 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-alwaysdata-ID: 43422880 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain Hello Emacs devs, Attached is a patch to add `electric-pair-local-mode'. It's almost an exact copy of `electric-indent-local-mode'. I like using `electric-pair-mode', except in Lisp-like languages where I prefer paredit, so having a local mode is useful to me. I've tried mentioning it in the same places as `electric-indent-local-mode', I hope I did it right. Please let me know what you think. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Add-electric-pair-local-mode.patch >From b8fd61d4b380cddb8a5c51c392c6aa4ac9e3d1e5 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 7 Jan 2015 04:04:06 +0100 Subject: [PATCH] Add electric-pair-local-mode * elec-pair.el (electric-pair-local-mode): New command. (electric-pair-mode): Mention `electric-pair-local-mode' in the docstring. --- doc/emacs/programs.texi | 4 +++- etc/NEWS | 5 +++++ lisp/ChangeLog | 6 ++++++ lisp/elec-pair.el | 16 +++++++++++++++- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 8f6111d..248e72c 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -870,7 +870,9 @@ mode to skip whitespace forward before deciding whether to skip over the closing delimiter. @end itemize -To toggle Electric Pair mode, type @kbd{M-x electric-pair-mode}. +To toggle Electric Pair mode, type @kbd{M-x electric-pair-mode}. To +toggle the mode in a single buffer, use @kbd{M-x +electric-pair-local-mode}. @node Comments @section Manipulating Comments diff --git a/etc/NEWS b/etc/NEWS index 4d704ce..8709c39 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -469,6 +469,11 @@ As a result of the above, these commands are now obsolete: `find-tag-other-window', `find-tag-other-frame', `find-tag-regexp', `tags-apropos' and `tags-loop-continue'. +** Electric Pair mode + ++++ +*** New buffer-local `electric-pair-local-mode'. + ** Obsolete packages --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 71889ce..646bd90 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-01-07 Tom Willemse + + * elec-pair.el (electric-pair-local-mode): New command. + (electric-pair-mode): Mention `electric-pair-local-mode' in the + docstring. + 2015-01-06 Sam Steingold * shell.el (shell-display-buffer-actions): Remove, diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el index 2cede62..70f3a8a 100644 --- a/lisp/elec-pair.el +++ b/lisp/elec-pair.el @@ -557,7 +557,8 @@ (define-minor-mode electric-pair-mode Electric Pair mode is a global minor mode. When enabled, typing an open parenthesis automatically inserts the corresponding -closing parenthesis. (Likewise for brackets, etc.)." +closing parenthesis. (Likewise for brackets, etc.). To toggle +the mode in a single buffer, use `electric-pair-local-mode'." :global t :group 'electricity (if electric-pair-mode (progn @@ -571,6 +572,19 @@ (define-minor-mode electric-pair-mode (remove-hook 'self-insert-uses-region-functions #'electric-pair-will-use-region))) +;;;###autoload +(define-minor-mode electric-pair-local-mode + "Toggle `electric-pair-mode' only in this buffer." + :variable (buffer-local-value 'electric-pair-mode (current-buffer)) + (cond + ((eq electric-pair-mode (default-value 'electric-pair-mode)) + (kill-local-variable 'electric-pair-mode)) + ((not (default-value 'electric-pair-mode)) + ;; Locally enabled, but globally disabled. + (electric-pair-mode 1) ; Setup the hooks. + (setq-default electric-pair-mode nil) ; But keep it globally disabled. + ))) + (provide 'elec-pair) ;;; elec-pair.el ends here -- 2.2.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 28 11:47:51 2015 Received: (at 19528-done) by debbugs.gnu.org; 28 Mar 2015 15:47:51 +0000 Received: from localhost ([127.0.0.1]:38997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybsxj-0003Uz-4C for submit@debbugs.gnu.org; Sat, 28 Mar 2015 11:47:51 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:34078) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybsxh-0003Um-0o for 19528-done@debbugs.gnu.org; Sat, 28 Mar 2015 11:47:49 -0400 Received: by wgbdm7 with SMTP id dm7so21966662wgb.1 for <19528-done@debbugs.gnu.org>; Sat, 28 Mar 2015 08:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=64clsyh7UibDFCppSQy03U5sAJz+zQ39YKryOdbI590=; b=jDjEf0DS/DqT4nwsYjARq9riBaZd+H2NeVdDG/LgQ21PLMbAH66KEqVVbTeveBgGAz gAuM22dsByJV4R+rKCqLejI5lRzYpic2ACoHxrAvkpnD7mCyvmQvOFpnGKEzKYC59rsm cZI/j0N36RM8g0YLeby8svxEfvm1vIYf22154mvDna/F96jF3D5Jz5XGN0o5088AJvcX KFWC2poRG6FBhcJQ/N5MGl+d7apjvxkz0kNXy5e9W6kbAUk9ddVF8ors7X15A5Kkiksx QbAWnGoqaLT6jTe2eepucfQMef5lRe9rUR+J5dwqeQ2+wy/bfxbwCVUQjHAaRF3yMd9W MthQ== X-Received: by 10.180.74.170 with SMTP id u10mr6910943wiv.46.1427557663391; Sat, 28 Mar 2015 08:47:43 -0700 (PDT) Received: from king.yourcompany.com (31.57.37.188.rev.vodafone.pt. [188.37.57.31]) by mx.google.com with ESMTPSA id wo10sm7592803wjb.35.2015.03.28.08.47.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Mar 2015 08:47:42 -0700 (PDT) From: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) To: Stefan Monnier Subject: Re: electric-pair-mode as a minor mode? References: Date: Sat, 28 Mar 2015 15:47:32 +0000 In-Reply-To: (Stefan Monnier's message of "Fri, 27 Mar 2015 15:01:02 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19528-done Cc: Yuri D'Elia , Tom Willemse , 19528-done@debbugs.gnu.org, emacs-devel@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Stefan Monnier writes: > Tom Willemse writes: >> Not to be a nuisance, but I wrote a patch for that some time ago and I'm >> still waiting on a response: >> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D19528 > > Jo=C3=A3o, can you take a look at that? Looks pretty good so I just pushed: commit 40b3dcd2c06e30048be0bdc32861148a53660c90 Author: Tom Willemse Date: Sat Mar 28 14:43:33 2015 +0000 =20=20=20=20=20 New `electric-pair-local-mode' =20=20=20=20=20=20=20=20 Fixes: big#19528 =20=20=20=20=20=20=20=20 * lisp/elec-pair.el (electric-pair-local-mode): New command. (electric-pair-mode): Mention `electric-pair-local-mode' in the docstring. Didn't check for Tom's copyright assignment since I believe it counts as a trivial patch (<15loc). Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 28 13:37:20 2015 Received: (at 19528) by debbugs.gnu.org; 28 Mar 2015 17:37:20 +0000 Received: from localhost ([127.0.0.1]:39058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybuff-00064a-QP for submit@debbugs.gnu.org; Sat, 28 Mar 2015 13:37:20 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:46203 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybufd-00064S-Uc for 19528@debbugs.gnu.org; Sat, 28 Mar 2015 13:37:18 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Ybufb-0005CG-KV; Sat, 28 Mar 2015 13:37:15 -0400 From: Glenn Morris To: 19528@debbugs.gnu.org Subject: Re: bug#19528: electric-pair-mode as a minor mode? References: X-Spook: enigma Semtex Ceridian Leitrim bootleg propaganda X-Ran: aR6lFi.Y^K#!jZTS?i]`0R?gp'IpT)\@bOaD[/%y+i)g'fL]2P>dltkfoK,U$sD`_I'v#c X-Hue: blue X-Attribution: GM Date: Sat, 28 Mar 2015 13:37:15 -0400 In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Sat, 28 Mar 2015 15:47:32 +0000") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 19528 Cc: joaotavora@gmail.com, tom@ryuslash.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Jo=C3=A3o T=C3=A1vora wrote: > Didn't check for Tom's copyright assignment since I believe it counts as > a trivial patch (<15loc). It never works like that. 1) Add "(tiny change)" to the ChangeLog entry. 2) You always need to check for previous changes from the same author (there are several) and estimate the total lines contributed so far. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 28 17:02:11 2015 Received: (at 19528) by debbugs.gnu.org; 28 Mar 2015 21:02:11 +0000 Received: from localhost ([127.0.0.1]:39135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybxru-0002dj-S4 for submit@debbugs.gnu.org; Sat, 28 Mar 2015 17:02:11 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:35476) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybxrs-0002dI-Eg for 19528@debbugs.gnu.org; Sat, 28 Mar 2015 17:02:09 -0400 Received: by wgdm6 with SMTP id m6so132750574wgd.2 for <19528@debbugs.gnu.org>; Sat, 28 Mar 2015 14:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=IX3mM4HOWh750WRRXnt10g4BR2uRs1lb9gDsDJ8IXW4=; b=D7ktiEJpWprXuw1P19C9vuWu9rKUUa4oKFIREpL3Mr6FwbhSuLZ+PlQOgfhSgX6o8K l4zwwBhyZdUJq4HdrzS2GEqRNNeGU0WcUS3AEmVqZFy4pNBlqF2mLtjdEgnkp+kM25Lj Ksv3+fkbSAtebMJNpPAnxHbhE7owWAWE9wcnGN2HXjSvEUE3Rh3IQ+srGGSQZFO7Io2w XSL7lLkLB1+t729ZD+nxGVwtyrBbZBaPtPY8hsORexJtWhUUQTv4FF8ZBT3IcAE3gP6s gASOrx9kdSWuozooo76wTFSnmFIoxzu1G1dN7eg34ZJXJgsFYPyUN/2d/abDvvHY2doJ eotg== X-Received: by 10.194.110.69 with SMTP id hy5mr49910024wjb.121.1427576522691; Sat, 28 Mar 2015 14:02:02 -0700 (PDT) Received: from king.yourcompany.com (31.57.37.188.rev.vodafone.pt. [188.37.57.31]) by mx.google.com with ESMTPSA id dn7sm9184082wid.12.2015.03.28.14.02.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Mar 2015 14:02:01 -0700 (PDT) From: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) To: Glenn Morris Subject: Re: bug#19528: electric-pair-mode as a minor mode? References: Date: Sat, 28 Mar 2015 21:01:58 +0000 In-Reply-To: (Glenn Morris's message of "Sat, 28 Mar 2015 13:37:15 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19528 Cc: 19528@debbugs.gnu.org, tom@ryuslash.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Glenn Morris writes: > Jo=C3=A3o T=C3=A1vora wrote: > >> Didn't check for Tom's copyright assignment since I believe it counts as >> a trivial patch (<15loc). > > It never works like that. > > 1) Add "(tiny change)" to the ChangeLog entry. > 2) You always need to check for previous changes from the same author > (there are several) and estimate the total lines contributed so far. > I'm very sorry, I didn't know it worked like that, I'm also currently locked out of my fencepost account so I can't check the copyright file (is there another way to check it?) How do I decide once I've estimated the number of "total lines"? Does that have to amount to 15loc max? Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 14 02:28:36 2015 Received: (at 19528) by debbugs.gnu.org; 14 Apr 2015 06:28:36 +0000 Received: from localhost ([127.0.0.1]:55468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YhuKo-0006Jr-OH for submit@debbugs.gnu.org; Tue, 14 Apr 2015 02:28:35 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:41039 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YhuKl-0006Jh-0s for 19528@debbugs.gnu.org; Tue, 14 Apr 2015 02:28:31 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YhuKj-00085G-96; Tue, 14 Apr 2015 02:28:29 -0400 From: Glenn Morris To: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) Subject: Re: bug#19528: electric-pair-mode as a minor mode? References: X-Spook: Hugo Chavez 22nd SAS MDA kilo class Venezuela codes Dick X-Ran: R^D]_#rx=3\9hG& (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Sat, 28 Mar 2015 21:01:58 +0000") Message-ID: <6e618zmdf6.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 19528 Cc: 19528@debbugs.gnu.org, tom@ryuslash.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) It's no big deal. Jo=C3=A3o T=C3=A1vora wrote: > locked out of my fencepost account so I can't check the copyright file > (is there another way to check it?) Not AFAIK. > How do I decide once I've estimated the number of "total lines"? Does > that have to amount to 15loc max? Yes, though that is a rough number. And it's not a literal line count. Eg a purely mechanical s/foo/bar on 100 lines counts as 1 line, IMO. Life is much easier if people complete assignments though. :) From unknown Tue Jun 24 06:56:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 12 May 2015 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator