Mercurial > emacs
comparison lisp/dired.el @ 44764:2e019a1ff633
(dired-mouse-find-file-other-window):
Handle events that move out of the window.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 23 Apr 2002 03:14:41 +0000 |
parents | 9cab12e7e72a |
children | 578cda58219f |
comparison
equal
deleted
inserted
replaced
44763:f6ac4d8b01cd | 44764:2e019a1ff633 |
---|---|
1362 (find-alternate-file (dired-get-file-for-visit))) | 1362 (find-alternate-file (dired-get-file-for-visit))) |
1363 | 1363 |
1364 (defun dired-mouse-find-file-other-window (event) | 1364 (defun dired-mouse-find-file-other-window (event) |
1365 "In Dired, visit the file or directory name you click on." | 1365 "In Dired, visit the file or directory name you click on." |
1366 (interactive "e") | 1366 (interactive "e") |
1367 (let (file) | 1367 (let (window pos file) |
1368 (save-excursion | 1368 (save-excursion |
1369 (set-buffer (window-buffer (posn-window (event-end event)))) | 1369 (setq window (posn-window (event-end event)) |
1370 (save-excursion | 1370 pos (posn-point (event-end event))) |
1371 (goto-char (posn-point (event-end event))) | 1371 (if (not (windowp window)) |
1372 (setq file (dired-get-file-for-visit)))) | 1372 (error "No file chosen")) |
1373 (select-window (posn-window (event-end event))) | 1373 (set-buffer (window-buffer window)) |
1374 (goto-char pos) | |
1375 (setq file (dired-get-file-for-visit))) | |
1376 (select-window window) | |
1374 (find-file-other-window (file-name-sans-versions file t)))) | 1377 (find-file-other-window (file-name-sans-versions file t)))) |
1375 | 1378 |
1376 (defcustom dired-view-command-alist | 1379 (defcustom dired-view-command-alist |
1377 '(("[.]ps\\'" . "gv -spartan -color -watch") | 1380 '(("[.]ps\\'" . "gv -spartan -color -watch") |
1378 ("[.]pdf\\'" . "xpdf") | 1381 ("[.]pdf\\'" . "xpdf") |
3004 If FILE is a symbolic link and the optional argument DEREF-SYMLINKS is | 3007 If FILE is a symbolic link and the optional argument DEREF-SYMLINKS is |
3005 true then the type of the file linked to by FILE is printed instead." | 3008 true then the type of the file linked to by FILE is printed instead." |
3006 t) | 3009 t) |
3007 | 3010 |
3008 (autoload 'dired-run-shell-command "dired-aux") | 3011 (autoload 'dired-run-shell-command "dired-aux") |
3012 | |
3013 (autoload 'dired-query "dired-aux") | |
3009 | 3014 |
3010 (if (eq system-type 'vax-vms) | 3015 (if (eq system-type 'vax-vms) |
3011 (load "dired-vms")) | 3016 (load "dired-vms")) |
3012 | 3017 |
3013 (provide 'dired) | 3018 (provide 'dired) |