emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117012: * lisp/simple.el (region-active-p): Chec


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-24 r117012: * lisp/simple.el (region-active-p): Check there's a mark.
Date: Wed, 23 Apr 2014 12:52:28 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117012
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17324
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Wed 2014-04-23 08:52:22 -0400
message:
  * lisp/simple.el (region-active-p): Check there's a mark.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/simple.el                 simple.el-20091113204419-o5vbwnq5f7feedwu-403
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-04-23 02:22:06 +0000
+++ b/lisp/ChangeLog    2014-04-23 12:52:22 +0000
@@ -1,5 +1,7 @@
 2014-04-23  Stefan Monnier  <address@hidden>
 
+       * 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

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2014-04-23 02:22:06 +0000
+++ b/lisp/simple.el    2014-04-23 12:52:22 +0000
@@ -4495,7 +4495,12 @@
 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]