From: Le Wang <lewang@yahoo.com>
Subject: Re: BUG REPORT: "delsel.el"
Date: Mon, 03 Mar 2003 18:08:55 -0500 [thread overview]
Message-ID: <b40nen$dog$1@main.gmane.org> (raw)
In-Reply-To: E18pv9P-0004l3-00@fencepost.gnu.org
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
next prev parent reply other threads:[~2003-03-03 23:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-28 0:07 BUG REPORT: "delsel.el" Le Wang
2003-03-02 20:33 ` Stefan Monnier
2003-03-02 22:30 ` Le Wang
2003-03-04 18:22 ` Richard Stallman
2003-03-04 19:28 ` Le Wang
2003-03-03 18:58 ` Richard Stallman
2003-03-03 23:08 ` Le Wang [this message]
2003-03-05 20:47 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='b40nen$dog$1@main.gmane.org' \
--to=lewang@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).