unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* transient-mark-mode in 22.0
@ 2005-06-06 17:24 JD Smith
  2005-06-08 12:02 ` Richard Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: JD Smith @ 2005-06-06 17:24 UTC (permalink / raw)



Transient mark mode seems to have changed in behavior between 21.X and
22.x.  I had formerly used it, along with mouse-drag-region, to
temporarily highlight regions of text to operate on.  Binding this to
a down-mouse event, I could mouse-down drag mouse-up and the function
would complete.  Now, mouse-up doesn't seem to do anything, and you
get the "DRAG FINISHED" message only after another event is entered.

Try this in 21.X and 22.X:

(defun do-drag (event)
  "Print value of variable at the mouse position, with `help'"
  (interactive "e")
  (let ((transient-mark-mode t))
    (message "DRAG STARTED")
    (mouse-drag-region event)
    (message "DRAG FINISHED")))

(global-set-key [(control shift down-mouse-2)] 'do-drag)

I noticed that setting the transient-mark-mode variable no longer does
anything, so I attempted:

(defun do-drag (event)
  "Print value of variable at the mouse position, with `help'"
  (interactive "e")
  (transient-mark-mode 1)
  (message "DRAG STARTED")
  (mouse-drag-region event)
  (message "DRAG FINISHED")
  (transient-mark-mode -1))

But that also doesn't finish on mouse-up (and is less than ideal,
since it doesn't restore the existing transient-mark-mode status).

Any suggested workarounds?

Thanks,

JD

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-06-13 15:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-06 17:24 transient-mark-mode in 22.0 JD Smith
2005-06-08 12:02 ` Richard Stallman
2005-06-08 21:17   ` JD Smith
2005-06-09 14:41     ` Richard Stallman
2005-06-09 17:54       ` JD Smith
2005-06-10 22:37         ` Richard Stallman
2005-06-10 22:49           ` JD Smith
2005-06-11 23:16             ` Richard Stallman
2005-06-12 16:29             ` Stefan Monnier
2005-06-12 16:09           ` Stefan Monnier
2005-06-13 15:02             ` Richard Stallman
2005-06-09 21:39     ` Stefan Monnier

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).