From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: delete-selection-mode Date: Tue, 23 Mar 2010 11:09:06 -0700 Message-ID: <9C89B664FF0146C087C358EB51E0DE4C@us.oracle.com> References: <22603146-A346-4FC2-8D74-5D6047865C3A@mit.edu> <87r5nf8s7q.fsf@siart.de> <87pr2ygbii.fsf@lola.goethe.zz> <87tys9180s.fsf@catnip.gol.com><87ocih158i.fsf@catnip.gol.com><874ok7bhse.fsf@lola.goethe.zz> <87fx3r10ec.fsf@stupidchicken.com><87d3yv7zzy.fsf@lola.goethe.zz> <87634n0xnn.fsf@stupidchicken.com> <87fx3rc5p0.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1269368616 12089 80.91.229.12 (23 Mar 2010 18:23:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 23 Mar 2010 18:23:36 +0000 (UTC) Cc: 'David Kastrup' , emacs-devel@gnu.org To: "'Juri Linkov'" , "'Chong Yidong'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 23 19:23:28 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nu8lC-0002Ib-QI for ged-emacs-devel@m.gmane.org; Tue, 23 Mar 2010 19:23:27 +0100 Original-Received: from localhost ([127.0.0.1]:59767 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nu8lC-0006Nl-8M for ged-emacs-devel@m.gmane.org; Tue, 23 Mar 2010 14:23:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nu8bn-0007Xe-Sn for emacs-devel@gnu.org; Tue, 23 Mar 2010 14:13:44 -0400 Original-Received: from [140.186.70.92] (port=42162 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nu8bm-0007Wy-Ij for emacs-devel@gnu.org; Tue, 23 Mar 2010 14:13:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nu8bk-0005nS-VJ for emacs-devel@gnu.org; Tue, 23 Mar 2010 14:13:42 -0400 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:16805) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nu8bk-0005nE-QI; Tue, 23 Mar 2010 14:13:40 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet12.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o2NIDVit005127 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 23 Mar 2010 18:13:32 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o2NHTntu015417; Tue, 23 Mar 2010 18:10:16 GMT Original-Received: from abhmt012.oracle.com by acsmt353.oracle.com with ESMTP id 104375071269367747; Tue, 23 Mar 2010 11:09:07 -0700 Original-Received: from dradamslap1 (/10.175.204.81) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 23 Mar 2010 11:09:06 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87fx3rc5p0.fsf@mail.jurta.org> Thread-Index: AcrKrnwun//fephUR/m05UX72M8fugAAINjw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt355.oracle.com [141.146.40.155] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4BA9040B.018F:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:122572 Archived-At: > What do you think about marking commands that should delete the active > region with a new interactive character (like "^" is used to call > `handle-shift-selection'), so e.g. a new function > `handle-delete-region' could delete the active region before > running a command? Delete-selection mode has just such a property: `delete-selection'. (But it is simply a symbol property.) This is precisely how it allows control over which commands delete the active region and what behavior that deletion entails. It is the basis/essence of `delete-selection-mode'. The possible values of property `delete-selection' are: kill - kill region yank - delete region; adjust kill-ring for the yank supersede - delete region only (ignore current command) t (non-nil) - delete region (current command inserts text) Property values for the commands handled by default: kill: open-line yank: (clipboard-)yank t: self-insert-(command|iso) insert-register newline(-and-indent) As an example of how users can take advantage of this, I put a value of t also on `insert-parentheses' and `completion-separator-self-insert-(command|autofilling)' (from completion.el).