Mercurial > hg > xemacs-beta
comparison lisp/vm/vm-mouse.el @ 126:1370575f1259 xemacs-20-1p1
Import from CVS: tag xemacs-20-1p1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:27:39 +0200 |
parents | cca96a509cfe |
children | b980b6286996 |
comparison
equal
deleted
inserted
replaced
125:8b0638b347ec | 126:1370575f1259 |
---|---|
88 (set-buffer (window-buffer (event-window event))) | 88 (set-buffer (window-buffer (event-window event))) |
89 (and (event-point event) (goto-char (event-point event)))) | 89 (and (event-point event) (goto-char (event-point event)))) |
90 ((vm-mouse-fsfemacs-mouse-p) | 90 ((vm-mouse-fsfemacs-mouse-p) |
91 (set-buffer (window-buffer (posn-window (event-start event)))) | 91 (set-buffer (window-buffer (posn-window (event-start event)))) |
92 (goto-char (posn-point (event-start event))))) | 92 (goto-char (posn-point (event-start event))))) |
93 (cond ((fboundp 'overlays-at) | 93 (cond (vm-fsfemacs-19-p |
94 (let ((o-list (overlays-at (point))) | 94 (let ((o-list (overlays-at (point))) |
95 (string nil)) | 95 (string nil)) |
96 (while o-list | 96 (while o-list |
97 (if (overlay-get (car o-list) 'mouse-face) | 97 (if (overlay-get (car o-list) 'mouse-face) |
98 (setq string (vm-buffer-substring-no-properties | 98 (setq string (vm-buffer-substring-no-properties |
99 (overlay-start (car o-list)) | 99 (overlay-start (car o-list)) |
100 (overlay-end (car o-list))) | 100 (overlay-end (car o-list))) |
101 o-list nil) | 101 o-list nil) |
102 (setq o-list (cdr o-list)))) | 102 (setq o-list (cdr o-list)))) |
103 string )) | 103 string )) |
104 ((fboundp 'extent-at) | 104 (vm-xemacs-p |
105 (let ((e (extent-at (point) nil 'highlight))) | 105 (let ((e (extent-at (point) nil 'highlight))) |
106 (if e | 106 (if e |
107 (buffer-substring (extent-start-position e) | 107 (buffer-substring (extent-start-position e) |
108 (extent-end-position e)) | 108 (extent-end-position e)) |
109 nil))) | 109 nil))) |
199 ")")) | 199 ")")) |
200 vm-netscape-program-switches))) | 200 vm-netscape-program-switches))) |
201 (vm-mouse-send-url-to-netscape url t new-window))) | 201 (vm-mouse-send-url-to-netscape url t new-window))) |
202 (message "Sending URL to Netscape... done")) | 202 (message "Sending URL to Netscape... done")) |
203 | 203 |
204 (defun vm-mouse-send-url-to-netscape-new-window (url) | |
205 (vm-mouse-send-url-to-netscape url nil t)) | |
206 | |
204 (defun vm-mouse-send-url-to-mosaic (url &optional new-mosaic new-window) | 207 (defun vm-mouse-send-url-to-mosaic (url &optional new-mosaic new-window) |
205 (message "Sending URL to Mosaic...") | 208 (message "Sending URL to Mosaic...") |
206 (if (null new-mosaic) | 209 (if (null new-mosaic) |
207 (let ((pid-file "~/.mosaicpid") | 210 (let ((pid-file "~/.mosaicpid") |
208 (work-buffer " *mosaic work*") | 211 (work-buffer " *mosaic work*") |
230 (setq new-mosaic t))))) | 233 (setq new-mosaic t))))) |
231 (if new-mosaic | 234 (if new-mosaic |
232 (apply 'vm-run-background-command vm-mosaic-program | 235 (apply 'vm-run-background-command vm-mosaic-program |
233 (append vm-mosaic-program-switches (list url)))) | 236 (append vm-mosaic-program-switches (list url)))) |
234 (message "Sending URL to Mosaic... done")) | 237 (message "Sending URL to Mosaic... done")) |
238 | |
239 (defun vm-mouse-send-url-to-mosaic-new-window (url) | |
240 (vm-mouse-send-url-to-mosaic url nil t)) | |
235 | 241 |
236 (defun vm-mouse-install-mouse () | 242 (defun vm-mouse-install-mouse () |
237 (cond ((vm-mouse-xemacs-mouse-p) | 243 (cond ((vm-mouse-xemacs-mouse-p) |
238 (if (null (lookup-key vm-mode-map 'button2)) | 244 (if (null (lookup-key vm-mode-map 'button2)) |
239 (define-key vm-mode-map 'button2 'vm-mouse-button-2))) | 245 (define-key vm-mode-map 'button2 'vm-mouse-button-2))) |