comparison lisp/utils/lib-complete.el @ 138:6608ceec7cf8 r20-2b3

Import from CVS: tag r20-2b3
author cvs
date Mon, 13 Aug 2007 09:31:46 +0200
parents 131b0175ea99
children 43dd3413c7c7
comparison
equal deleted inserted replaced
137:cae984061f40 138:6608ceec7cf8
1 ;;; lib-complete.el --- Completion on the lisp search path
2
3 ;; Copyright (C) Mike Williams <mike-w@cs.aukuni.ac.nz> 1991
4
5 ;; Author: Mike Williams <mike-w@cs.aukuni.ac.nz>
6 ;; Maintainer:
7 ;; Keywords: lisp, extensions
8 ;; Created: Sat Apr 20 17:47:21 1991
9
10 ;; This file is part of XEmacs.
11
12 ;; XEmacs is free software; you can redistribute it and/or modify it
13 ;; under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; any later version.
16
17 ;; XEmacs is distributed in the hope that it will be useful, but
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with XEmacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
26
27 ;;; Synched up with: Not in FSF.
28
29 ;;; Commentary:
30
1 ;; ======================================================================== 31 ;; ========================================================================
2 ;; lib-complete.el -- Completion on a search path 32 ;; lib-complete.el -- Completion on a search path
3 ;; Author : Mike Williams <mike-w@cs.aukuni.ac.nz> 33 ;; Author : Mike Williams <mike-w@cs.aukuni.ac.nz>
4 ;; Created On : Sat Apr 20 17:47:21 1991 34 ;; Created On : Sat Apr 20 17:47:21 1991
5 ;; Last Modified By: Heiko M|nkel <muenkel@tnt.uni-hannover.de> 35 ;; Last Modified By: Heiko M|nkel <muenkel@tnt.uni-hannover.de>
6 ;; Additional XEmacs integration By: Chuck Thompson <cthomp@cs.uiuc.edu> 36 ;; Additional XEmacs integration By: Chuck Thompson <cthomp@cs.uiuc.edu>
7 ;; Last Modified On: Thu Jul 1 14:23:00 1994 37 ;; Last Modified On: Thu Jul 1 14:23:00 1994
8 ;; RCS Info : $Revision: 1.1.1.1 $ $Locker: $ 38 ;; RCS Info : $Revision: 1.2 $ $Locker: $
9 ;; ======================================================================== 39 ;; ========================================================================
10 ;; NOTE: this file must be recompiled if changed. 40 ;; NOTE: XEmacs must be redumped if this file is changed.
11 ;; 41 ;;
12 ;; Copyright (C) Mike Williams <mike-w@cs.aukuni.ac.nz> 1991 42 ;; Copyright (C) Mike Williams <mike-w@cs.aukuni.ac.nz> 1991
13 ;; 43 ;;
14 ;; Keywords: utility, lisp 44 ;; Keywords: utility, lisp
15 45
16 ;; This file is part of XEmacs.
17
18 ;; XEmacs is free software; you can redistribute it and/or modify it
19 ;; under the terms of the GNU General Public License as published by
20 ;; the Free Software Foundation; either version 2, or (at your option)
21 ;; any later version.
22
23 ;; XEmacs is distributed in the hope that it will be useful, but
24 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 ;; General Public License for more details.
27
28 ;; You should have received a copy of the GNU General Public License
29 ;; along with XEmacs; see the file COPYING. If not, write to the
30 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
31 ;; Boston, MA 02111-1307, USA.
32
33 ;;; Synched up with: Not in FSF.
34
35 ;; Many thanks to Hallvard Furuseth <hallvard@ifi.uio.no> for his 46 ;; Many thanks to Hallvard Furuseth <hallvard@ifi.uio.no> for his
36 ;; helpful suggestions. 47 ;; helpful suggestions.
37 48
38 ;; The function locate-file is removed, because of its incompatibility 49 ;; The function locate-file is removed, because of its incompatibility
39 ;; with the buildin function of the lemacs 19.10 (Heiko M|nkel). 50 ;; with the buildin function of the lemacs 19.10 (Heiko M|nkel).
40 51
41 ;; There is now the new function find-library in this package. 52 ;; There is now the new function find-library in this package.
42 53
43 (provide 'lib-complete) 54 ;;; ChangeLog:
55
56 ;; 4/26/97: sb Mule-ize.
57
58 ;;; Code:
44 59
45 ;;=== Usage =============================================================== 60 ;;=== Usage ===============================================================
46 ;; 61 ;;
47 ;; (autoload (fmakunbound 'load-library) "lib-complete" nil t) 62 ;; (autoload (fmakunbound 'load-library) "lib-complete" nil t)
48 ;; (autoload 'library-all-completions "lib-complete") 63 ;; (autoload 'library-all-completions "lib-complete")
305 ))) 320 )))
306 (load library)) 321 (load library))
307 322
308 ;;=== find-library with completion (Author: Heiko Muenkel) =================== 323 ;;=== find-library with completion (Author: Heiko Muenkel) ===================
309 324
310 (defun find-library (library) 325 (defun find-library (library &optional codesys)
311 "Find and edit the source for the library named LIBRARY. 326 "Find and edit the source for the library named LIBRARY.
312 The extension of the LIBRARY must be omitted." 327 The extension of the LIBRARY must be omitted.
328 Under XEmacs/Mule, the optional second argument specifies the
329 coding system to use when decoding the file. Interactively,
330 with a prefix argument, you will be prompted for the coding system."
313 (interactive 331 (interactive
314 (list 332 (list (get-library-path)
315 (get-library-path))) 333 (if current-prefix-arg
316 (find-file library)) 334 (read-coding-system "Coding System: "))))
317 335 (find-file library codesys))
318 (defun find-library-other-window (library) 336
319 "Load the library named LIBRARY in another window." 337 (defun find-library-other-window (library &optional codesys)
338 "Load the library named LIBRARY in another window.
339 Under XEmacs/Mule, the optional second argument specifies the
340 coding system to use when decoding the file. Interactively,
341 with a prefix argument, you will be prompted for the coding system."
320 (interactive 342 (interactive
321 (list (get-library-path))) 343 (list (get-library-path)
322 (find-file-other-window library)) 344 (if current-prefix-arg
323 345 (read-coding-system "Coding System: "))))
324 (defun find-library-other-frame (library) 346 (find-file-other-window library codesys))
325 "Load the library named LIBRARY in a newly-created frame." 347
348 (defun find-library-other-frame (library &optional codesys)
349 "Load the library named LIBRARY in a newly-created frame.
350 Under XEmacs/Mule, the optional second argument specifies the
351 coding system to use when decoding the file. Interactively,
352 with a prefix argument, you will be prompted for the coding system."
326 (interactive 353 (interactive
327 (list (get-library-path))) 354 (list (get-library-path)
328 (find-file-other-frame library)) 355 (if current-prefix-arg
356 (read-coding-system "Coding System: "))))
357 (find-file-other-frame library codesys))
329 358
330 ; This conflicts with an existing binding 359 ; This conflicts with an existing binding
331 ;(define-key global-map "\C-xl" 'find-library) 360 ;(define-key global-map "\C-xl" 'find-library)
332 (define-key global-map "\C-x4l" 'find-library-other-window) 361 (define-key global-map "\C-x4l" 'find-library-other-window)
333 (define-key global-map "\C-x5l" 'find-library-other-frame) 362 (define-key global-map "\C-x5l" 'find-library-other-frame)
363
364
365 (provide 'lib-complete)
366
367 ;;; lib-complete.el ends here