From 02d525196007cc3f59407a3167238fa86589ca23 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 25 Dec 2007 22:43:44 +0000 Subject: [PATCH] (region-active-p): New function. --- lisp/simple.el | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.39.2