]> git.eshelyaron.com Git - emacs.git/commitdiff
(region-active-p): New function.
authorRichard M. Stallman <rms@gnu.org>
Tue, 25 Dec 2007 22:43:44 +0000 (22:43 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 25 Dec 2007 22:43:44 +0000 (22:43 +0000)
lisp/simple.el

index 7082c7c4cdd545ae3852f1c87b911867eb3127fd..0537862ab837cc50096ed689332879762d4a8b0b 100644 (file)
@@ -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)