diff options
| author | Eli Zaretskii | 2000-06-28 15:33:59 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2000-06-28 15:33:59 +0000 |
| commit | d0d57043ae8f74706953035008e5a90093715eeb (patch) | |
| tree | f539f7de3f0ee184c487c36e09016ea0d7cf6d34 | |
| parent | bf55e4150ffeb67977b7b84a016f2dfcfbe6efc9 (diff) | |
| download | emacs-d0d57043ae8f74706953035008e5a90093715eeb.tar.gz emacs-d0d57043ae8f74706953035008e5a90093715eeb.zip | |
(mouse-show-mark, mouse-save-then-kill): Don't use window-system.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/mouse.el | 107 |
2 files changed, 62 insertions, 55 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 081e140291e..57754105e4b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2000-06-28 Eli Zaretskii <eliz@is.elta.co.il> | ||
| 2 | |||
| 3 | * mouse.el (mouse-show-mark, mouse-save-then-kill): Don't use | ||
| 4 | window-system. | ||
| 5 | |||
| 6 | * man.el (Man-notify-when-ready): Don't use window-system. If | ||
| 7 | Man-notify-method is newframe, and the display is not | ||
| 8 | multi-frame, select the frame created for the man page. | ||
| 9 | (Man-init-defvars): Doc fix. | ||
| 10 | |||
| 1 | 2000-06-28 Gerd Moellmann <gerd@gnu.org> | 11 | 2000-06-28 Gerd Moellmann <gerd@gnu.org> |
| 2 | 12 | ||
| 3 | * replace.el (query-replace-map): Bind `e' like `E'. | 13 | * replace.el (query-replace-map): Bind `e' like `E'. |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 6896ff830c5..c67d22c158e 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -828,59 +828,57 @@ If DIR is positive skip forward; if negative, skip backward." | |||
| 828 | 828 | ||
| 829 | (defun mouse-show-mark () | 829 | (defun mouse-show-mark () |
| 830 | (if transient-mark-mode | 830 | (if transient-mark-mode |
| 831 | (if window-system | 831 | (delete-overlay mouse-drag-overlay) |
| 832 | (delete-overlay mouse-drag-overlay)) | 832 | (let ((inhibit-quit t) |
| 833 | (if window-system | 833 | (echo-keystrokes 0) |
| 834 | (let ((inhibit-quit t) | 834 | event events key ignore |
| 835 | (echo-keystrokes 0) | 835 | x-lost-selection-hooks) |
| 836 | event events key ignore | 836 | (add-hook 'x-lost-selection-hooks |
| 837 | x-lost-selection-hooks) | 837 | (lambda (seltype) |
| 838 | (add-hook 'x-lost-selection-hooks | 838 | (if (eq seltype 'PRIMARY) |
| 839 | (lambda (seltype) | 839 | (progn (setq ignore t) |
| 840 | (if (eq seltype 'PRIMARY) | 840 | (throw 'mouse-show-mark t))))) |
| 841 | (progn (setq ignore t) | 841 | (move-overlay mouse-drag-overlay (point) (mark t)) |
| 842 | (throw 'mouse-show-mark t))))) | 842 | (catch 'mouse-show-mark |
| 843 | (move-overlay mouse-drag-overlay (point) (mark t)) | 843 | ;; In this loop, execute scroll bar and switch-frame events. |
| 844 | (catch 'mouse-show-mark | 844 | ;; Also ignore down-events that are undefined. |
| 845 | ;; In this loop, execute scroll bar and switch-frame events. | 845 | (while (progn (setq event (read-event)) |
| 846 | ;; Also ignore down-events that are undefined. | 846 | (setq events (append events (list event))) |
| 847 | (while (progn (setq event (read-event)) | 847 | (setq key (apply 'vector events)) |
| 848 | (setq events (append events (list event))) | 848 | (or (and (consp event) |
| 849 | (setq key (apply 'vector events)) | 849 | (eq (car event) 'switch-frame)) |
| 850 | (or (and (consp event) | 850 | (and (consp event) |
| 851 | (eq (car event) 'switch-frame)) | 851 | (eq (posn-point (event-end event)) |
| 852 | (and (consp event) | 852 | 'vertical-scroll-bar)) |
| 853 | (eq (posn-point (event-end event)) | 853 | (and (memq 'down (event-modifiers event)) |
| 854 | 'vertical-scroll-bar)) | 854 | (not (key-binding key)) |
| 855 | (and (memq 'down (event-modifiers event)) | 855 | (not (mouse-undouble-last-event events)) |
| 856 | (not (key-binding key)) | 856 | (not (member key mouse-region-delete-keys))))) |
| 857 | (not (mouse-undouble-last-event events)) | 857 | (and (consp event) |
| 858 | (not (member key mouse-region-delete-keys))))) | 858 | (or (eq (car event) 'switch-frame) |
| 859 | (and (consp event) | 859 | (eq (posn-point (event-end event)) |
| 860 | (or (eq (car event) 'switch-frame) | 860 | 'vertical-scroll-bar)) |
| 861 | (eq (posn-point (event-end event)) | 861 | (let ((keys (vector 'vertical-scroll-bar event))) |
| 862 | 'vertical-scroll-bar)) | 862 | (and (key-binding keys) |
| 863 | (let ((keys (vector 'vertical-scroll-bar event))) | 863 | (progn |
| 864 | (and (key-binding keys) | 864 | (call-interactively (key-binding keys) |
| 865 | (progn | 865 | nil keys) |
| 866 | (call-interactively (key-binding keys) | 866 | (setq events nil))))))) |
| 867 | nil keys) | 867 | ;; If we lost the selection, just turn off the highlighting. |
| 868 | (setq events nil))))))) | 868 | (if ignore |
| 869 | ;; If we lost the selection, just turn off the highlighting. | 869 | nil |
| 870 | (if ignore | 870 | ;; For certain special keys, delete the region. |
| 871 | nil | 871 | (if (member key mouse-region-delete-keys) |
| 872 | ;; For certain special keys, delete the region. | 872 | (delete-region (overlay-start mouse-drag-overlay) |
| 873 | (if (member key mouse-region-delete-keys) | 873 | (overlay-end mouse-drag-overlay)) |
| 874 | (delete-region (overlay-start mouse-drag-overlay) | 874 | ;; Otherwise, unread the key so it gets executed normally. |
| 875 | (overlay-end mouse-drag-overlay)) | 875 | (setq unread-command-events |
| 876 | ;; Otherwise, unread the key so it gets executed normally. | 876 | (nconc events unread-command-events)))) |
| 877 | (setq unread-command-events | 877 | (setq quit-flag nil) |
| 878 | (nconc events unread-command-events)))) | 878 | (delete-overlay mouse-drag-overlay)) |
| 879 | (setq quit-flag nil) | 879 | (save-excursion |
| 880 | (delete-overlay mouse-drag-overlay)) | 880 | (goto-char (mark t)) |
| 881 | (save-excursion | 881 | (sit-for 1)))) |
| 882 | (goto-char (mark t)) | ||
| 883 | (sit-for 1))))) | ||
| 884 | 882 | ||
| 885 | (defun mouse-set-mark (click) | 883 | (defun mouse-set-mark (click) |
| 886 | "Set mark at the position clicked on with the mouse. | 884 | "Set mark at the position clicked on with the mouse. |
| @@ -1068,8 +1066,7 @@ If you do this twice in the same position, the selection is killed." | |||
| 1068 | (goto-char before-scroll)) | 1066 | (goto-char before-scroll)) |
| 1069 | (exchange-point-and-mark) | 1067 | (exchange-point-and-mark) |
| 1070 | (kill-new (buffer-substring (point) (mark t))) | 1068 | (kill-new (buffer-substring (point) (mark t))) |
| 1071 | (if window-system | 1069 | (mouse-show-mark)) |
| 1072 | (mouse-show-mark))) | ||
| 1073 | (mouse-set-region-1) | 1070 | (mouse-set-region-1) |
| 1074 | (setq mouse-save-then-kill-posn | 1071 | (setq mouse-save-then-kill-posn |
| 1075 | (list (car kill-ring) (point) click-posn))))))) | 1072 | (list (car kill-ring) (point) click-posn))))))) |