From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simon Law Newsgroups: gmane.emacs.bugs Subject: bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode Date: Mon, 22 Oct 2012 21:07:15 -0400 Message-ID: References: <87ipdqx6e4.fsf@gnu.org> <87a9z19jgj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1350954500 28578 80.91.229.3 (23 Oct 2012 01:08:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2012 01:08:20 +0000 (UTC) Cc: Chong Yidong , 11520-done@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 23 03:08:26 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 1TQSyn-0000Nf-B8 for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2012 03:08:25 +0200 Original-Received: from localhost ([::1]:36109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQSyf-0006w8-Ef for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Oct 2012 21:08:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQSyc-0006w3-2b for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2012 21:08:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQSya-00031z-M1 for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2012 21:08:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQSya-00031v-Ir for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2012 21:08:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TQT0L-0005D4-Lx for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2012 21:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Simon Law Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Oct 2012 01:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11520 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11520-done@debbugs.gnu.org id=D11520.135095457619989 (code D ref 11520); Tue, 23 Oct 2012 01:10:01 +0000 Original-Received: (at 11520-done) by debbugs.gnu.org; 23 Oct 2012 01:09:36 +0000 Original-Received: from localhost ([127.0.0.1]:56538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQSzv-0005CM-NV for submit@debbugs.gnu.org; Mon, 22 Oct 2012 21:09:36 -0400 Original-Received: from mail-bk0-f44.google.com ([209.85.214.44]:55052) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQSzs-0005C7-1K for 11520-done@debbugs.gnu.org; Mon, 22 Oct 2012 21:09:33 -0400 Original-Received: by mail-bk0-f44.google.com with SMTP id jc3so1101901bkc.3 for <11520-done@debbugs.gnu.org>; Mon, 22 Oct 2012 18:07:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:x-gm-message-state; bh=NuKzwuoD2QHfI1XWN9MnCc+9d8sFfhTcdpPVkMdioEk=; b=IO4w1CSLfVplq+sHzcEGeMCgZUgDOUVLb6mCeYIULTiyPGpOM9yGEHs1dxKIeF6fd/ k5TAtMxvG6AESiOErbieqJL4MIJVTYbIyt0JohC11gH0l1GOD94v3PzXgn6BPuf7H2SZ 6qFckePaKYCdyu0GCkD0PXNmTA1faAYz5j+MPAeECz/DNTt772r2f10XyTKCmrhdyvgI kVpi2r7jIoXXnKyq1Z9J1D8bwvsZkQL4pMksxndTBIOV7EOOjZId4ixW8+jUO+HVWFQT P3jPYxMYW7Hxy8Gp3wg8cutOkOy4wVIFbdCZUiq1U1zagRHptHW7a87JKVyuSNhVbOqh Ru2A== Original-Received: by 10.204.130.10 with SMTP id q10mr3279303bks.59.1350954456306; Mon, 22 Oct 2012 18:07:36 -0700 (PDT) Original-Received: by 10.204.142.140 with HTTP; Mon, 22 Oct 2012 18:07:15 -0700 (PDT) X-Originating-IP: [2607:f2c0:f00e:1900:f415:7b35:64d3:5c90] In-Reply-To: X-Gm-Message-State: ALoCoQmdppJYYT3tQsLyQvMugstb8LWYjimUEr7ya7Ouj3vIImTY5bpVks99XDAHzoh5Qf6uwNx0 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:65892 Archived-At: On Mon, Oct 22, 2012 at 8:46 AM, Stefan Monnier wrote: >> Attached is a patch against trunk. > > Thanks, I really appreciate the addition of docstrings. > it's got a few cosmetic problems, so I've installed it and then > installed a subsequent patch on top of it. > > Here are the issues I noticed: > - a hook is a symbol whose value contains a list of functions (modulo > a few subtleties). The functions themselves are not hooks. > E.g. delete-selection-pre-hook is not a hook, just a function that's > typically added on a particular hook. Yeah, I wasn't sure about delete-selection-pre-hook, but that's what the function was already called, so I wasn't going to change the API there. > And the symbol symbol is named with "-hook" (rather than with > "-hooks") for normal hooks and "-functions" for abnormal hooks. Ah, I read that it was either one or the other in http://www.gnu.org/software/emacs/manual/html_node/elisp/Hooks.html. Perhaps that documentation should discourage the -hooks convention? > - symbols in docstrings are written `foo' rather than 'foo. In delete-selection-helper, you mean? Yes, that appears to be a copy-paste error. > - docstrings normally don't end with a line-separator (i.e. the closing > " should not be on its own line). Whoops. Thanks for catching that. > - there's no self-insert-iso in Emacs, so I'd rather not touch it. delete-selection-mode.el used to touch self-insert-iso, as does cua-rect.el. Is this something to clean up, or is there something I'm missing? > - use the imperative for the first line of a docstring. Will do. > - `keep' is not a value handled specially by delete-selection-helper, > so it is handled as a hook, luckily there's no function on this hook > (an unbound symbol is treated by `run-hook' as a symbol bound to nil) > so it ends up behaving like nil, which is indeed what we need; so the > end behavior is correct, but only "by accident". Gosh, I don't know how that snuck in there. That was a think-o. Finally, I noticed that you created self-insert-uses-region-functions, but there is no defvar or docstring for that. For future reference, is it normal that packages have hidden hooks like that? Thanks for the cleanup! -- Cheers, Simon - http://ca.linkedin.com/in/sfllaw/