Mercurial > emacs
comparison lisp/emulation/cua-gmrk.el @ 63073:f1bf3660220e
* emulation/cua-base.el (cua-rectangle, cua-rectangle-noselect)
(cua-global-mark): Remove -face suffix from face names.
* emulation/cua-gmrk.el (cua--init-global-mark): Remove
cua-global-mark face setup.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Mon, 06 Jun 2005 13:19:15 +0000 |
parents | 695cf19ef79e |
children | 66f83ad1a264 173dee4e2611 |
comparison
equal
deleted
inserted
replaced
63072:87dd39e3ec4e | 63073:f1bf3660220e |
---|---|
72 (move-marker cua--global-mark-marker (point)) | 72 (move-marker cua--global-mark-marker (point)) |
73 (if (overlayp cua--global-mark-overlay) | 73 (if (overlayp cua--global-mark-overlay) |
74 (move-overlay cua--global-mark-overlay (point) (1+ (point))) | 74 (move-overlay cua--global-mark-overlay (point) (1+ (point))) |
75 (setq cua--global-mark-overlay | 75 (setq cua--global-mark-overlay |
76 (make-overlay (point) (1+ (point)))) | 76 (make-overlay (point) (1+ (point)))) |
77 (overlay-put cua--global-mark-overlay 'face 'cua-global-mark-face)) | 77 (overlay-put cua--global-mark-overlay 'face 'cua-global-mark)) |
78 (if (and cua-global-mark-blink-cursor-interval | 78 (if (and cua-global-mark-blink-cursor-interval |
79 (not cua--orig-blink-cursor-interval)) | 79 (not cua--orig-blink-cursor-interval)) |
80 (setq cua--orig-blink-cursor-interval blink-cursor-interval | 80 (setq cua--orig-blink-cursor-interval blink-cursor-interval |
81 blink-cursor-interval cua-global-mark-blink-cursor-interval)) | 81 blink-cursor-interval cua-global-mark-blink-cursor-interval)) |
82 (setq cua--global-mark-active t) | 82 (setq cua--global-mark-active t) |
216 (save-excursion | 216 (save-excursion |
217 (if (equal (marker-buffer cua--global-mark-marker) src-buf) | 217 (if (equal (marker-buffer cua--global-mark-marker) src-buf) |
218 (let ((olist (overlays-at (marker-position cua--global-mark-marker))) | 218 (let ((olist (overlays-at (marker-position cua--global-mark-marker))) |
219 in-rect) | 219 in-rect) |
220 (while olist | 220 (while olist |
221 (if (eq (overlay-get (car olist) 'face) 'cua-rectangle-face) | 221 (if (eq (overlay-get (car olist) 'face) 'cua-rectangle) |
222 (setq in-rect t olist nil) | 222 (setq in-rect t olist nil) |
223 (setq olist (cdr olist)))) | 223 (setq olist (cdr olist)))) |
224 (if in-rect | 224 (if in-rect |
225 (message "Can't move rectangle into itself.") | 225 (message "Can't move rectangle into itself.") |
226 (let ((text (cua--extract-rectangle))) | 226 (let ((text (cua--extract-rectangle))) |
356 (goto-char p))))) | 356 (goto-char p))))) |
357 | 357 |
358 ;;; Initialization | 358 ;;; Initialization |
359 | 359 |
360 (defun cua--init-global-mark () | 360 (defun cua--init-global-mark () |
361 (unless (face-background 'cua-global-mark-face) | |
362 (copy-face 'region 'cua-global-mark-face) | |
363 (set-face-foreground 'cua-global-mark-face "black") | |
364 (set-face-background 'cua-global-mark-face "cyan")) | |
365 | |
366 (define-key cua--global-mark-keymap [remap copy-region-as-kill] 'cua-copy-to-global-mark) | 361 (define-key cua--global-mark-keymap [remap copy-region-as-kill] 'cua-copy-to-global-mark) |
367 (define-key cua--global-mark-keymap [remap kill-ring-save] 'cua-copy-to-global-mark) | 362 (define-key cua--global-mark-keymap [remap kill-ring-save] 'cua-copy-to-global-mark) |
368 (define-key cua--global-mark-keymap [remap kill-region] 'cua-cut-to-global-mark) | 363 (define-key cua--global-mark-keymap [remap kill-region] 'cua-cut-to-global-mark) |
369 (define-key cua--global-mark-keymap [remap yank] 'cua-copy-next-to-global-mark) | 364 (define-key cua--global-mark-keymap [remap yank] 'cua-copy-next-to-global-mark) |
370 | 365 |