Changeset 3348

Show
Ignore:
Timestamp:
2004年07月15日 19時49分22秒 (4 years ago)
Author:
miyoshi
Message:

(dired-view-file): Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.1/lisp/ChangeLog.Meadow

    r3340 r3348  
     12004-07-15  MIYOSHI Masanori  <miyoshi@meadowy.org> 
     2 
     3        * dired.el (dired-view-file):  Sync up with Emacs CVS HEAD. 
     4 
    152004-07-11  MIYOSHI Masanori  <miyoshi@meadowy.org> 
    26 
  • branches/2.1/lisp/dired.el

    r3339 r3348  
    14041404otherwise, display it in another buffer." 
    14051405  (interactive) 
    1406   (if (file-directory-p (dired-get-filename)) 
    1407       (or (and (cdr dired-subdir-alist) 
    1408                (dired-goto-subdir (dired-get-filename))) 
    1409           (dired (dired-get-filename))) 
    1410     (view-file (dired-get-filename)))) 
     1406  (let ((file (dired-get-file-for-visit))) 
     1407    (if (file-directory-p file) 
     1408        (or (and (cdr dired-subdir-alist) 
     1409                 (dired-goto-subdir file)) 
     1410            (dired file)) 
     1411      (let (cmd) 
     1412        ;; Look for some other way to view a certain file. 
     1413        (dolist (elt dired-view-command-alist) 
     1414          (if (string-match (car elt) file) 
     1415              (setq cmd (cdr elt)))) 
     1416        (if cmd 
     1417            (call-process shell-file-name nil 0 nil 
     1418                          "-c" 
     1419                          (concat (format cmd (shell-quote-argument file)) 
     1420                                  " &")) 
     1421          (view-file file)))))) 
    14111422 
    14121423(defun dired-find-file-other-window ()