home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / dired / gmhist-cmp.el < prev    next >
Encoding:
Text File  |  1994-09-20  |  1.3 KB  |  34 lines

  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))
  34.