/[emacs]/emacs/lisp/dired.el
ViewVC logotype

Diff of /emacs/lisp/dired.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.259 by rms, Mon May 5 21:22:06 2003 UTC revision 1.260 by rms, Wed Jun 4 09:02:45 2003 UTC
# Line 1350  Creates a buffer if necessary." Line 1350  Creates a buffer if necessary."
1350  (defun dired-get-file-for-visit ()  (defun dired-get-file-for-visit ()
1351    "Get the current line's file name, with an error if file does not exist."    "Get the current line's file name, with an error if file does not exist."
1352    (interactive)    (interactive)
1353    (let ((file-name (file-name-sans-versions (dired-get-filename) t)))    ;; We pass t for second arg so that we don't get error for `.' and `..'.
1354      (let ((raw (dired-get-filename nil t))
1355            file-name)
1356        (if (null raw)
1357            (error "No file on this line"))
1358        (setq file-name (file-name-sans-versions raw t))
1359      (if (file-exists-p file-name)      (if (file-exists-p file-name)
1360          file-name          file-name
1361        (if (file-symlink-p file-name)        (if (file-symlink-p file-name)
# Line 1482  Optional arg NO-ERROR-IF-NOT-FILEP means Line 1487  Optional arg NO-ERROR-IF-NOT-FILEP means
1487      (cond      (cond
1488       ((null file)       ((null file)
1489        nil)        nil)
1490         ((and (not no-error-if-not-filep)
1491               (save-excursion
1492                 (beginning-of-line)
1493                 (looking-at dired-re-dir)))
1494          (error "Cannot operate on `.' or `..'"))
1495       ((eq localp 'verbatim)       ((eq localp 'verbatim)
1496        file)        file)
1497       ((and (eq localp 'no-dir) already-absolute)       ((and (eq localp 'no-dir) already-absolute)
# Line 2658  Type SPC or `y' to unmark one file, DEL Line 2668  Type SPC or `y' to unmark one file, DEL
2668                   (re-search-forward dired-re-mark nil t)                   (re-search-forward dired-re-mark nil t)
2669                 (search-forward string nil t))                 (search-forward string nil t))
2670          (if (or (not arg)          (if (or (not arg)
2671                  (dired-query 'query "Unmark file `%s'? "                  (let ((file (dired-get-filename t t)))
2672                               (dired-get-filename t)))                    (and file
2673                           (dired-query 'query "Unmark file `%s'? "
2674                                        file))))
2675              (progn (subst-char-in-region (1- (point)) (point)              (progn (subst-char-in-region (1- (point)) (point)
2676                                           (preceding-char) ?\ )                                           (preceding-char) ?\ )
2677                     (setq count (1+ count)))))                     (setq count (1+ count)))))

Legend:
Removed from v.1.259  
changed lines
  Added in v.1.260

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26