From: Richard M. Stallman Date: Tue, 25 Dec 2007 22:43:44 +0000 (+0000) Subject: (region-active-p): New function. X-Git-Tag: emacs-pretest-23.0.90~8843 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=02d525196007cc3f59407a3167238fa86589ca23;p=emacs.git (region-active-p): New function. --- diff --git a/lisp/simple.el b/lisp/simple.el index 7082c7c4cdd..0537862ab83 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3377,6 +3377,10 @@ This function also obeys `use-empty-active-region'." (and transient-mark-mode mark-active (or use-empty-active-region (> (region-end) (region-beginning))))) +(defun region-active-p () + "Return t if Transient Mark mode is enabled and the mark is active." + (and transient-mark-mode mark-active)) + (defvar mark-ring nil "The list of former marks of the current buffer, most recent first.") (make-variable-buffer-local 'mark-ring)