[Date Prev] [Date Index] [Date Next]
[Thread Prev] [Thread Index] [Thread Next]

[xyzzy:03475] Re: 私も lnk に1票派 m(_ _)m



逸見さん、こんにちは。

    Thu, 11 Nov 1999 09:21:52 +0900 の
   “[xyzzy:03470] 私も lnk に1票派 m(_ _)m”
    への返事です.

| Ctrl-X Ctrl-F でディレクトリでRETすると片画面ファイラが開きますよね。
| そこで、連続して操作すればOKになりますでしょうか?

とりあえずこんな感じ。よく考えたら汎用的にするのは、や
っぱかなり難しいです。

(in-package "editor")

(defun filer-follow-links (file)
  (or (ignore-errors (resolve-shortcut file)) file))

(defun filer-ok ()
  (let ((file (filer-get-text)))
    (cond (file
	   (setq file (filer-follow-links (merge-pathnames file (filer-get-directory))))
	   (cond ((wild-pathname-p file)
		  (filer-focus)
		  (filer-set-directory (directory-namestring file))
		  (filer-reload (file-namestring file)))
		 ((file-directory-p file)
		  (filer-focus)
		  (filer-chdir file))
		 (t
		  (check-valid-pathname file)
		  (if (filer-modal-p)
		      (filer-close file)
		    (filer-readin file)))))
	  (t
	   (let ((files (filer-get-mark-files t)))
	     (cond (files
		    (setq files (mapcar #'filer-follow-links files))
		    (if (filer-modal-p)
			(filer-close files)
		      (filer-readin files)))
		   ((and (setq files (filer-get-mark-files nil))
			 (null (cdr files)))
		    (filer-chdir (car files)))
		   ((filer-current-file-dot-dot-p)
		    (filer-up-directory))
		   ((setq files (filer-get-current-file))
		    (setq files (filer-follow-links files))
		    (if (file-directory-p files)
			(filer-chdir files)
		      (if (filer-modal-p)
			  (filer-close files)
			(filer-readin files))))
		   (t nil)))))))

--
亀井哲弥(Tetsuya Kamei)
kamei@xxxxxxxxxxxx/JCA00343@xxxxxxxxxxx

Index Home