[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/dired.el
From: |
Luc Teirlinck |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/dired.el |
Date: |
Mon, 09 Jun 2003 23:58:07 -0400 |
Index: emacs/lisp/dired.el
diff -c emacs/lisp/dired.el:1.262 emacs/lisp/dired.el:1.263
*** emacs/lisp/dired.el:1.262 Mon Jun 9 13:05:42 2003
--- emacs/lisp/dired.el Mon Jun 9 23:58:06 2003
***************
*** 253,259 ****
"-[-r][-w].[-r][-w].[-r][-w][xst]")
"\\|"))
(defvar dired-re-perms "[-bcdlps][-r][-w].[-r][-w].[-r][-w].")
! (defvar dired-re-dot "^.* \\.\\.?$")
;; The subdirectory names in this list are expanded.
(defvar dired-subdir-alist nil
--- 253,259 ----
"-[-r][-w].[-r][-w].[-r][-w][xst]")
"\\|"))
(defvar dired-re-perms "[-bcdlps][-r][-w].[-r][-w].[-r][-w].")
! (defvar dired-re-dot "^.* \\.\\.?/?$")
;; The subdirectory names in this list are expanded.
(defvar dired-subdir-alist nil
***************
*** 1448,1458 ****
"In Dired, return name of file mentioned on this line.
Value returned normally includes the directory name.
Optional arg LOCALP with value `no-dir' means don't include directory
! name in result. A value of `verbatim' means to return the name exactly as
! it occurs in the buffer, and a value of t means construct name relative to
! `default-directory', which still may contain slashes if in a subdirectory.
! Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on
! this line, otherwise an error occurs."
(let (case-fold-search file p1 p2 already-absolute)
(save-excursion
(if (setq p1 (dired-move-to-filename (not no-error-if-not-filep)))
--- 1448,1459 ----
"In Dired, return name of file mentioned on this line.
Value returned normally includes the directory name.
Optional arg LOCALP with value `no-dir' means don't include directory
! name in result. A value of `verbatim' means to return the name exactly as
! it occurs in the buffer, and a value of t means construct name relative to
! `default-directory', which still may contain slashes if in a subdirectory.
! Optional arg NO-ERROR-IF-NOT-FILEP means treat `.' and `..' as
! regular filenames and return nil if no filename on this line.
! Otherwise, an error occurs in these cases."
(let (case-fold-search file p1 p2 already-absolute)
(save-excursion
(if (setq p1 (dired-move-to-filename (not no-error-if-not-filep)))
***************
*** 1490,1496 ****
((eq localp 'verbatim)
file)
((and (not no-error-if-not-filep)
! (member (file-name-nondirectory file) '("." "..")))
(error "Cannot operate on `.' or `..'"))
((and (eq localp 'no-dir) already-absolute)
(file-name-nondirectory file))
--- 1491,1499 ----
((eq localp 'verbatim)
file)
((and (not no-error-if-not-filep)
! (save-excursion
! (beginning-of-line)
! (looking-at dired-re-dot)))
(error "Cannot operate on `.' or `..'"))
((and (eq localp 'no-dir) already-absolute)
(file-name-nondirectory file))