(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))
(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
(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."
(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))
(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]
+ '(menu-item "sic" cua-insert-char-at-global-mark :filter cua--self-insert-char-p))
+
(define-key cua--global-mark-keymap [remap newline] 'cua-insert-newline-at-global-mark)
(define-key cua--global-mark-keymap [remap newline-and-indent] 'cua-insert-newline-at-global-mark)
(define-key cua--global-mark-keymap "\r" 'cua-insert-newline-at-global-mark)
(setq cua--global-mark-initialized t))
+;;; arch-tag: 553d8076-a91d-48ae-825d-6cb962a5f67f
;;; cua-gmrk.el ends here