Mercurial > emacs
comparison lisp/emulation/cua-gmrk.el @ 105829:328150f0cf76
* url-util.el (url-insert-entities-in-string):
* url-nfs.el (url-nfs-unescape):
* url-ldap.el (url-ldap):
* url-imap.el (url-imap):
* url-cid.el (url-cid-gnus, url-cid): Use with-current-buffer.
* erc.el (erc-display-line-1, erc-process-away):
* erc-truncate.el (erc-truncate-buffer-to-size):
Use with-current-buffer.
* term/ns-win.el (ns-scroll-bar-move, ns-face-at-pos):
* play/mpuz.el (mpuz-create-buffer):
* play/landmark.el (lm-prompt-for-move, lm-print-wts, lm-print-smell)
(lm-print-y,s,noise, lm-print-w0, lm-init):
* play/gomoku.el (gomoku-prompt-for-move):
* play/fortune.el (fortune-in-buffer):
* play/dissociate.el (dissociated-press):
* play/decipher.el (decipher-adjacency-list, decipher-display-regexp)
(decipher-analyze-buffer, decipher-stats-buffer,decipher-stats-buffer):
* mail/supercite.el (sc-eref-show):
* mail/smtpmail.el (smtpmail-send-it):
* mail/rmailsum.el (rmail-summary-next-labeled-message)
(rmail-summary-previous-labeled-message, rmail-summary-wipe)
(rmail-summary-undelete-many, rmail-summary-rmail-update)
(rmail-summary-goto-msg, rmail-summary-expunge)
(rmail-summary-get-new-mail, rmail-summary-search-backward)
(rmail-summary-add-label, rmail-summary-output-menu)
(rmail-summary-output-body):
* mail/rfc822.el (rfc822-addresses):
* mail/reporter.el (reporter-dump-variable, reporter-dump-state):
* mail/mailpost.el (post-mail-send-it):
* mail/hashcash.el (hashcash-generate-payment):
* mail/feedmail.el (feedmail-run-the-queue)
(feedmail-queue-send-edit-prompt-help-first)
(feedmail-send-it-immediately, feedmail-give-it-to-buffer-eater)
(feedmail-deduce-address-list):
* eshell/esh-ext.el (eshell-remote-command):
* eshell/em-unix.el (eshell-occur-mode-mouse-goto):
* emulation/viper-util.el (viper-glob-unix-files, viper-save-setting)
(viper-wildcard-to-regexp, viper-glob-mswindows-files)
(viper-save-string-in-file, viper-valid-marker):
* emulation/viper-keym.el (viper-toggle-key):
* emulation/viper-ex.el (ex-expand-filsyms, viper-get-ex-file)
(ex-edit, ex-global, ex-mark, ex-next-related-buffer, ex-quit)
(ex-get-inline-cmd-args, ex-tag, ex-command, ex-compile):
* emulation/viper-cmd.el (viper-exec-form-in-vi)
(viper-exec-form-in-emacs, viper-brac-function):
* emulation/viper.el (viper-delocalize-var):
* emulation/vip.el (vip-mode, vip-get-ex-token, vip-ex, vip-get-ex-pat)
(vip-get-ex-command, vip-get-ex-opt-gc, vip-get-ex-buffer)
(vip-get-ex-count, vip-get-ex-file, ex-edit, ex-global, ex-mark)
(ex-map, ex-unmap, ex-quit, ex-read, ex-tag, ex-command):
* emulation/vi.el (vi-switch-mode, vi-ex-cmd):
* emulation/edt.el (edt-electric-helpify):
* emulation/cua-rect.el (cua--rectangle-aux-replace):
* emulation/cua-gmrk.el (cua--insert-at-global-mark)
(cua--delete-at-global-mark, cua--copy-rectangle-to-global-mark)
(cua-indent-to-global-mark-column):
* calendar/diary-lib.el (calendar-mark-1):
* calendar/cal-hebrew.el (calendar-hebrew-mark-date-pattern):
Use with-current-buffer.
* emulation/viper.el (viper-delocalize-var): Use dolist.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 03 Nov 2009 02:04:29 +0000 |
parents | a9dc0e7c3f2b |
children | 1d1d5d9bd884 |
comparison
equal
deleted
inserted
replaced
105828:3d8945f5688d | 105829:328150f0cf76 |
---|---|
108 (goto-char cua--global-mark-marker)) | 108 (goto-char cua--global-mark-marker)) |
109 (cua--deactivate-global-mark t))) | 109 (cua--deactivate-global-mark t))) |
110 | 110 |
111 (defun cua--insert-at-global-mark (str &optional msg) | 111 (defun cua--insert-at-global-mark (str &optional msg) |
112 ;; Insert string at global marker and move marker | 112 ;; Insert string at global marker and move marker |
113 (save-excursion | 113 (with-current-buffer (marker-buffer cua--global-mark-marker) |
114 (set-buffer (marker-buffer cua--global-mark-marker)) | |
115 (goto-char (marker-position cua--global-mark-marker)) | 114 (goto-char (marker-position cua--global-mark-marker)) |
116 (insert-for-yank str) | 115 (insert-for-yank str) |
117 (cua--activate-global-mark)) | 116 (cua--activate-global-mark)) |
118 (if msg | 117 (if msg |
119 (message "%s %d to global mark in %s:%d" msg | 118 (message "%s %d to global mark in %s:%d" msg |
121 (buffer-name (marker-buffer cua--global-mark-marker)) | 120 (buffer-name (marker-buffer cua--global-mark-marker)) |
122 (marker-position cua--global-mark-marker)))) | 121 (marker-position cua--global-mark-marker)))) |
123 | 122 |
124 (defun cua--delete-at-global-mark (arg &optional msg) | 123 (defun cua--delete-at-global-mark (arg &optional msg) |
125 ;; Delete chars at global marker | 124 ;; Delete chars at global marker |
126 (save-excursion | 125 (with-current-buffer (marker-buffer cua--global-mark-marker) |
127 (set-buffer (marker-buffer cua--global-mark-marker)) | |
128 (goto-char (marker-position cua--global-mark-marker)) | 126 (goto-char (marker-position cua--global-mark-marker)) |
129 (delete-char arg)) | 127 (delete-char arg)) |
130 (if msg | 128 (if msg |
131 (message "%s %d chars at global mark in %s:%d" msg arg | 129 (message "%s %d chars at global mark in %s:%d" msg arg |
132 (buffer-name (marker-buffer cua--global-mark-marker)) | 130 (buffer-name (marker-buffer cua--global-mark-marker)) |
188 (defun cua--copy-rectangle-to-global-mark (as-text) | 186 (defun cua--copy-rectangle-to-global-mark (as-text) |
189 ;; Copy rectangle to global mark buffer/position. | 187 ;; Copy rectangle to global mark buffer/position. |
190 (if (cua--global-mark-active) | 188 (if (cua--global-mark-active) |
191 (let ((src-buf (current-buffer)) | 189 (let ((src-buf (current-buffer)) |
192 (text (cua--extract-rectangle))) | 190 (text (cua--extract-rectangle))) |
193 (save-excursion | 191 (with-current-buffer (marker-buffer cua--global-mark-marker) |
194 (set-buffer (marker-buffer cua--global-mark-marker)) | |
195 (goto-char (marker-position cua--global-mark-marker)) | 192 (goto-char (marker-position cua--global-mark-marker)) |
196 (if as-text | 193 (if as-text |
197 (while text | 194 (while text |
198 (insert-for-yank (car text)) | 195 (insert-for-yank (car text)) |
199 (if (setq text (cdr text)) | 196 (if (setq text (cdr text)) |
307 (defun cua-indent-to-global-mark-column () | 304 (defun cua-indent-to-global-mark-column () |
308 "Indent current line or rectangle to global mark column." | 305 "Indent current line or rectangle to global mark column." |
309 (interactive "*") | 306 (interactive "*") |
310 (if (cua--global-mark-active) | 307 (if (cua--global-mark-active) |
311 (let (col) | 308 (let (col) |
312 (save-excursion | 309 (with-current-buffer (marker-buffer cua--global-mark-marker) |
313 (set-buffer (marker-buffer cua--global-mark-marker)) | |
314 (goto-char (marker-position cua--global-mark-marker)) | 310 (goto-char (marker-position cua--global-mark-marker)) |
315 (setq col (current-column))) | 311 (setq col (current-column))) |
316 (if cua--rectangle | 312 (if cua--rectangle |
317 (cua--indent-rectangle nil col t) | 313 (cua--indent-rectangle nil col t) |
318 (indent-to col)) | 314 (indent-to col)) |