• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/emulation/

Lines Matching +defs:copy +defs:marker

21 ;; You should have received a copy of the GNU General Public License
39 ;; Non-nil when global marker is active.
42 ;; Global mark position marker.
43 (defvar cua--global-mark-marker nil)
58 (if (markerp cua--global-mark-marker)
59 (move-marker cua--global-mark-marker nil))
68 (if (not (markerp cua--global-mark-marker))
69 (setq cua--global-mark-marker (make-marker)))
73 (move-marker cua--global-mark-marker (point))
89 (or (and (markerp cua--global-mark-marker)
90 (marker-buffer cua--global-mark-marker))
95 "Set or cancel the global marker.
96 When the global marker is set, CUA cut and copy commands will automatically
97 insert the deleted or copied text before the global marker, even when the
98 global marker is in another buffer.
99 If the global marker isn't set, set the global marker at point in the current
100 buffer. Otherwise jump to the global marker position and cancel it.
111 (pop-to-buffer (marker-buffer cua--global-mark-marker))
112 (goto-char cua--global-mark-marker))
116 ;; Insert string at global marker and move marker
118 (set-buffer (marker-buffer cua--global-mark-marker))
119 (goto-char (marker-position cua--global-mark-marker))
125 (buffer-name (marker-buffer cua--global-mark-marker))
126 (marker-position cua--global-mark-marker))))
129 ;; Delete chars at global marker
131 (set-buffer (marker-buffer cua--global-mark-marker))
132 (goto-char (marker-position cua--global-mark-marker))
136 (buffer-name (marker-buffer cua--global-mark-marker))
137 (marker-position cua--global-mark-marker))))
139 (defun cua-copy-region-to-global-mark (start end)
145 (if (equal (marker-buffer cua--global-mark-marker) src-buf)
147 (goto-char (marker-position cua--global-mark-marker))
149 (set-buffer (marker-buffer cua--global-mark-marker))
150 (goto-char (marker-position cua--global-mark-marker))
155 (buffer-name (marker-buffer cua--global-mark-marker))
156 (marker-position cua--global-mark-marker))))
166 (if (equal (marker-buffer cua--global-mark-marker) src-buf)
167 (if (and (< start (marker-position cua--global-mark-marker))
168 (< (marker-position cua--global-mark-marker) end))
171 (p1 (copy-marker start))
172 (p2 (copy-marker end)))
173 (goto-char (marker-position cua--global-mark-marker))
176 (delete-region (marker-position p1) (marker-position p2))
177 (move-marker p1 nil)
178 (move-marker p2 nil)))
179 (set-buffer (marker-buffer cua--global-mark-marker))
180 (goto-char (marker-position cua--global-mark-marker))
184 (buffer-name (marker-buffer cua--global-mark-marker))
185 (marker-position cua--global-mark-marker))
192 (defun cua--copy-rectangle-to-global-mark (as-text)
198 (set-buffer (marker-buffer cua--global-mark-marker))
199 (goto-char (marker-position cua--global-mark-marker))
208 (buffer-name (marker-buffer cua--global-mark-marker))
209 (marker-position cua--global-mark-marker))))
218 (if (equal (marker-buffer cua--global-mark-marker) src-buf)
219 (let ((olist (overlays-at (marker-position cua--global-mark-marker)))
229 (goto-char (marker-position cua--global-mark-marker))
239 (set-buffer (marker-buffer cua--global-mark-marker))
240 (goto-char (marker-position cua--global-mark-marker))
243 (buffer-name (marker-buffer cua--global-mark-marker))
244 (marker-position cua--global-mark-marker))
249 (defun cua-copy-to-global-mark ()
254 (cua--copy-rectangle-to-global-mark nil)
258 (cua-copy-region-to-global-mark start end))))
260 (defun cua-copy-next-to-global-mark (n)
267 (cua-copy-region-to-global-mark p (point)))))
273 (cua-copy-to-global-mark)
317 (set-buffer (marker-buffer cua--global-mark-marker))
318 (goto-char (marker-position cua--global-mark-marker))
323 (if (eq (current-buffer) (marker-buffer cua--global-mark-marker))
325 (goto-char (marker-position cua--global-mark-marker))
327 (move-marker cua--global-mark-marker (point))
347 (if (or (not (eq (current-buffer) (marker-buffer cua--global-mark-marker)))
348 (not (pos-visible-in-window-p (marker-position cua--global-mark-marker))))
352 (switch-to-buffer-other-window (marker-buffer cua--global-mark-marker) t)
353 (goto-char (marker-position cua--global-mark-marker))
354 (if (not (pos-visible-in-window-p (marker-position cua--global-mark-marker)))
362 (define-key cua--global-mark-keymap [remap copy-region-as-kill] 'cua-copy-to-global-mark)
363 (define-key cua--global-mark-keymap [remap kill-ring-save] 'cua-copy-to-global-mark)
365 (define-key cua--global-mark-keymap [remap yank] 'cua-copy-next-to-global-mark)