Mercurial > hg > xemacs-beta
comparison lisp/efs/dired.el @ 179:9ad43877534d r20-3b16
Import from CVS: tag r20-3b16
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:52:19 +0200 |
parents | 15872534500d |
children | bfd6434d15b3 |
comparison
equal
deleted
inserted
replaced
178:e703507b8a00 | 179:9ad43877534d |
---|---|
2829 (if (file-directory-p file) | 2829 (if (file-directory-p file) |
2830 (or (dired-goto-subdir file) | 2830 (or (dired-goto-subdir file) |
2831 (dired file)) | 2831 (dired file)) |
2832 (view-file file)))) | 2832 (view-file file)))) |
2833 | 2833 |
2834 (defun dired-find-file-other-window (&optional display) | 2834 (defun dired-find-file-other-window (&optional displayp) |
2835 "In dired, visit this file or directory in another window. | 2835 "In dired, visit this file or directory in another window. |
2836 With a prefix, the file is displayed, but the window is not selected." | 2836 With a prefix, the file is displayed, but the window is not selected." |
2837 (interactive "P") | 2837 (interactive "P") |
2838 (if display | 2838 (if displayp |
2839 (dired-display-file) | 2839 (dired-display-file) |
2840 (find-file-other-window (dired-get-filename)))) | 2840 (find-file-other-window (dired-get-filename)))) |
2841 | 2841 |
2842 ;; Only for Emacs 19 | 2842 ;; Only for Emacs 19 |
2843 (defun dired-find-file-other-frame () | 2843 (defun dired-find-file-other-frame () |
2952 case-fold-search file p1 p2) | 2952 case-fold-search file p1 p2) |
2953 (save-excursion | 2953 (save-excursion |
2954 (and | 2954 (and |
2955 (setq p1 (dired-move-to-filename (not no-error-if-not-filep) bol eol)) | 2955 (setq p1 (dired-move-to-filename (not no-error-if-not-filep) bol eol)) |
2956 (setq p2 (dired-move-to-end-of-filename no-error-if-not-filep bol eol)) | 2956 (setq p2 (dired-move-to-end-of-filename no-error-if-not-filep bol eol)) |
2957 ;; We seem to be picking up the carriage-return at the end of the | |
2958 ;; line, so here's a quick fix to get dired working. | |
2959 (if (eq system-type 'windows-nt) | |
2960 (setq p2 (1- p2))) | |
2957 (setq file (buffer-substring p1 p2)) | 2961 (setq file (buffer-substring p1 p2)) |
2958 ;; Check if ls quoted the names, and unquote them. | 2962 ;; Check if ls quoted the names, and unquote them. |
2959 ;; Using read to unquote is much faster than substituting | 2963 ;; Using read to unquote is much faster than substituting |
2960 ;; \007 (4 chars) -> ^G (1 char) etc. in a lisp loop. | 2964 ;; \007 (4 chars) -> ^G (1 char) etc. in a lisp loop. |
2961 (cond ((memq ?b dired-internal-switches) ; System V ls | 2965 (cond ((memq ?b dired-internal-switches) ; System V ls |