]> code.delx.au - gnu-emacs/blobdiff - lisp/emulation/cua-gmrk.el
check-maybe shall run only default tests
[gnu-emacs] / lisp / emulation / cua-gmrk.el
index 6cb8bfe6e1cd29c2df50ede6fdc4e532b3a84497..8e023783f3180e108213627d49e0701bfd8c1efd 100644 (file)
@@ -1,10 +1,10 @@
 ;;; cua-gmrk.el --- CUA unified global mark support
 
-;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2016 Free Software Foundation, Inc.
 
 ;; Author: Kim F. Storm <storm@cua.dk>
 ;; Keywords: keyboard emulations convenience cua mark
+;; Package: cua-base
 
 ;; This file is part of GNU Emacs.
 
 
 ;;; Code:
 
-(eval-when-compile
-  (require 'cua-base)
-  (require 'cua-rect)
-  )
+(require 'cua-base)
+(require 'cua-rect)
 
 ;;; Global Marker
 
@@ -94,7 +92,7 @@ insert the deleted or copied text before the global marker, even when the
 global marker is in another buffer.
 If the global marker isn't set, set the global marker at point in the current
 buffer.  Otherwise jump to the global marker position and cancel it.
-With prefix argument, don't jump to global mark when cancelling it."
+With prefix argument, don't jump to global mark when canceling it."
   (interactive "P")
   (unless cua--global-mark-initialized
     (cua--init-global-mark))
@@ -137,7 +135,7 @@ With prefix argument, don't jump to global mark when cancelling it."
       (let ((src-buf (current-buffer)))
        (save-excursion
          (if (equal (marker-buffer cua--global-mark-marker) src-buf)
-             (let ((text (filter-buffer-substring start end nil t)))
+             (let ((text (cua--filter-buffer-noprops start end)))
                (goto-char (marker-position cua--global-mark-marker))
                (insert text))
            (set-buffer (marker-buffer cua--global-mark-marker))
@@ -161,7 +159,7 @@ With prefix argument, don't jump to global mark when cancelling it."
              (if (and (< start (marker-position cua--global-mark-marker))
                       (< (marker-position cua--global-mark-marker) end))
                  (message "Can't move region into itself")
-               (let ((text (filter-buffer-substring start end nil t))
+               (let ((text (cua--filter-buffer-noprops start end))
                      (p1 (copy-marker start))
                      (p2 (copy-marker end)))
                  (goto-char (marker-position cua--global-mark-marker))
@@ -323,7 +321,7 @@ With prefix argument, don't jump to global mark when cancelling 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)))
@@ -364,7 +362,6 @@ With prefix argument, don't jump to global mark when cancelling 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]
@@ -380,5 +377,4 @@ With prefix argument, don't jump to global mark when cancelling it."
 
 (provide 'cua-gmrk)
 
-;; arch-tag: 553d8076-a91d-48ae-825d-6cb962a5f67f
 ;;; cua-gmrk.el ends here