Mercurial > emacs
comparison lisp/emacs-lisp/lselect.el @ 90650:02cf29720f31
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 490-504)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 161-163)
- Update from CVS
- Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-130
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 07 Nov 2006 23:22:48 +0000 |
parents | c5406394f567 0ed577e1fa46 |
children | 6588c6259dfb |
comparison
equal
deleted
inserted
replaced
90649:d53934e7ddef | 90650:02cf29720f31 |
---|---|
189 | 189 |
190 (defun x-kill-primary-selection () | 190 (defun x-kill-primary-selection () |
191 "If there is a selection, delete the text it covers, and copy it to | 191 "If there is a selection, delete the text it covers, and copy it to |
192 both the kill ring and the Clipboard." | 192 both the kill ring and the Clipboard." |
193 (interactive) | 193 (interactive) |
194 (or (x-selection-owner-p) (error "emacs does not own the primary selection")) | 194 (or (x-selection-owner-p) (error "Emacs does not own the primary selection")) |
195 (setq last-command nil) | 195 (setq last-command nil) |
196 (or primary-selection-extent | 196 (or primary-selection-extent |
197 (error "the primary selection is not an extent?")) | 197 (error "the primary selection is not an extent?")) |
198 (save-excursion | 198 (save-excursion |
199 (set-buffer (extent-buffer primary-selection-extent)) | 199 (set-buffer (extent-buffer primary-selection-extent)) |
203 | 203 |
204 (defun x-delete-primary-selection () | 204 (defun x-delete-primary-selection () |
205 "If there is a selection, delete the text it covers *without* copying it to | 205 "If there is a selection, delete the text it covers *without* copying it to |
206 the kill ring or the Clipboard." | 206 the kill ring or the Clipboard." |
207 (interactive) | 207 (interactive) |
208 (or (x-selection-owner-p) (error "emacs does not own the primary selection")) | 208 (or (x-selection-owner-p) (error "Emacs does not own the primary selection")) |
209 (setq last-command nil) | 209 (setq last-command nil) |
210 (or primary-selection-extent | 210 (or primary-selection-extent |
211 (error "the primary selection is not an extent?")) | 211 (error "the primary selection is not an extent?")) |
212 (save-excursion | 212 (save-excursion |
213 (set-buffer (extent-buffer primary-selection-extent)) | 213 (set-buffer (extent-buffer primary-selection-extent)) |
217 | 217 |
218 (defun x-copy-primary-selection () | 218 (defun x-copy-primary-selection () |
219 "If there is a selection, copy it to both the kill ring and the Clipboard." | 219 "If there is a selection, copy it to both the kill ring and the Clipboard." |
220 (interactive) | 220 (interactive) |
221 (setq last-command nil) | 221 (setq last-command nil) |
222 (or (x-selection-owner-p) (error "emacs does not own the primary selection")) | 222 (or (x-selection-owner-p) (error "Emacs does not own the primary selection")) |
223 (or primary-selection-extent | 223 (or primary-selection-extent |
224 (error "the primary selection is not an extent?")) | 224 (error "the primary selection is not an extent?")) |
225 (save-excursion | 225 (save-excursion |
226 (set-buffer (extent-buffer primary-selection-extent)) | 226 (set-buffer (extent-buffer primary-selection-extent)) |
227 (copy-region-as-kill (extent-start-position primary-selection-extent) | 227 (copy-region-as-kill (extent-start-position primary-selection-extent) |