From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: weird region behavior
Date: Wed, 16 Jun 2004 12:58:22 -0400 [thread overview]
Message-ID: <E1Badjy-0006At-Eb@fencepost.gnu.org> (raw)
In-Reply-To: <x5pt81zz21.fsf@lola.goethe.zz> (message from David Kastrup on 14 Jun 2004 22:04:22 +0200)
> When I select a region with my mouse, it becomes yellow (as expected)
> and the content is saved in the kill-ring (again, as expected).
> If I now move the cursor with an arrow key, the yellow region does not
> disappear (as it did before) but is instead extended as I move the
> point (luckily, the content is not copied into the kill-ring), and some
> commands appear to be limited to the yellow region.
I think this result was not intended. Do these changes fix it?
*** mouse.el 29 May 2004 05:36:28 -0400 1.247
--- mouse.el 15 Jun 2004 22:47:00 -0400
***************
*** 625,631 ****
(defun mouse-set-region-1 ()
;; Set transient-mark-mode for a little while.
! (setq transient-mark-mode (or transient-mark-mode 'lambda))
(setq mouse-last-region-beg (region-beginning))
(setq mouse-last-region-end (region-end))
(setq mouse-last-region-tick (buffer-modified-tick)))
--- 625,631 ----
(defun mouse-set-region-1 ()
;; Set transient-mark-mode for a little while.
! (setq transient-mark-mode (or transient-mark-mode 'only))
(setq mouse-last-region-beg (region-beginning))
(setq mouse-last-region-end (region-end))
(setq mouse-last-region-tick (buffer-modified-tick)))
*** keyboard.c 13 Jun 2004 18:40:52 -0400 1.780
--- keyboard.c 15 Jun 2004 22:47:52 -0400
***************
*** 681,686 ****
--- 681,688 ----
to support it. */
static int cannot_suspend;
+ extern Lisp_Object Qidentity, Qonly;
+ \f
/* Install the string STR as the beginning of the string of echoing,
so that it serves as a prompt for the next character.
Also start echoing. */
***************
*** 1820,1825 ****
--- 1822,1837 ----
}
else if (current_buffer != prev_buffer || MODIFF != prev_modiff)
call1 (Vrun_hooks, intern ("activate-mark-hook"));
+ }
+
+ /* Setting transient-mark-mode to `only' is a way of
+ turning it on for just one command. */
+ if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks))
+ {
+ if (EQ (Vtransient_mark_mode, Qidentity))
+ Vtransient_mark_mode = Qnil;
+ if (EQ (Vtransient_mark_mode, Qonly))
+ Vtransient_mark_mode = Qidentity;
}
finalize:
next prev parent reply other threads:[~2004-06-16 16:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-14 19:47 weird region behavior Sam Steingold
2004-06-14 20:04 ` David Kastrup
2004-06-15 14:50 ` Sam Steingold
2004-06-16 16:58 ` Richard Stallman [this message]
2004-06-16 22:13 ` Sam Steingold
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=E1Badjy-0006At-Eb@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.org \
/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).