comparison lisp/finder.el @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents a5df635868b2
children e38acbeb1cae
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
76 76
77 (defvar finder-known-keywords 77 (defvar finder-known-keywords
78 `( 78 `(
79 (abbrev . "abbreviation handling, typing shortcuts, macros") 79 (abbrev . "abbreviation handling, typing shortcuts, macros")
80 (bib . "code related to the `bib' bibliography processor") 80 (bib . "code related to the `bib' bibliography processor")
81 (build . "code used to build XEmacs")
81 (c . "C, C++, and Objective-C language support") 82 (c . "C, C++, and Objective-C language support")
82 (calendar . "calendar and time management support") 83 (calendar . "calendar and time management support")
83 (comm . "communications, networking, remote access to files") 84 (comm . "communications, networking, remote access to files")
85 (content . "contains content (menu/dialog box descs, text, images, &c)")
84 (data . "support for editing files of data") 86 (data . "support for editing files of data")
85 (docs . "support for Emacs documentation") 87 (docs . "support for XEmacs documentation")
86 (dumped . "files preloaded into Emacs") 88 (dumped . "files preloaded into XEmacs")
87 (emulations . "emulations of other editors") 89 (emulations . "emulations of other editors")
88 (extensions . "Emacs Lisp language extensions") 90 (extensions . "Emacs Lisp language extensions")
89 (faces . "support for multiple fonts") 91 (faces . "support for multiple fonts")
90 (frames . "support for Emacs frames and window systems") 92 (frames . "support for XEmacs frames and window systems")
91 (games . "games, jokes and amusements") 93 (games . "games, jokes and amusements")
94 (gui . "support for menubars, dialog boxes, and other GUI features")
92 (hardware . "support for interfacing with exotic hardware") 95 (hardware . "support for interfacing with exotic hardware")
93 (help . "support for on-line help systems") 96 (help . "support for on-line help systems")
94 (hypermedia . "support for links between text or other media types") 97 (hypermedia . "support for links between text or other media types")
95 (i18n . "internationalization and alternate character-set support") 98 (i18n . "internationalization and alternate character-set support")
96 (internal . "code for Emacs internals, build process, defaults") 99 (internal . "code implementing core functionality in XEmacs")
97 (languages . "specialized modes for editing programming languages") 100 (languages . "specialized modes for editing programming languages")
98 (lisp . "Lisp support, including Emacs Lisp") 101 (lisp . "Lisp support, including Emacs Lisp")
99 (local . "code local to your site") 102 (local . "code local to your site")
103 (mail . "modes for electronic-mail handling")
100 (maint . "maintenance aids for the Emacs development group") 104 (maint . "maintenance aids for the Emacs development group")
101 (mail . "modes for electronic-mail handling")
102 (matching . "various sorts of searching and matching") 105 (matching . "various sorts of searching and matching")
103 (mouse . "mouse support") 106 (mouse . "mouse support")
107 (mswin . "support for anything running on MS Windows")
104 ,(when (featurep 'mule) 108 ,(when (featurep 'mule)
105 (cons 'mule "multi-language extensions")) 109 (cons 'mule "multi-language extensions"))
106 (news . "support for netnews reading and posting") 110 (news . "support for netnews reading and posting")
107 (oop . "support for object-oriented programming") 111 (oop . "support for object-oriented programming")
108 (outlines . "support for hierarchical outlining") 112 (outlines . "support for hierarchical outlining")
109 (processes . "process, subshell, compilation, and job control support") 113 (processes . "process, subshell, compilation, and job control support")
114 (services . "provides services for use by other programs (cf `user')")
110 (terminals . "support for terminal types") 115 (terminals . "support for terminal types")
111 (tex . "code related to the TeX formatter") 116 (tex . "code related to the TeX formatter")
112 (tools . "programming tools") 117 (tools . "programming tools")
113 (unix . "front-ends/assistants for, or emulators of, UNIX features") 118 (unix . "front-ends/assistants for, or emulators of, UNIX features")
119 (user . "program interacts directly with the user (cf `services'")
114 (vms . "support code for vms") 120 (vms . "support code for vms")
115 (wp . "word processing") 121 (wp . "word processing")
122 (www . "support for the Web (WWW, the World Wide Web)")
116 )) 123 ))
117 124
118 (defvar finder-mode-map nil) 125 (defvar finder-mode-map nil)
119 (or finder-mode-map 126 (or finder-mode-map
120 (let ((map (make-sparse-keymap))) 127 (let ((map (make-sparse-keymap)))
148 ;; XEmacs change 155 ;; XEmacs change
149 (find-file "finder-inf.el") 156 (find-file "finder-inf.el")
150 (let ((processed nil) 157 (let ((processed nil)
151 (directory-abbrev-alist 158 (directory-abbrev-alist
152 (append 159 (append
153 (mapcar (function (lambda (dir) (cons dir ""))) 160 (mapcar (function (lambda (dir)
161 (cons (concat "^" (regexp-quote dir))
162 "")))
154 finder-abbreviate-directory-list) 163 finder-abbreviate-directory-list)
155 directory-abbrev-alist)) 164 directory-abbrev-alist))
156 (using-load-path)) 165 (using-load-path))
157 (or dirs (setq dirs load-path)) 166 (or dirs (setq dirs load-path))
158 (setq using-load-path (equal dirs load-path)) 167 (setq using-load-path (equal dirs load-path))
165 (insert "\n(defconst finder-package-info '(\n") 174 (insert "\n(defconst finder-package-info '(\n")
166 (mapcar 175 (mapcar
167 (lambda (d) 176 (lambda (d)
168 (mapcar 177 (mapcar
169 (lambda (f) 178 (lambda (f)
170 (when (not (member f processed)) 179 (when (and (not (member f processed)) (file-readable-p f))
171 (let (summary keystart keywords) 180 (let (summary keystart keywords)
172 (setq processed (cons f processed)) 181 (setq processed (cons f processed))
173 (if (not finder-compile-keywords-quiet) 182 (if (not finder-compile-keywords-quiet)
174 (message "Processing %s ..." f)) 183 (message "Processing %s ..." f))
175 (save-excursion 184 (save-excursion
282 (if (file-exists-p (expand-file-name file (car dirs))) 291 (if (file-exists-p (expand-file-name file (car dirs)))
283 (setq found (expand-file-name file (car dirs))))) 292 (setq found (expand-file-name file (car dirs)))))
284 (setq dirs (cdr dirs))) 293 (setq dirs (cdr dirs)))
285 found))) 294 found)))
286 295
296 ;;;###autoload
287 (defun finder-commentary (file) 297 (defun finder-commentary (file)
288 "Display FILE's commentary section. 298 "Display FILE's commentary section.
289 FILE should be in a form suitable for passing to `locate-library'." 299 FILE should be in a form suitable for passing to `locate-library'."
290 (interactive "sLibrary name: ") 300 (interactive "sLibrary name: ")
291 (let* ((str (lm-commentary (or (finder-find-library file) 301 (let* ((str (lm-commentary (or (finder-find-library file)
393 (substitute-command-keys 403 (substitute-command-keys
394 ;; XEmacs change 404 ;; XEmacs change
395 "\\<finder-mode-map>\\[finder-select] = select, \\[finder-list-keywords] = keywords, \\[finder-edit] = edit, \\[finder-view] = view, \\[finder-exit] = quit, \\[finder-summary] = help"))) 405 "\\<finder-mode-map>\\[finder-select] = select, \\[finder-list-keywords] = keywords, \\[finder-edit] = edit, \\[finder-view] = view, \\[finder-exit] = quit, \\[finder-summary] = help")))
396 406
397 (defun finder-exit () 407 (defun finder-exit ()
398 "Exit Finder mode and kill the buffer" 408 "Exit Finder mode and kill the buffer."
399 (interactive) 409 (interactive)
400 ;; XEmacs change 410 ;; XEmacs change
401 (or (one-window-p t 0) 411 (or (one-window-p t 0)
402 (delete-window)) 412 (delete-window))
403 (kill-buffer "*Finder*")) 413 (kill-buffer "*Finder*"))