]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/simple.el (region-active-p): Check there's a mark.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 23 Apr 2014 12:52:22 +0000 (08:52 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 23 Apr 2014 12:52:22 +0000 (08:52 -0400)
Fixes: debbugs:17324
lisp/ChangeLog
lisp/simple.el

index 04cb6e73e1cfbab74b31b1eea4a2d954eb21af2a..3e10f1f16fed800782a1abb615f425a18ec03085 100644 (file)
@@ -1,5 +1,7 @@
 2014-04-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * simple.el (region-active-p): Check there's a mark (bug#17324).
+
        * simple.el (completion-list-mode-map): Use choose-completion for the
        mouse binding as well (bug#17302).
        (completion-list-mode, completion-setup-function): Adjust docstring and
index 61b7279568f9ad4d85403e34d5af9bf456abffbb..36d2d0b3a15ef8a1f69e5d2800b692b53f0f7c23 100644 (file)
@@ -4495,7 +4495,12 @@ Some commands act specially on the region when Transient Mark
 mode is enabled.  Usually, such commands should use
 `use-region-p' instead of this function, because `use-region-p'
 also checks the value of `use-empty-active-region'."
-  (and transient-mark-mode mark-active))
+  (and transient-mark-mode mark-active
+       ;; FIXME: Somehow we sometimes end up with mark-active non-nil but
+       ;; without the mark being set (e.g. bug#17324).  We really should fix
+       ;; that problem, but in the mean time, let's make sure we don't say the
+       ;; region is active when there's no mark.
+       (mark)))
 
 
 (defvar redisplay-unhighlight-region-function