From cdca825560c4f97fba5ccd6ba87df5c881d1ffce Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 18 Apr 2013 09:15:08 -0400 Subject: [PATCH] * lisp/winner.el (winner-active-region): Use region-active-p, activate-mark and deactivate-mark. * lisp/simple.el (deactivate-mark): Don't inline it. Fixes: debbugs:14225 --- lisp/ChangeLog | 7 +++++++ lisp/simple.el | 2 +- lisp/winner.el | 6 ++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2423acc5667..98ba110ab33 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-04-18 Stefan Monnier + + * winner.el (winner-active-region): Use region-active-p, activate-mark + and deactivate-mark (bug#14225). + + * simple.el (deactivate-mark): Don't inline it. + 2013-04-18 Michael Albinus * net/tramp-sh.el (tramp-remote-process-environment): Add "TMOUT=0". diff --git a/lisp/simple.el b/lisp/simple.el index 3f28b8413e0..5fda9021004 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4177,7 +4177,7 @@ a mistake; see the documentation of `set-mark'." (marker-position (mark-marker)) (signal 'mark-inactive nil))) -(defsubst deactivate-mark (&optional force) +(defun deactivate-mark (&optional force) "Deactivate the mark. If Transient Mark mode is disabled, this function normally does nothing; but if FORCE is non-nil, it deactivates the mark anyway. diff --git a/lisp/winner.el b/lisp/winner.el index dfbd15b6676..f521ba0521b 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -45,10 +45,8 @@ (if (featurep 'xemacs) `(if ,store (zmacs-activate-region) (zmacs-deactivate-region)) - `(setq mark-active ,store))))) - (if (boundp 'mark-active) - mark-active - (region-active-p))) + `(if ,store (activate-mark) (deactivate-mark)))))) + (region-active-p)) (defalias 'winner-edges (if (featurep 'xemacs) 'window-pixel-edges 'window-edges)) -- 2.39.2