X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/8121e4813da7e5898eb216a5de3c17f4875cac61..0fac75fed1c7d61858bef15e951bf9a0835d5bac:/lisp/emulation/cua-gmrk.el diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el index 7866562494..8e023783f3 100644 --- a/lisp/emulation/cua-gmrk.el +++ b/lisp/emulation/cua-gmrk.el @@ -1,6 +1,6 @@ ;;; cua-gmrk.el --- CUA unified global mark support -;; Copyright (C) 1997-2013 Free Software Foundation, Inc. +;; Copyright (C) 1997-2016 Free Software Foundation, Inc. ;; Author: Kim F. Storm ;; Keywords: keyboard emulations convenience cua mark @@ -321,7 +321,7 @@ With prefix argument, don't jump to global mark when canceling it." (defun cua-cancel-global-mark () "Cancel the global mark." (interactive) - (if mark-active + (if (region-active-p) (cua-cancel) (if (cua--global-mark-active) (cua--deactivate-global-mark t))) @@ -362,7 +362,6 @@ With prefix argument, don't jump to global mark when canceling it." (define-key cua--global-mark-keymap [remap backward-delete-char] 'cua-delete-backward-char-at-global-mark) (define-key cua--global-mark-keymap [remap backward-delete-char-untabify] 'cua-delete-backward-char-at-global-mark) (define-key cua--global-mark-keymap [remap self-insert-command] 'cua-insert-char-at-global-mark) - (define-key cua--global-mark-keymap [remap self-insert-iso] 'cua-insert-char-at-global-mark) ;; Catch self-inserting characters which are "stolen" by other modes (define-key cua--global-mark-keymap [t]