comparison lisp/emulation/cua-rect.el @ 90375:e6bf73e43cf4

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-49 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 164-184) - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: man/mh-e.texi (Folders): Various edits. - Update from erc--emacs--0 * gnus--rel--5.10 (patch 62-70) - Merge from emacs--devo--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Tue, 28 Mar 2006 23:08:20 +0000
parents c5406394f567 5f7de9821aeb
children c156f6a9e7b5
comparison
equal deleted inserted replaced
90374:cf65b3d033bb 90375:e6bf73e43cf4
797 (make-string 797 (make-string
798 (- r l) 798 (- r l)
799 (if cua--virtual-edges-debug ?, ?\s)) 799 (if cua--virtual-edges-debug ?, ?\s))
800 'face rface)) 800 'face rface))
801 (if (cua--rectangle-right-side) 801 (if (cua--rectangle-right-side)
802 (put-text-property (1- (length ms)) (length ms) 'cursor t ms) 802 (put-text-property (1- (length ms)) (length ms) 'cursor 2 ms)
803 (put-text-property 0 1 'cursor t ms)) 803 (put-text-property 0 1 'cursor 2 ms))
804 (setq bs (concat bs ms)) 804 (setq bs (concat bs ms))
805 (setq rface nil)) 805 (setq rface nil))
806 (t 806 (t
807 (setq as (propertize 807 (setq as (propertize
808 (make-string 808 (make-string
809 (- r cr0 (if (= le pr) 1 0)) 809 (- r cr0 (if (= le pr) 1 0))
810 (if cua--virtual-edges-debug ?~ ?\s)) 810 (if cua--virtual-edges-debug ?~ ?\s))
811 'face rface)) 811 'face rface))
812 (if (cua--rectangle-right-side) 812 (if (cua--rectangle-right-side)
813 (put-text-property (1- (length as)) (length as) 'cursor t as) 813 (put-text-property (1- (length as)) (length as) 'cursor 2 as)
814 (put-text-property 0 1 'cursor t as)) 814 (put-text-property 0 1 'cursor 2 as))
815 (if (/= pr le) 815 (if (/= pr le)
816 (setq e (1- e)))))))) 816 (setq e (1- e))))))))
817 ;; Trim old leading overlays. 817 ;; Trim old leading overlays.
818 (while (and old 818 (while (and old
819 (setq overlay (car old)) 819 (setq overlay (car old))
1411 1411
1412 (defun cua--rect-M/H-key (key cmd) 1412 (defun cua--rect-M/H-key (key cmd)
1413 (cua--M/H-key cua--rectangle-keymap key cmd)) 1413 (cua--M/H-key cua--rectangle-keymap key cmd))
1414 1414
1415 (defun cua--init-rectangles () 1415 (defun cua--init-rectangles ()
1416 (define-key cua--rectangle-keymap [(control return)] 'cua-clear-rectangle-mark) 1416 (define-key cua--rectangle-keymap cua-rectangle-mark-key 'cua-clear-rectangle-mark)
1417 (define-key cua--region-keymap [(control return)] 'cua-toggle-rectangle-mark) 1417 (define-key cua--region-keymap cua-rectangle-mark-key 'cua-toggle-rectangle-mark)
1418 (unless (eq cua--rectangle-modifier-key 'meta) 1418 (unless (eq cua--rectangle-modifier-key 'meta)
1419 (cua--rect-M/H-key ?\s 'cua-clear-rectangle-mark) 1419 (cua--rect-M/H-key ?\s 'cua-clear-rectangle-mark)
1420 (cua--M/H-key cua--region-keymap ?\s 'cua-toggle-rectangle-mark)) 1420 (cua--M/H-key cua--region-keymap ?\s 'cua-toggle-rectangle-mark))
1421 1421
1422 (define-key cua--rectangle-keymap [remap copy-region-as-kill] 'cua-copy-rectangle) 1422 (define-key cua--rectangle-keymap [remap copy-region-as-kill] 'cua-copy-rectangle)