[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android 2e33d1b62de: Merge remote-tracking branch 'origin/master
From: |
Po Lu |
Subject: |
feature/android 2e33d1b62de: Merge remote-tracking branch 'origin/master' into feature/android |
Date: |
Sun, 16 Jul 2023 19:31:16 -0400 (EDT) |
branch: feature/android
commit 2e33d1b62def7a7f2ffb3227860d7831b25b18c5
Merge: 8335c76e88e a65ece8b201
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Merge remote-tracking branch 'origin/master' into feature/android
---
lisp/wdired.el | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 5c745cc9aab..7b9c75d36b1 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -556,8 +556,24 @@ non-nil means return old filename."
;; been modified with their new name keeping
;; the ones that are unmodified at the same place.
(cl-loop for f in (cdr dired-directory)
- collect (or (assoc-default f files-renamed)
- f))))))
+ collect
+ (or (assoc-default f files-renamed)
+ ;; F could be relative or
+ ;; abbreviated, whereas
+ ;; files-renamed always consists
+ ;; of absolute file names.
+ (let ((relative
+ (not (file-name-absolute-p f)))
+ (match
+ (assoc-default (expand-file-name f)
+ files-renamed)))
+ (cond
+ ;; If it was relative, convert
+ ;; the new name back to relative.
+ ((and match relative)
+ (file-relative-name match))
+ (t match)))
+ f))))))
;; Re-sort the buffer.
(revert-buffer)
(let ((inhibit-read-only t))