# HG changeset patch # User Richard M. Stallman # Date 765226299 0 # Node ID dc75f33163fb9c7d1a3c14f189b7dda37b2d7f04 # Parent 451a2973d86b36425f9bae917c8979d277fc2265 (dired-insert-directory): Add mouse-face properties. (dired-insert-set-properties): New subroutine. diff -r 451a2973d86b -r dc75f33163fb lisp/dired.el --- a/lisp/dired.el Fri Apr 01 18:51:17 1994 +0000 +++ b/lisp/dired.el Fri Apr 01 18:51:39 1994 +0000 @@ -513,14 +513,28 @@ ;; Do the right thing whether dir-or-list is atomic or not. If it is, ;; inset all files listed in the cdr (the car is the passed-in directory ;; list. - (if (consp dir-or-list) - (progn - (mapcar - (function (lambda (x) (insert-directory x switches wildcard full-p))) - (cdr dir-or-list))) - (insert-directory dir-or-list switches wildcard full-p)) + (let ((opoint (point))) + (if (consp dir-or-list) + (progn + (mapcar + (function (lambda (x) (insert-directory x switches wildcard full-p))) + (cdr dir-or-list))) + (insert-directory dir-or-list switches wildcard full-p)) + (dired-insert-set-properties opoint (point))) (setq dired-directory dir-or-list)) +(defun dired-insert-set-properties (beg end) + (save-excursion + (goto-char beg) + (while (< (point) end) + (if (dired-move-to-filename) + (put-text-property (point) + (save-excursion + (dired-move-to-end-of-filename) + (point)) + 'mouse-face 'highlight)) + (forward-line 1)))) + (defun dired-insert-headerline (dir);; also used by dired-insert-subdir ;; Insert DIR's headerline with no trailing slash, exactly like ls ;; would, and put cursor where dired-build-subdir-alist puts subdir