Mercurial > hg > xemacs-beta
comparison lisp/lib-complete.el @ 282:c42ec1d1cded r21-0b39
Import from CVS: tag r21-0b39
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:33:18 +0200 |
parents | 41ff10fd062f |
children | 8626e4521993 |
comparison
equal
deleted
inserted
replaced
281:090b52736db2 | 282:c42ec1d1cded |
---|---|
36 ;; Author : Mike Williams <mike-w@cs.aukuni.ac.nz> | 36 ;; Author : Mike Williams <mike-w@cs.aukuni.ac.nz> |
37 ;; Created On : Sat Apr 20 17:47:21 1991 | 37 ;; Created On : Sat Apr 20 17:47:21 1991 |
38 ;; Last Modified By: Heiko M|nkel <muenkel@tnt.uni-hannover.de> | 38 ;; Last Modified By: Heiko M|nkel <muenkel@tnt.uni-hannover.de> |
39 ;; Additional XEmacs integration By: Chuck Thompson <cthomp@cs.uiuc.edu> | 39 ;; Additional XEmacs integration By: Chuck Thompson <cthomp@cs.uiuc.edu> |
40 ;; Last Modified On: Thu Jul 1 14:23:00 1994 | 40 ;; Last Modified On: Thu Jul 1 14:23:00 1994 |
41 ;; RCS Info : $Revision: 1.2 $ $Locker: $ | 41 ;; RCS Info : $Revision: 1.3 $ $Locker: $ |
42 ;; ======================================================================== | 42 ;; ======================================================================== |
43 ;; NOTE: XEmacs must be redumped if this file is changed. | 43 ;; NOTE: XEmacs must be redumped if this file is changed. |
44 ;; | 44 ;; |
45 ;; Copyright (C) Mike Williams <mike-w@cs.aukuni.ac.nz> 1991 | 45 ;; Copyright (C) Mike Williams <mike-w@cs.aukuni.ac.nz> 1991 |
46 ;; | 46 ;; |
121 (delete-region orig-pmax (point-max))))) | 121 (delete-region orig-pmax (point-max))))) |
122 (prog2 | 122 (prog2 |
123 (message "%s" (, MESSAGE)) | 123 (message "%s" (, MESSAGE)) |
124 (progn (,@ FORMS)) | 124 (progn (,@ FORMS)) |
125 (message ""))))) | 125 (message ""))))) |
126 #+infodock (defalias 'lib-funcall-with-msg 'progn-with-message) | |
127 | 126 |
128 (put 'progn-with-message 'lisp-indent-hook 1) | 127 (put 'progn-with-message 'lisp-indent-hook 1) |
129 #+infodock (put 'lib-funcall-with-message 'lisp-indent-hook 1) | |
130 | 128 |
131 ;;=== Completion caching ================================================== | 129 ;;=== Completion caching ================================================== |
132 | 130 |
133 (defconst lib-complete:cache nil | 131 (defconst lib-complete:cache nil |
134 "Used within read-library and read-library-internal to prevent | 132 "Used within read-library and read-library-internal to prevent |
138 ([<path> <subdir>] <cache-record> <cache-record> ...) | 136 ([<path> <subdir>] <cache-record> <cache-record> ...) |
139 | 137 |
140 where each <cache-record> has the form | 138 where each <cache-record> has the form |
141 | 139 |
142 (<root> <modtimes> <completion-table>)") | 140 (<root> <modtimes> <completion-table>)") |
143 #+infodock (defvaralias 'lib-completions 'lib-complete:cache) | |
144 | 141 |
145 (defun lib-complete:better-root (ROOT1 ROOT2) | 142 (defun lib-complete:better-root (ROOT1 ROOT2) |
146 "Return non-nil if ROOT1 is a superset of ROOT2." | 143 "Return non-nil if ROOT1 is a superset of ROOT2." |
147 (and (equal (file-name-directory ROOT1) (file-name-directory ROOT2)) | 144 (and (equal (file-name-directory ROOT1) (file-name-directory ROOT2)) |
148 (string-match | 145 (string-match |
318 (interactive | 315 (interactive |
319 (list (get-library-path) | 316 (list (get-library-path) |
320 (if current-prefix-arg | 317 (if current-prefix-arg |
321 (read-coding-system "Coding System: ")))) | 318 (read-coding-system "Coding System: ")))) |
322 (find-file-other-window library codesys)) | 319 (find-file-other-window library codesys)) |
323 #+infodock (defalias 'lib-edit-other-window 'find-library-other-window) | |
324 | 320 |
325 (defun find-library-other-frame (library &optional codesys) | 321 (defun find-library-other-frame (library &optional codesys) |
326 "Load the library named LIBRARY in a newly-created frame. | 322 "Load the library named LIBRARY in a newly-created frame. |
327 Under XEmacs/Mule, the optional second argument specifies the | 323 Under XEmacs/Mule, the optional second argument specifies the |
328 coding system to use when decoding the file. Interactively, | 324 coding system to use when decoding the file. Interactively, |
336 ; This conflicts with an existing binding | 332 ; This conflicts with an existing binding |
337 ;(define-key global-map "\C-xl" 'find-library) | 333 ;(define-key global-map "\C-xl" 'find-library) |
338 (define-key global-map "\C-x4l" 'find-library-other-window) | 334 (define-key global-map "\C-x4l" 'find-library-other-window) |
339 (define-key global-map "\C-x5l" 'find-library-other-frame) | 335 (define-key global-map "\C-x5l" 'find-library-other-frame) |
340 | 336 |
341 #+infodock (defalias 'lib-where-is 'locate-library) | |
342 | |
343 #+infodock (provide 'lib) | |
344 (provide 'lib-complete) | 337 (provide 'lib-complete) |
345 | 338 |
346 ;;; lib-complete.el ends here | 339 ;;; lib-complete.el ends here |