]> code.delx.au - gnu-emacs/blobdiff - lisp/emulation/cua-gmrk.el
Typo.
[gnu-emacs] / lisp / emulation / cua-gmrk.el
index 5e482ee8d210123ddc81c126ff089e36cb29c49a..c3e6727ab651dcea1dfe7f36feb8a61f0a0c354c 100644 (file)
@@ -1,6 +1,7 @@
 ;;; cua-gmrk.el --- CUA unified global mark support
 
-;; Copyright (C) 1997-2002 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Kim F. Storm <storm@cua.dk>
 ;; Keywords: keyboard emulations convenience cua mark
@@ -19,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -33,7 +34,7 @@
   (require 'cua-rect)
   )
 
-;;; Global Marker 
+;;; Global Marker
 
 ;; Non-nil when global marker is active.
 (defvar cua--global-mark-active nil)
   (move-marker cua--global-mark-marker (point))
   (if (overlayp cua--global-mark-overlay)
       (move-overlay cua--global-mark-overlay (point) (1+ (point)))
-    (setq cua--global-mark-overlay 
+    (setq cua--global-mark-overlay
          (make-overlay (point) (1+ (point))))
-    (overlay-put cua--global-mark-overlay 'face 'cua-global-mark-face))
+    (overlay-put cua--global-mark-overlay 'face 'cua-global-mark))
   (if (and cua-global-mark-blink-cursor-interval
           (not cua--orig-blink-cursor-interval))
-      (setq cua--orig-blink-cursor-interval blink-cursor-interval 
+      (setq cua--orig-blink-cursor-interval blink-cursor-interval
            blink-cursor-interval cua-global-mark-blink-cursor-interval))
   (setq cua--global-mark-active t)
   (if msg
@@ -96,7 +97,7 @@ When the global marker is set, CUA cut and copy commands will automatically
 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.
+buffer.  Otherwise jump to the global marker position and cancel it.
 With prefix argument, don't jump to global mark when cancelling it."
   (interactive "P")
   (unless cua--global-mark-initialized
@@ -105,7 +106,7 @@ With prefix argument, don't jump to global mark when cancelling it."
       (if (not buffer-read-only)
          (cua--activate-global-mark t)
        (ding)
-       (message "Cannot set global mark in read-only buffer."))
+       (message "Cannot set global mark in read-only buffer"))
     (when (not stay)
       (pop-to-buffer (marker-buffer cua--global-mark-marker))
       (goto-char cua--global-mark-marker))
@@ -165,7 +166,7 @@ With prefix argument, don't jump to global mark when cancelling it."
          (if (equal (marker-buffer cua--global-mark-marker) src-buf)
              (if (and (< start (marker-position cua--global-mark-marker))
                       (< (marker-position cua--global-mark-marker) end))
-                 (message "Can't move region into itself.")
+                 (message "Can't move region into itself")
                (let ((text (buffer-substring-no-properties start end))
                      (p1 (copy-marker start))
                      (p2 (copy-marker end)))
@@ -218,11 +219,11 @@ With prefix argument, don't jump to global mark when cancelling it."
              (let ((olist (overlays-at (marker-position cua--global-mark-marker)))
                    in-rect)
                (while olist
-                 (if (eq (overlay-get (car olist) 'face) 'cua-rectangle-face)
+                 (if (eq (overlay-get (car olist) 'face) 'cua-rectangle)
                      (setq in-rect t olist nil)
                    (setq olist (cdr olist))))
                (if in-rect
-                   (message "Can't move rectangle into itself.")
+                   (message "Can't move rectangle into itself")
                  (let ((text (cua--extract-rectangle)))
                    (cua--delete-rectangle)
                    (goto-char (marker-position cua--global-mark-marker))
@@ -325,7 +326,7 @@ With prefix argument, don't jump to global mark when cancelling it."
              (move-to-column col)
              (move-marker cua--global-mark-marker (point))
              (move-overlay cua--global-mark-overlay (point) (1+ (point))))))))
-           
+
 
 (defun cua-cancel-global-mark ()
   "Cancel the global mark."
@@ -346,7 +347,7 @@ With prefix argument, don't jump to global mark when cancelling it."
     (if (or (not (eq (current-buffer) (marker-buffer cua--global-mark-marker)))
            (not (pos-visible-in-window-p (marker-position cua--global-mark-marker))))
        (let ((w (selected-window)) (p (point)) h)
-         ;; The following code is an attempt to keep the global mark visible in 
+         ;; The following code is an attempt to keep the global mark visible in
          ;; other window -- but it doesn't work.
          (switch-to-buffer-other-window (marker-buffer cua--global-mark-marker) t)
          (goto-char (marker-position cua--global-mark-marker))
@@ -358,11 +359,6 @@ With prefix argument, don't jump to global mark when cancelling it."
 ;;; Initialization
 
 (defun cua--init-global-mark ()
-  (unless (face-background 'cua-global-mark-face)
-    (copy-face 'region 'cua-global-mark-face)
-    (set-face-foreground 'cua-global-mark-face "black")
-    (set-face-background 'cua-global-mark-face "cyan"))
-
   (define-key cua--global-mark-keymap [remap copy-region-as-kill]      'cua-copy-to-global-mark)
   (define-key cua--global-mark-keymap [remap kill-ring-save]           'cua-copy-to-global-mark)
   (define-key cua--global-mark-keymap [remap kill-region]              'cua-cut-to-global-mark)
@@ -390,4 +386,5 @@ With prefix argument, don't jump to global mark when cancelling it."
 
   (setq cua--global-mark-initialized t))
 
+;;; arch-tag: 553d8076-a91d-48ae-825d-6cb962a5f67f
 ;;; cua-gmrk.el ends here