[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/dired.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/dired.el |
Date: |
Wed, 04 Jun 2003 05:02:45 -0400 |
Index: emacs/lisp/dired.el
diff -c emacs/lisp/dired.el:1.259 emacs/lisp/dired.el:1.260
*** emacs/lisp/dired.el:1.259 Mon May 5 17:22:06 2003
--- emacs/lisp/dired.el Wed Jun 4 05:02:45 2003
***************
*** 1350,1356 ****
(defun dired-get-file-for-visit ()
"Get the current line's file name, with an error if file does not exist."
(interactive)
! (let ((file-name (file-name-sans-versions (dired-get-filename) t)))
(if (file-exists-p file-name)
file-name
(if (file-symlink-p file-name)
--- 1350,1361 ----
(defun dired-get-file-for-visit ()
"Get the current line's file name, with an error if file does not exist."
(interactive)
! ;; We pass t for second arg so that we don't get error for `.' and `..'.
! (let ((raw (dired-get-filename nil t))
! file-name)
! (if (null raw)
! (error "No file on this line"))
! (setq file-name (file-name-sans-versions raw t))
(if (file-exists-p file-name)
file-name
(if (file-symlink-p file-name)
***************
*** 1482,1487 ****
--- 1487,1497 ----
(cond
((null file)
nil)
+ ((and (not no-error-if-not-filep)
+ (save-excursion
+ (beginning-of-line)
+ (looking-at dired-re-dir)))
+ (error "Cannot operate on `.' or `..'"))
((eq localp 'verbatim)
file)
((and (eq localp 'no-dir) already-absolute)
***************
*** 2658,2665 ****
(re-search-forward dired-re-mark nil t)
(search-forward string nil t))
(if (or (not arg)
! (dired-query 'query "Unmark file `%s'? "
! (dired-get-filename t)))
(progn (subst-char-in-region (1- (point)) (point)
(preceding-char) ?\ )
(setq count (1+ count)))))
--- 2668,2677 ----
(re-search-forward dired-re-mark nil t)
(search-forward string nil t))
(if (or (not arg)
! (let ((file (dired-get-filename t t)))
! (and file
! (dired-query 'query "Unmark file `%s'? "
! file))))
(progn (subst-char-in-region (1- (point)) (point)
(preceding-char) ?\ )
(setq count (1+ count)))))
- [Emacs-diffs] Changes to emacs/lisp/dired.el,
Richard M. Stallman <=