changeset 33420:cc332f3565f2

(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.
author Dave Love <fx@gnu.org>
date Sun, 12 Nov 2000 00:42:36 +0000
parents 21ac2c51ac59
children 307f82858763
files lisp/finder.el
diffstat 1 files changed, 22 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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