David Reitter <[EMAIL PROTECTED]> writes: > Wouldn't it be a better solution to make sure clipboard-kill-ring-save > and clipboard-yank respect cua-mode?
Well, cua-mode is optional, so it must try to respect clipboard- commands, not the other way round. Can you try this patch: *** cua-base.el 02 May 2005 12:07:09 +0200 1.48 --- cua-base.el 03 May 2005 13:38:03 +0200 *************** *** 777,785 **** (let ((start (mark)) (end (point))) (or (<= start end) (setq start (prog1 end (setq end start)))) ! (if cua--register ! (copy-to-register cua--register start end nil) ! (copy-region-as-kill start end)) (if cua-keep-region-after-copy (cua--keep-active) (cua--deactivate)))) --- 777,789 ---- (let ((start (mark)) (end (point))) (or (<= start end) (setq start (prog1 end (setq end start)))) ! (cond ! (cua--register ! (copy-to-register cua--register start end nil)) ! ((eq this-original-command 'clipboard-kill-ring-save) ! (clipboard-kill-ring-save start end)) ! (t ! (copy-region-as-kill start end))) (if cua-keep-region-after-copy (cua--keep-active) (cua--deactivate)))) *************** *** 795,803 **** (let ((start (mark)) (end (point))) (or (<= start end) (setq start (prog1 end (setq end start)))) ! (if cua--register ! (copy-to-register cua--register start end t) ! (kill-region start end))) (cua--deactivate))) ;;; Generic commands for regions, rectangles, and global marks --- 799,811 ---- (let ((start (mark)) (end (point))) (or (<= start end) (setq start (prog1 end (setq end start)))) ! (cond ! (cua--register ! (copy-to-register cua--register start end t)) ! ((eq this-original-command 'clipboard-kill-region) ! (clipboard-kill-region start end)) ! (t ! (kill-region start end)))) (cua--deactivate))) ;;; Generic commands for regions, rectangles, and global marks *************** *** 864,869 **** --- 872,879 ---- (cua--insert-rectangle (cdr cua--last-killed-rectangle) nil paste-column paste-lines) (if arg (goto-char pt)))) + ((eq this-original-command 'clipboard-yank) + (clipboard-yank)) (t (yank arg))))))) (defun cua-paste-pop (arg) *************** *** 1282,1290 **** --- 1292,1302 ---- (define-key cua--region-keymap [remap delete-char] 'cua-delete-region) ;; kill region (define-key cua--region-keymap [remap kill-region] 'cua-cut-region) + (define-key cua--region-keymap [remap clipboard-kill-region] 'cua-cut-region) ;; copy region (define-key cua--region-keymap [remap copy-region-as-kill] 'cua-copy-region) (define-key cua--region-keymap [remap kill-ring-save] 'cua-copy-region) + (define-key cua--region-keymap [remap clipboard-kill-ring-save] 'cua-copy-region) ;; cancel current region/rectangle (define-key cua--region-keymap [remap keyboard-escape-quit] 'cua-cancel) (define-key cua--region-keymap [remap keyboard-quit] 'cua-cancel) -- Kim F. Storm <[EMAIL PROTECTED]> http://www.cua.dk _______________________________________________ Emacs-pretest-bug mailing list Emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug