From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Le Wang Newsgroups: gmane.emacs.devel Subject: Re: BUG REPORT: "delsel.el" Date: Mon, 03 Mar 2003 18:08:55 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: main.gmane.org 1046733217 16537 80.91.224.249 (3 Mar 2003 23:13:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 3 Mar 2003 23:13:37 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18pz7o-0004Ib-00 for ; Tue, 04 Mar 2003 00:13:36 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18pzQs-0001K5-00 for ; Tue, 04 Mar 2003 00:33:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18pz8B-0008GE-02 for emacs-devel@quimby.gnus.org; Mon, 03 Mar 2003 18:13:59 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18pz7t-0008EI-00 for emacs-devel@gnu.org; Mon, 03 Mar 2003 18:13:41 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18pz7T-00082p-00 for emacs-devel@gnu.org; Mon, 03 Mar 2003 18:13:16 -0500 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18pz64-0007AK-00 for emacs-devel@gnu.org; Mon, 03 Mar 2003 18:11:48 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18pz5c-00048g-00 for ; Tue, 04 Mar 2003 00:11:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18pz5b-00048X-00 for ; Tue, 04 Mar 2003 00:11:19 +0100 Original-Lines: 53 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: KNode/0.7.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12086 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12086 Richard Stallman wrote: > + (unless transient-mark-mode > + (setq mark-active nil) > + (run-hooks 'deactivate-mark-hook)) > > To quote the doc string of delete-selection-mode: > > When Delete Selection mode is enabled, Transient Mark mode is also > enabled and typed text replaces the selection if the selection is > active. > > So putting (unless transient-mark-mode ...) around that code in > delete-active-region is equivalent to deleting it. That can't be > right. It's not right. Quoting the doc string from transient-mark-mode: ,----[ C-h f transient-mark-mode RET ] | | [...] | | In Transient Mark mode, when the mark is active, the region is highlighted. | Changing the buffer "deactivates" the mark. | | [...] | `---- So `delete-active-region' by virtue of `transient-mark-mode' already deactivates the region. And as I mentioned in another post in this thread, this patch is appropriate: *** /usr/local/share/emacs/21.3.50/lisp/delsel.el Mon Nov 19 01:21:11 2001 --- /tmp/buffer-content-278329Vo Sun Mar 2 17:28:13 2003 *************** *** 75,82 **** (if killp (kill-region (point) (mark)) (delete-region (point) (mark))) - (setq mark-active nil) - (run-hooks 'deactivate-mark-hook) t) (defun delete-selection-pre-hook () --- 75,80 ---- Diff finished at Sun Mar 2 17:28:13 -- Le