/[emacs]/emacs/lisp/emulation/cua-gmrk.el
ViewVC logotype

Diff of /emacs/lisp/emulation/cua-gmrk.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by kfstorm, Sat May 25 00:07:26 2002 UTC revision 1.3.2.1 by miles, Fri Apr 4 06:20:17 2003 UTC
# Line 33  Line 33 
33    (require 'cua-rect)    (require 'cua-rect)
34    )    )
35    
36  ;;; Global Marker  ;;; Global Marker
37    
38  ;; Non-nil when global marker is active.  ;; Non-nil when global marker is active.
39  (defvar cua--global-mark-active nil)  (defvar cua--global-mark-active nil)
# Line 72  Line 72 
72    (move-marker cua--global-mark-marker (point))    (move-marker cua--global-mark-marker (point))
73    (if (overlayp cua--global-mark-overlay)    (if (overlayp cua--global-mark-overlay)
74        (move-overlay cua--global-mark-overlay (point) (1+ (point)))        (move-overlay cua--global-mark-overlay (point) (1+ (point)))
75      (setq cua--global-mark-overlay      (setq cua--global-mark-overlay
76            (make-overlay (point) (1+ (point))))            (make-overlay (point) (1+ (point))))
77      (overlay-put cua--global-mark-overlay 'face 'cua-global-mark-face))      (overlay-put cua--global-mark-overlay 'face 'cua-global-mark-face))
78    (if (and cua-global-mark-blink-cursor-interval    (if (and cua-global-mark-blink-cursor-interval
79             (not cua--orig-blink-cursor-interval))             (not cua--orig-blink-cursor-interval))
80        (setq cua--orig-blink-cursor-interval blink-cursor-interval        (setq cua--orig-blink-cursor-interval blink-cursor-interval
81              blink-cursor-interval cua-global-mark-blink-cursor-interval))              blink-cursor-interval cua-global-mark-blink-cursor-interval))
82    (setq cua--global-mark-active t)    (setq cua--global-mark-active t)
83    (if msg    (if msg
# Line 325  With prefix argument, don't jump to glob Line 325  With prefix argument, don't jump to glob
325                (move-to-column col)                (move-to-column col)
326                (move-marker cua--global-mark-marker (point))                (move-marker cua--global-mark-marker (point))
327                (move-overlay cua--global-mark-overlay (point) (1+ (point))))))))                (move-overlay cua--global-mark-overlay (point) (1+ (point))))))))
328                
329    
330  (defun cua-cancel-global-mark ()  (defun cua-cancel-global-mark ()
331    "Cancel the global mark."    "Cancel the global mark."
# Line 346  With prefix argument, don't jump to glob Line 346  With prefix argument, don't jump to glob
346      (if (or (not (eq (current-buffer) (marker-buffer cua--global-mark-marker)))      (if (or (not (eq (current-buffer) (marker-buffer cua--global-mark-marker)))
347              (not (pos-visible-in-window-p (marker-position cua--global-mark-marker))))              (not (pos-visible-in-window-p (marker-position cua--global-mark-marker))))
348          (let ((w (selected-window)) (p (point)) h)          (let ((w (selected-window)) (p (point)) h)
349            ;; 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
350            ;; other window -- but it doesn't work.            ;; other window -- but it doesn't work.
351            (switch-to-buffer-other-window (marker-buffer cua--global-mark-marker) t)            (switch-to-buffer-other-window (marker-buffer cua--global-mark-marker) t)
352            (goto-char (marker-position cua--global-mark-marker))            (goto-char (marker-position cua--global-mark-marker))

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.3.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26