From 2bb27597b3c800f8d9771029c696cb2bcd7a6731 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 21 Dec 2002 17:06:54 +0000 Subject: [PATCH] (dired-insert-directory): Preserve text properties when quoting. --- lisp/ChangeLog | 5 +++++ lisp/dired.el | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 167c1f73548..3dbf8d5e029 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-12-21 Andreas Schwab + + * dired.el (dired-insert-directory): Preserve text properties + when quoting. + 2002-12-20 Francesco Potort,Al(B * mail/undigest.el (rmail-mail-separator): Renamed from diff --git a/lisp/dired.el b/lisp/dired.el index 68c6ffc8bc1..11669400ad6 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -693,10 +693,16 @@ If HDR is non-nil, insert a header line with the directory name." (setq end (point-marker)) (goto-char opoint) (while (search-forward "\\" end t) - (replace-match "\\\\" nil t)) + (replace-match (apply #'propertize + "\\\\" + (text-properties-at (match-beginning 0))) + nil t)) (goto-char opoint) (while (search-forward "\^m" end t) - (replace-match "\\015" nil t)) + (replace-match (apply #'propertize + "\\015" + (text-properties-at (match-beginning 0))) + nil t)) (set-marker end nil))) (dired-insert-set-properties opoint (point)) ;; If we used --dired and it worked, the lines are already indented. -- 2.39.2