unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Faking an active region
@ 2011-09-03 16:09 Deniz Dogan
  2011-09-03 16:19 ` Eli Zaretskii
  2011-09-03 16:40 ` Drew Adams
  0 siblings, 2 replies; 4+ messages in thread
From: Deniz Dogan @ 2011-09-03 16:09 UTC (permalink / raw)
  To: help-gnu-emacs

I am writing a minor mode in which I want to remap `undo' to ALWAYS act 
as if a specific region was active and transient-mark-mode was on.

So how would I go about "faking" this active region in Emacs Lisp?  This 
is what I have so far:

(define-key map [remap undo] 'nima-undo-undo)

(defun nima-undo-undo ()
   (interactive)
   (let ((transient-mark-mode t))
     (push-mark nima-prompt-end t t) ;; a marker
     (goto-char (point-max))
     (undo)))

This doesn't work, and I'm not surprised because I feel like I'm just 
throwing everything I can find at this problem right now.

Thanks in advance,
Deniz



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

end of thread, other threads:[~2011-09-03 17:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-03 16:09 Faking an active region Deniz Dogan
2011-09-03 16:19 ` Eli Zaretskii
2011-09-03 16:40 ` Drew Adams
2011-09-03 17:30   ` Deniz Dogan

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