Mercurial > hg > xemacs-beta
comparison lisp/mouse.el @ 487:54fa1a5c2d12
[xemacs-hg @ 2001-04-28 07:48:36 by ben]
misc changes, some for 21.4
remove bogus lines setting zmacs_region_stays to 0.
remove debug lines.
Correct general info about init file.
Fix up Cygwin section.
More contributions.
Fix spurious setting of zmacs-region-stays to t after a non-shift
motion command.
Sync up with FSF 20.7, to fix bugs handling some etags line formats.
Move non-window-system specific code that was duplicated in
all window systems into the generic code.
* gutter.el (init-gutter): Removed. (unused)
Clean up the rectangle code w.r.t. selections. You'll now get
the right text copied into the primary selection (but not the
clipboard yet, unfortunately -- that really requires defining
our own rectangle type).
author | ben |
---|---|
date | Sat, 28 Apr 2001 07:48:46 +0000 |
parents | 52626a2f02ef |
children | 7039e6323819 |
comparison
equal
deleted
inserted
replaced
486:a83afd50994d | 487:54fa1a5c2d12 |
---|---|
1037 ;; would help guarantee success with the price that the | 1037 ;; would help guarantee success with the price that the |
1038 ;; delay would start to become noticeable. | 1038 ;; delay would start to become noticeable. |
1039 ;; | 1039 ;; |
1040 (and (eq (console-type) 'x) | 1040 (and (eq (console-type) 'x) |
1041 (sit-for 0.15 t)) | 1041 (sit-for 0.15 t)) |
1042 ;; zmacs-activate-region -> zmacs-activate-region-hook -> | |
1043 ;; activate-region-as-selection -> either own-selection or | |
1044 ;; mouse-track-activate-rectangular-selection | |
1042 (zmacs-activate-region))) | 1045 (zmacs-activate-region))) |
1043 ((console-on-window-system-p) | 1046 ((console-on-window-system-p) |
1047 ;; #### do we need this? we don't do it when zmacs-regions = t | |
1044 (if (= start end) | 1048 (if (= start end) |
1045 (disown-selection type) | 1049 (disown-selection type) |
1046 (if (consp default-mouse-track-extent) | 1050 (activate-region-as-selection)))) |
1047 ;; own the rectangular region | |
1048 ;; this is a hack | |
1049 (let ((r default-mouse-track-extent)) | |
1050 (save-excursion | |
1051 (set-buffer (get-buffer-create " *rect yank temp buf*")) | |
1052 (while r | |
1053 (insert (extent-string (car r)) "\n") | |
1054 (setq r (cdr r))) | |
1055 (own-selection (buffer-substring (point-min) (point-max))) | |
1056 (kill-buffer (current-buffer)))) | |
1057 (own-selection (cons (set-marker (make-marker) start) | |
1058 (set-marker (make-marker) end)) | |
1059 type))))) | |
1060 (if (and (eq 'x (console-type)) | 1051 (if (and (eq 'x (console-type)) |
1061 (not (= start end))) | 1052 (not (= start end))) |
1062 ;; I guess cutbuffers should do something with rectangles too. | 1053 ;; I guess cutbuffers should do something with rectangles too. |
1063 ;; does anybody use them? | 1054 ;; does anybody use them? |
1064 (x-store-cutbuffer (buffer-substring start end))))) | 1055 (x-store-cutbuffer (buffer-substring start end))))) |
1056 | |
1057 (defun mouse-track-activate-rectangular-selection () | |
1058 (if (consp default-mouse-track-extent) | |
1059 ;; own the rectangular region | |
1060 ;; this is a hack | |
1061 (let ((r default-mouse-track-extent)) | |
1062 (save-excursion | |
1063 (set-buffer (get-buffer-create " *rect yank temp buf*")) | |
1064 (erase-buffer) | |
1065 (while r | |
1066 (insert (extent-string (car r)) "\n") | |
1067 (setq r (cdr r))) | |
1068 (own-selection (buffer-substring (point-min) (point-max))))))) | |
1065 | 1069 |
1066 (defun default-mouse-track-deal-with-down-event (click-count) | 1070 (defun default-mouse-track-deal-with-down-event (click-count) |
1067 (let ((event default-mouse-track-down-event)) | 1071 (let ((event default-mouse-track-down-event)) |
1068 (if (null event) nil | 1072 (if (null event) nil |
1069 (select-frame (event-frame event)) | 1073 (select-frame (event-frame event)) |