From 127342224ea0971d14077f9290d91064972c78ca Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 19 Sep 2012 23:09:55 +0300 Subject: [PATCH] * lisp/dired-aux.el (dired-diff): Add (require 'diff) because `diff-latest-backup-file' is not autoloaded. (dired-do-chxxx, dired-do-chmod): Set `no-error-if-not-filep' arg of `dired-get-filename' to t to not report error when there is no default file on the current line. --- lisp/ChangeLog | 8 ++++++++ lisp/dired-aux.el | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d5e01ed08a2..d2266f9952f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-09-19 Juri Linkov + + * dired-aux.el (dired-diff): Add (require 'diff) because + `diff-latest-backup-file' is not autoloaded. + (dired-do-chxxx, dired-do-chmod): Set `no-error-if-not-filep' arg + of `dired-get-filename' to t to not report error when there is + no default file on the current line. + 2012-09-19 Stefan Monnier * emacs-lisp/macroexp.el (macroexp--funcall-if-compiled): Rename from diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 7ba67050337..3d3fe491899 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -70,7 +70,7 @@ the string of command switches for the third argument of `diff'." (interactive (let* ((current (dired-get-filename t)) ;; Get the latest existing backup file. - (oldf (diff-latest-backup-file current)) + (oldf (progn (require 'diff) (diff-latest-backup-file current))) ;; Get the file at the mark. (file-at-mark (if (and transient-mark-mode mark-active) (save-excursion (goto-char (mark t)) @@ -248,7 +248,7 @@ List has a form of (file-name full-file-name (attribute-list))." ;; ARG describes which files to use, as in `dired-get-marked-files'. (let* ((files (dired-get-marked-files t arg)) ;; The source of default file attributes is the file at point. - (default-file (dired-get-filename t)) + (default-file (dired-get-filename t t)) (default (when default-file (cond ((eq op-symbol 'touch) (format-time-string @@ -300,7 +300,7 @@ into the minibuffer." (interactive "P") (let* ((files (dired-get-marked-files t arg)) ;; The source of default file attributes is the file at point. - (default-file (dired-get-filename t)) + (default-file (dired-get-filename t t)) (modestr (when default-file (nth 8 (file-attributes default-file)))) (default -- 2.39.2