comparison lisp/dired/gmhist-cmp.el @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1 ;; gmhist-cmp.el
2
3 ;; Gmhist support for completer.el by ccm@CS.CMU.EDU (Christopher McConnell).
4 ;; This is known to work with version 3.01 of completer.el.
5
6 ;; You only need this when you don't like it that TAB and SPC complete
7 ;; partially and rather want M-TAB and M-SPC do that, leaving normal
8 ;; completion on TAB and SPC.
9
10 ;; Do partial filename completion only with M-SPC and M-TAB (SPC and
11 ;; TAB do usual completion) within gmhist's version of read-file-name.
12
13 (require 'completer) ; let it mung the keymaps
14
15 ;; Establish a filename key map separate from the other gmhist maps:
16 (setq completer-complete-filenames t
17 gmhist-filename-completion-map 'gmhist-completer-filename-completion-map
18 gmhist-filename-must-match-map 'gmhist-completer-filename-must-match-map)
19
20 ;; Fill the map with completer and gmhist key bindings:
21 (setq gmhist-completer-filename-must-match-map
22 (copy-keymap minibuffer-local-must-match-map)
23 gmhist-completer-filename-completion-map
24 (copy-keymap minibuffer-local-completion-map))
25 (mapcar
26 '(lambda (map)
27 (gmhist-define-keys map)
28 (define-key map "\e\t" 'completer-complete)
29 (define-key map "\e " 'completer-word)
30 (define-key map "\t" 'minibuffer-complete)
31 (define-key map " " 'minibuffer-complete-word))
32 (list gmhist-completer-filename-completion-map
33 gmhist-completer-filename-must-match-map))