:type 'boolean
:group 'cua)
-(defface cua-rectangle-face
+(defface cua-rectangle
'((default :inherit region)
(((class color)) :foreground "white" :background "maroon"))
"*Font used by CUA for highlighting the rectangle."
:group 'cua)
-(defface cua-rectangle-noselect-face
+(defface cua-rectangle-noselect
'((default :inherit region)
(((class color)) :foreground "white" :background "dimgray"))
"*Font used by CUA for highlighting the non-selected rectangle lines."
:type 'boolean
:group 'cua)
-(defface cua-global-mark-face
+(defface cua-global-mark
'((((min-colors 88)(class color)) :foreground "black" :background "yellow1")
(((class color)) :foreground "black" :background "yellow")
(t :bold t))
(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
(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
;;; 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)
(sit-for 0) ; make window top/bottom reliable
(cua--rectangle-operation nil t nil nil nil ; do not tabify
'(lambda (s e l r v)
- (let ((rface (if v 'cua-rectangle-face 'cua-rectangle-noselect-face))
+ (let ((rface (if v 'cua-rectangle 'cua-rectangle-noselect))
overlay bs ms as)
(when (cua--rectangle-virtual-edges)
(let ((lb (line-beginning-position))