Mercurial > emacs
comparison lisp/dired.el @ 6634:dc75f33163fb
(dired-insert-directory): Add mouse-face properties.
(dired-insert-set-properties): New subroutine.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 01 Apr 1994 18:51:39 +0000 |
parents | bca9e6c8a07f |
children | 4cdde975154f |
comparison
equal
deleted
inserted
replaced
6633:451a2973d86b | 6634:dc75f33163fb |
---|---|
511 | 511 |
512 (defun dired-insert-directory (dir-or-list switches &optional wildcard full-p) | 512 (defun dired-insert-directory (dir-or-list switches &optional wildcard full-p) |
513 ;; Do the right thing whether dir-or-list is atomic or not. If it is, | 513 ;; Do the right thing whether dir-or-list is atomic or not. If it is, |
514 ;; inset all files listed in the cdr (the car is the passed-in directory | 514 ;; inset all files listed in the cdr (the car is the passed-in directory |
515 ;; list. | 515 ;; list. |
516 (if (consp dir-or-list) | 516 (let ((opoint (point))) |
517 (progn | 517 (if (consp dir-or-list) |
518 (mapcar | 518 (progn |
519 (function (lambda (x) (insert-directory x switches wildcard full-p))) | 519 (mapcar |
520 (cdr dir-or-list))) | 520 (function (lambda (x) (insert-directory x switches wildcard full-p))) |
521 (insert-directory dir-or-list switches wildcard full-p)) | 521 (cdr dir-or-list))) |
522 (insert-directory dir-or-list switches wildcard full-p)) | |
523 (dired-insert-set-properties opoint (point))) | |
522 (setq dired-directory dir-or-list)) | 524 (setq dired-directory dir-or-list)) |
525 | |
526 (defun dired-insert-set-properties (beg end) | |
527 (save-excursion | |
528 (goto-char beg) | |
529 (while (< (point) end) | |
530 (if (dired-move-to-filename) | |
531 (put-text-property (point) | |
532 (save-excursion | |
533 (dired-move-to-end-of-filename) | |
534 (point)) | |
535 'mouse-face 'highlight)) | |
536 (forward-line 1)))) | |
523 | 537 |
524 (defun dired-insert-headerline (dir);; also used by dired-insert-subdir | 538 (defun dired-insert-headerline (dir);; also used by dired-insert-subdir |
525 ;; Insert DIR's headerline with no trailing slash, exactly like ls | 539 ;; Insert DIR's headerline with no trailing slash, exactly like ls |
526 ;; would, and put cursor where dired-build-subdir-alist puts subdir | 540 ;; would, and put cursor where dired-build-subdir-alist puts subdir |
527 ;; boundaries. | 541 ;; boundaries. |