[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 39afa42: Fix tests for active region in hideif.el
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-25 39afa42: Fix tests for active region in hideif.el |
Date: |
Sat, 16 Jan 2016 07:56:09 +0000 |
branch: emacs-25
commit 39afa422ad0b3cef00292e260d424b7cd589b90d
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix tests for active region in hideif.el
* lisp/progmodes/hideif.el (hif-evaluate-macro, hide-ifdef-block): Use
'use-region-p' to test whether to operate on region, instead of
testing 'mark-active'.
---
lisp/progmodes/hideif.el | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index a75a322..8a87eb9 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -1591,7 +1591,7 @@ not be expanded."
'(nil nil)))
(let ((case-fold-search nil))
(save-excursion
- (unless mark-active
+ (unless (use-region-p)
(setq rstart nil rend nil)
(beginning-of-line)
(when (and (re-search-forward hif-macro-expr-prefix-regexp nil t)
@@ -1922,7 +1922,7 @@ Return as (TOP . BOTTOM) the extent of ifdef block."
With optional prefix argument ARG, also hide the #ifdefs themselves."
(interactive "P\nr")
(let ((hide-ifdef-lines arg))
- (if mark-active
+ (if (use-region-p)
(let ((hif-recurse-level (1+ hif-recurse-level)))
(hif-recurse-on start end t)
(setq mark-active nil))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 39afa42: Fix tests for active region in hideif.el,
Eli Zaretskii <=