From 0d9b46ac00f2bd115e2144ca8991fb5e9244acc4 Mon Sep 17 00:00:00 2001 From: rubikitch Date: Sat, 13 Jun 2009 03:24:49 +0900 Subject: [PATCH] Define `region-active-p' if needed. --- anything-config.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/anything-config.el b/anything-config.el index 46959ac..062de5d 100644 --- a/anything-config.el +++ b/anything-config.el @@ -680,6 +680,17 @@ The output is sexps which are evaluated by \\[eval-last-sexp]." (pop-to-buffer standard-output))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Utilities Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; For compatibility +(unless (fboundp 'region-active-p) + (defun region-active-p () + "Return t if Transient Mark mode is enabled and the mark is active. + +Most commands that act on the region if it is active and +Transient Mark mode is enabled, and on the text near point +otherwise, should use `use-region-p' instead. That function +checks the value of `use-empty-active-region' as well." + (and transient-mark-mode mark-active))) + (defun anything-nest (&rest same-as-anything) "Nested `anything'. If you use `anything' within `anything', use it." (with-selected-window (anything-window) -- 2.11.4.GIT