From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: BUG REPORT: "delsel.el" Date: Mon, 03 Mar 2003 13:58:59 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1046719090 15039 80.91.224.249 (3 Mar 2003 19:18:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 3 Mar 2003 19:18:10 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18pvRx-0003uP-00 for ; Mon, 03 Mar 2003 20:18:09 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18pvkw-0007Pp-00 for ; Mon, 03 Mar 2003 20:37:46 +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 18pvF8-0001xv-0B for emacs-devel@quimby.gnus.org; Mon, 03 Mar 2003 14:04:54 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18pvBe-000105-00 for emacs-devel@gnu.org; Mon, 03 Mar 2003 14:01:18 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18pv9e-0000R8-00 for emacs-devel@gnu.org; Mon, 03 Mar 2003 13:59:16 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18pv9R-00008q-00 for emacs-devel@gnu.org; Mon, 03 Mar 2003 13:59:01 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 18pv9P-0004l3-00; Mon, 03 Mar 2003 13:58:59 -0500 Original-To: Le Wang In-reply-to: (message from Le Wang on Thu, 27 Feb 2003 19:07:22 -0500) 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:12082 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12082 + (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. I do not actually use delsel mode. Does this replacement function work right? (defun delete-active-region (&optional killp) (if killp (kill-region (point) (mark)) (delete-region (point) (mark))) (when mark-active (setq mark-active nil) (run-hooks 'deactivate-mark-hook)) t)