Mercurial > emacs
comparison lisp/dired.el @ 48903:bcc54fecfcee
(dired-insert-directory): Preserve text properties when quoting.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Sat, 21 Dec 2002 17:04:20 +0000 |
parents | 5d690a3537aa |
children | 5f0ef23b7e51 |
comparison
equal
deleted
inserted
replaced
48902:c79f62a9de7e | 48903:bcc54fecfcee |
---|---|
691 (if (not (string-match "b" dired-actual-switches)) | 691 (if (not (string-match "b" dired-actual-switches)) |
692 (save-excursion | 692 (save-excursion |
693 (setq end (point-marker)) | 693 (setq end (point-marker)) |
694 (goto-char opoint) | 694 (goto-char opoint) |
695 (while (search-forward "\\" end t) | 695 (while (search-forward "\\" end t) |
696 (replace-match "\\\\" nil t)) | 696 (replace-match (apply #'propertize |
697 "\\\\" | |
698 (text-properties-at (match-beginning 0))) | |
699 nil t)) | |
697 (goto-char opoint) | 700 (goto-char opoint) |
698 (while (search-forward "\^m" end t) | 701 (while (search-forward "\^m" end t) |
699 (replace-match "\\015" nil t)) | 702 (replace-match (apply #'propertize |
703 "\\015" | |
704 (text-properties-at (match-beginning 0))) | |
705 nil t)) | |
700 (set-marker end nil))) | 706 (set-marker end nil))) |
701 (dired-insert-set-properties opoint (point)) | 707 (dired-insert-set-properties opoint (point)) |
702 ;; If we used --dired and it worked, the lines are already indented. | 708 ;; If we used --dired and it worked, the lines are already indented. |
703 ;; Otherwise, indent them. | 709 ;; Otherwise, indent them. |
704 (unless (save-excursion | 710 (unless (save-excursion |