diff lisp/emulation/cua-gmrk.el @ 88155:d7ddb3e565de

sync with trunk
author Henrik Enberg <henrik.enberg@telia.com>
date Mon, 16 Jan 2006 00:03:54 +0000
parents 0d8b17d428b5
children
line wrap: on
line diff
--- a/lisp/emulation/cua-gmrk.el	Sun Jan 15 23:02:10 2006 +0000
+++ b/lisp/emulation/cua-gmrk.el	Mon Jan 16 00:03:54 2006 +0000
@@ -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 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:
 
@@ -74,7 +75,7 @@
       (move-overlay cua--global-mark-overlay (point) (1+ (point)))
     (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
@@ -96,7 +97,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.
+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 @@
       (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 @@
 	  (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 @@
 	      (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))
@@ -358,11 +359,6 @@
 ;;; 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 @@
 
   (setq cua--global-mark-initialized t))
 
+;;; arch-tag: 553d8076-a91d-48ae-825d-6cb962a5f67f
 ;;; cua-gmrk.el ends here