emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: dired-do-rename on "." and ".."


From: Markus Rost
Subject: Re: dired-do-rename on "." and ".."
Date: Wed, 4 Jun 2003 18:16:02 -0400 (EDT)

   Not wanting to spend a lot of time, I wrote code that won't let most
   Dired commands operate on either . or ...

With your change you get an error when creating new subdirectories in
dired with key "+".  I couldn't spend much time on it, but I think the
following patch fixes this.


        * dired.el (dired-get-filename): Don't err for . and .. for calls
        from dired-add-entry.

===Buffer *vc-diff*=========================================
*** dired.el.~1.260.~   Wed Jun  4 14:09:46 2003
--- dired.el    Wed Jun  4 18:05:36 2003
***************
*** 1487,1499 ****
      (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)
        (file-name-nondirectory file))
       (already-absolute
--- 1487,1499 ----
      (cond
       ((null file)
        nil)
+      ((eq localp 'verbatim)
+       file)
       ((and (not no-error-if-not-filep)
           (save-excursion
             (beginning-of-line)
             (looking-at dired-re-dir)))
        (error "Cannot operate on `.' or `..'"))
       ((and (eq localp 'no-dir) already-absolute)
        (file-name-nondirectory file))
       (already-absolute

============================================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]