annotate lisp/dired/gmhist-cmp.el @ 14:9ee227acff29 r19-15b90

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