# HG changeset patch # User Dave Love # Date 973989756 0 # Node ID cc332f3565f2b6e90f5c52f78a0f6ff44cc55540 # Parent 21ac2c51ac5950043fc8107b94d9c50d43577067 (finder-known-keywords): Add `files', remove `vms'. (finder-help-echo): New variable. (finder-mouse-face-on-line): Add help-echo stuff. (finder-list-keywords, finder-list-matches): Use mapc. diff -r 21ac2c51ac59 -r cc332f3565f2 lisp/finder.el --- a/lisp/finder.el Sun Nov 12 00:38:44 2000 +0000 +++ b/lisp/finder.el Sun Nov 12 00:42:36 2000 +0000 @@ -49,6 +49,7 @@ (defvar finder-known-keywords '( (abbrev . "abbreviation handling, typing shortcuts, macros") + ;; Too specific: (bib . "code related to the `bib' bibliography processor") (c . "support for the C language and related languages") (calendar . "calendar and time management support") @@ -59,6 +60,7 @@ (emulations . "emulations of other editors") (extensions . "Emacs Lisp language extensions") (faces . "support for multiple fonts") + (files . "support for editing and manipulating files") (frames . "support for Emacs frames and window systems") (games . "games, jokes and amusements") (hardware . "support for interfacing with exotic hardware") @@ -82,7 +84,8 @@ (tex . "code related to the TeX formatter") (tools . "programming tools") (unix . "front-ends/assistants for, or emulators of, UNIX features") - (vms . "support code for vms") +;; Not a custom group and not currently useful. +;; (vms . "support code for vms") (wp . "word processing") )) @@ -185,13 +188,25 @@ (move-to-column column t) (apply 'insert strings)) +(defvar finder-help-echo nil) + (defun finder-mouse-face-on-line () - "Put a `mouse-face' property on the previous line." + "Put `mouse-face' and `help-echo' properties on the previous line." (save-excursion (previous-line 1) - (put-text-property (save-excursion (beginning-of-line) (point)) - (progn (end-of-line) (point)) - 'mouse-face 'highlight))) + (unless finder-help-echo + (setq finder-help-echo + (let* ((keys1 (where-is-internal 'finder-select + finder-mode-map)) + (keys (nconc (where-is-internal + 'finder-mouse-select finder-mode-map) + keys1))) + (concat (mapconcat 'key-description keys ", ") + ": select item")))) + (add-text-properties + (line-beginning-position) (line-end-position) + '(mouse-face highlight + help-echo finder-help-echo)))) ;;;###autoload (defun finder-list-keywords () @@ -203,7 +218,7 @@ (finder-mode) (setq buffer-read-only nil) (erase-buffer) - (mapcar + (mapc (lambda (assoc) (let ((keyword (car assoc))) (insert (symbol-name keyword)) @@ -226,7 +241,7 @@ (insert "The following packages match the keyword `" key "':\n\n") (setq finder-headmark (point)) - (mapcar + (mapc (lambda (x) (if (memq id (car (cdr (cdr x)))) (progn