bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective


From: martin rudalics
Subject: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective
Date: Fri, 11 Oct 2019 20:26:23 +0200

> Do you know of any drawbacks for someone whose editing habits are
> not dependent on the region confinement of undo?

Here I once had my own 'undo' function since I disliked the one in
simple.el.  Eventually I gave up because it was too tedious to keep up
with the changes of the original.  Nowadays I'm just using

(defun my-undo (&optional arg)
  (interactive)
  (if mark-active
      ;; No `undo-in-region'.
      (let (mark-active)
        (undo arg)
        (setq mark-active t)
        ;; The following might be harmful, let's see.
        (setq deactivate-mark nil))
    (undo arg)))

But I also faintly remember a discussion with the author of
'mouse-drag-and-drop-region' on whether it is a good idea to activate
the mark after dropping - IIRC he did have some argument in favor of
it.  Maybe it would be easier to add an option for not activating the
region when dropping than adding one for 'undo'.

martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]