# HG changeset patch # User Richard M. Stallman # Date 1198622624 0 # Node ID 1073cad4beee51dd1b96a65f2297a5b566024df1 # Parent 0bcb1aa03dade56690f0c54efd7f62133f055c03 (region-active-p): New function. diff -r 0bcb1aa03dad -r 1073cad4beee lisp/simple.el --- a/lisp/simple.el Tue Dec 25 22:14:07 2007 +0000 +++ b/lisp/simple.el Tue Dec 25 22:43:44 2007 +0000 @@ -3377,6 +3377,10 @@ (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)