[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/ido.el
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/ido.el |
Date: |
Sun, 07 Jul 2002 19:03:19 -0400 |
Index: emacs/lisp/ido.el
diff -c emacs/lisp/ido.el:1.3 emacs/lisp/ido.el:1.4
*** emacs/lisp/ido.el:1.3 Sun Jul 7 17:16:23 2002
--- emacs/lisp/ido.el Sun Jul 7 19:02:54 2002
***************
*** 1256,1261 ****
--- 1256,1262 ----
(define-key map "\C-c" 'ido-toggle-case)
(define-key map "\C-e" 'ido-edit-input)
(define-key map "\t" 'ido-complete)
+ (define-key map " " 'ido-complete-space)
(define-key map "\C-j" 'ido-select-text)
(define-key map "\C-m" 'ido-exit-minibuffer)
(define-key map "\C-p" 'ido-toggle-prefix)
***************
*** 1942,1947 ****
--- 1943,1969 ----
(ido-completion-help)
)))))
+ (defun ido-complete-space ()
+ "Try completion unless inserting the space makes sense."
+ (interactive)
+ (if (and (stringp ido-common-match-string)
+ (stringp ido-text)
+ (cond
+ ((> (length ido-common-match-string) (length ido-text))
+ (= (aref ido-common-match-string (length ido-text)) ? ))
+ (ido-matches
+ (let (insert-space
+ (re (concat (regexp-quote ido-text) " "))
+ (comp ido-matches))
+ (while comp
+ (if (string-match re (ido-name (car comp)))
+ (setq comp nil insert-space t)
+ (setq comp (cdr comp))))
+ insert-space))
+ (t nil)))
+ (insert " ")
+ (ido-complete)))
+
(defun ido-undo-merge-work-directory (&optional text try refresh)
"Undo or redo last ido directory merge operation.
If no merge has yet taken place, toggle automatic merging option."
***************
*** 2729,2735 ****
ido-enable-flex-matching
(> (length ido-text) 1)
(not ido-enable-regexp))
! (setq re (mapconcat 'identity (split-string ido-text "") ".*"))
(if ido-enable-prefix
(setq re (concat "\\`" re)))
(mapcar
--- 2751,2757 ----
ido-enable-flex-matching
(> (length ido-text) 1)
(not ido-enable-regexp))
! (setq re (mapconcat 'regexp-quote (split-string ido-text "") ".*"))
(if ido-enable-prefix
(setq re (concat "\\`" re)))
(mapcar
- [Emacs-diffs] Changes to emacs/lisp/ido.el, Juanma Barranquero, 2002/07/01
- [Emacs-diffs] Changes to emacs/lisp/ido.el,
Kim F. Storm <=
- [Emacs-diffs] Changes to emacs/lisp/ido.el, Kim F. Storm, 2002/07/08
- [Emacs-diffs] Changes to emacs/lisp/ido.el, Kim F. Storm, 2002/07/08
- [Emacs-diffs] Changes to emacs/lisp/ido.el, Kim F. Storm, 2002/07/08
- [Emacs-diffs] Changes to emacs/lisp/ido.el, Kim F. Storm, 2002/07/09
- [Emacs-diffs] Changes to emacs/lisp/ido.el, Juanma Barranquero, 2002/07/10
- [Emacs-diffs] Changes to emacs/lisp/ido.el, Kim F. Storm, 2002/07/10
- [Emacs-diffs] Changes to emacs/lisp/ido.el, Richard M. Stallman, 2002/07/12
- [Emacs-diffs] Changes to emacs/lisp/ido.el, Markus Rost, 2002/07/22