comparison lisp/lib-complete.el @ 1123:37bdd24225ef

[xemacs-hg @ 2002-11-27 07:15:02 by ben] bug fixes, profiling debugging improvements configure.in: Check for GCC version and only use -Wpacked in v3. .cvsignore: Add .idb, .ilk for MS Windows VC++. cl-macs.el: Document better. cmdloop.el: Removed. Remove nonworking breakpoint-on-error now that debug-on-error works as documented. help.el: Extract out with-displaying-help-buffer into a more general mechanism. lib-complete.el: Support thunks in find-library-source-path. startup.el: Don't catch errors when noninteractive, because that makes stack traces from stack-trace-on-error useless. .cvsignore: Windows shit. alloc.c: Better redisplay-related assert. elhash.c: Comment change. eval.c: Don't generate large warning strings (e.g. backtraces) when they will be discarded. Implement debug-on-error as documented -- it will enter the debugger and crash when an uncaught signal happens noninteractively and we are --debug. Better redisplay-related asserts. frame-msw.c, frame.c, lisp.h, redisplay.c, scrollbar-gtk.c, scrollbar-x.c, signal.c, sysdep.c: Fix up documentation related to QUIT (which CANNOT garbage-collect under any circumstances), and to redisplay critical sections. lread.c: Add load-ignore-out-of-date-elc-files, load-always-display-messages, load-show-full-path-in-messages for more robust package compilation and debugging. profile.c: Overhaul profile code. Change format to include call count and be extensible for further info. Remove call-count-profile-table. Add set-profiling-info. See related profile.el changes (which SHOULD ABSOLUTELY be in the core! Get rid of xemacs-devel and xemacs-base packages *yesterday*!).
author ben
date Wed, 27 Nov 2002 07:15:36 +0000
parents c1e8977783ed
children 308d34e9f07d
comparison
equal deleted inserted replaced
1122:7abc2b15a990 1123:37bdd24225ef
1 ;;; lib-complete.el --- Completion on the lisp search path 1 ;;; lib-complete.el --- Completion on the lisp search path
2 2
3 ;; Copyright (C) 1997 Free Software Foundation, Inc. 3 ;; Copyright (C) 1997 Free Software Foundation, Inc.
4 ;; Copyright (C) Mike Williams <mike-w@cs.aukuni.ac.nz> 1991 4 ;; Copyright (C) 1991 Mike Williams <mike-w@cs.aukuni.ac.nz>.
5 ;; Copyright (C) 2002 Ben Wing.
5 6
6 ;; Author: Mike Williams <mike-w@cs.aukuni.ac.nz> 7 ;; Author: Mike Williams <mike-w@cs.aukuni.ac.nz>
7 ;; Maintainer: XEmacs Development Team 8 ;; Maintainer: XEmacs Development Team
8 ;; Keywords: lisp, extensions, dumped 9 ;; Keywords: lisp, extensions, dumped
9 ;; Created: Sat Apr 20 17:47:21 1991 10 ;; Created: Sat Apr 20 17:47:21 1991
29 30
30 ;;; Commentary: 31 ;;; Commentary:
31 32
32 ;; This file is dumped with XEmacs. 33 ;; This file is dumped with XEmacs.
33 34
34 ;; ========================================================================
35 ;; lib-complete.el -- Completion on a search path
36 ;; Author : Mike Williams <mike-w@cs.aukuni.ac.nz>
37 ;; Created On : Sat Apr 20 17:47:21 1991
38 ;; Last Modified By: Heiko M|nkel <muenkel@tnt.uni-hannover.de>
39 ;; Additional XEmacs integration By: Chuck Thompson <cthomp@cs.uiuc.edu>
40 ;; Last Modified On: Thu Jul 1 14:23:00 1994
41 ;; ========================================================================
42 ;; NOTE: XEmacs must be redumped if this file is changed.
43 ;;
44 ;; Copyright (C) Mike Williams <mike-w@cs.aukuni.ac.nz> 1991
45 ;;
46 ;; Keywords: utility, lisp
47
48 ;; Many thanks to Hallvard Furuseth <hallvard@ifi.uio.no> for his 35 ;; Many thanks to Hallvard Furuseth <hallvard@ifi.uio.no> for his
49 ;; helpful suggestions. 36 ;; helpful suggestions.
50
51 ;; The function locate-file is removed, because of its incompatibility
52 ;; with the buildin function of the lemacs 19.10 (Heiko M|nkel).
53
54 ;; There is now the new function find-library in this package.
55 37
56 ;;; ChangeLog: 38 ;;; ChangeLog:
57 39
58 ;; 4/26/97: sb Mule-ize. 40 ;; 4/26/97: sb Mule-ize.
59 ;; 6/24/1999 much rewriting from Bob Weiner 41 ;; 6/24/1999 much rewriting from Bob Weiner
293 ))) 275 )))
294 (load library)) 276 (load library))
295 277
296 ;;=== find-library with completion (Author: Bob Weiner) =================== 278 ;;=== find-library with completion (Author: Bob Weiner) ===================
297 279
280 ;; should be called find-lisp-source-path!
298 (defcustom find-library-source-path nil 281 (defcustom find-library-source-path nil
299 "The default list of directories where find-library searches. 282 "The default list of directories where find-library searches.
300 283
301 If this variable is `nil' then find-library searches `load-path' by 284 If this variable is `nil' then find-library searches `load-path' by
302 default. 285 default.
303 286
287 If this is set to a function, it will be called the first time this value
288 is needed, to compute the actual list, which will then be substituted into
289 the variable.
290
304 A good way to set this variable is like this: 291 A good way to set this variable is like this:
305 292
306 \(setq find-library-source-path 293 \(setq find-library-source-path
307 (paths-find-recursive-load-path 294 #'(lambda ()
308 (list lisp-directory \"/src/xemacs/xemacs-packages-src/\"))) 295 (paths-find-recursive-load-path
296 (list lisp-directory \"/src/xemacs/xemacs-packages-src/\"))))
309 " 297 "
310 :type '(repeat directory) 298 :type '(repeat directory)
311 :group 'find-function) 299 :group 'find-function)
312 300
313 (defun find-library (library &optional codesys display-function) 301 (defun find-library (library &optional codesys display-function)
325 (list (read-library-name "Find library: ") 313 (list (read-library-name "Find library: ")
326 (if current-prefix-arg 314 (if current-prefix-arg
327 (read-coding-system "Coding System: ")))) 315 (read-coding-system "Coding System: "))))
328 (let ((path (if (or (null library) (equal library "")) 316 (let ((path (if (or (null library) (equal library ""))
329 nil 317 nil
318 (when (functionp find-library-source-path)
319 (message "Computing find-library-source-path...")
320 (setq find-library-source-path
321 (funcall find-library-source-path))
322 (message "Computing find-library-source-path... done."))
330 (locate-file library (or find-library-source-path load-path) 323 (locate-file library (or find-library-source-path load-path)
331 ":.el:.el.gz:.el.Z:.elc")))) 324 ":.el:.el.gz:.el.Z:.elc"))))
332 (if path (funcall (if (fboundp display-function) 325 (if path (funcall (if (fboundp display-function)
333 display-function 'find-file) 326 display-function 'find-file)
334 path codesys) 327 path codesys)