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

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

Re: Faking an active region


From: Eli Zaretskii
Subject: Re: Faking an active region
Date: Sat, 03 Sep 2011 19:19:42 +0300

> Date: Sat, 03 Sep 2011 18:09:46 +0200
> From: Deniz Dogan <address@hidden>
> 
> 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.

See region-active-p and push-mark.



reply via email to

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