/[emacs]/emacs/lisp/ido.el
ViewVC logotype

Diff of /emacs/lisp/ido.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by kfstorm, Sun Jul 7 21:16:23 2002 UTC revision 1.4 by kfstorm, Sun Jul 7 23:02:54 2002 UTC
# Line 1256  This function also adds a hook to the mi Line 1256  This function also adds a hook to the mi
1256      (define-key map "\C-c" 'ido-toggle-case)      (define-key map "\C-c" 'ido-toggle-case)
1257      (define-key map "\C-e" 'ido-edit-input)      (define-key map "\C-e" 'ido-edit-input)
1258      (define-key map "\t" 'ido-complete)      (define-key map "\t" 'ido-complete)
1259        (define-key map " " 'ido-complete-space)
1260      (define-key map "\C-j" 'ido-select-text)      (define-key map "\C-j" 'ido-select-text)
1261      (define-key map "\C-m" 'ido-exit-minibuffer)      (define-key map "\C-m" 'ido-exit-minibuffer)
1262      (define-key map "\C-p" 'ido-toggle-prefix)      (define-key map "\C-p" 'ido-toggle-prefix)
# Line 1942  If INITIAL is non-nil, it specifies the Line 1943  If INITIAL is non-nil, it specifies the
1943          (ido-completion-help)          (ido-completion-help)
1944          )))))          )))))
1945    
1946    (defun ido-complete-space ()
1947      "Try completion unless inserting the space makes sense."
1948      (interactive)
1949      (if (and (stringp ido-common-match-string)
1950               (stringp ido-text)
1951               (cond
1952                ((> (length ido-common-match-string) (length ido-text))
1953                 (= (aref ido-common-match-string (length ido-text)) ? ))
1954                (ido-matches
1955                 (let (insert-space
1956                       (re (concat (regexp-quote ido-text) " "))
1957                       (comp ido-matches))
1958                   (while comp
1959                     (if (string-match re (ido-name (car comp)))
1960                         (setq comp nil insert-space t)
1961                       (setq comp (cdr comp))))
1962                   insert-space))
1963                (t nil)))
1964          (insert " ")
1965        (ido-complete)))
1966    
1967  (defun ido-undo-merge-work-directory (&optional text try refresh)  (defun ido-undo-merge-work-directory (&optional text try refresh)
1968    "Undo or redo last ido directory merge operation.    "Undo or redo last ido directory merge operation.
1969  If no merge has yet taken place, toggle automatic merging option."  If no merge has yet taken place, toggle automatic merging option."
# Line 2729  for first matching file." Line 2751  for first matching file."
2751                 ido-enable-flex-matching                 ido-enable-flex-matching
2752                 (> (length ido-text) 1)                 (> (length ido-text) 1)
2753                 (not ido-enable-regexp))                 (not ido-enable-regexp))
2754        (setq re (mapconcat 'identity (split-string ido-text "") ".*"))        (setq re (mapconcat 'regexp-quote (split-string ido-text "") ".*"))
2755        (if ido-enable-prefix        (if ido-enable-prefix
2756            (setq re (concat "\\`" re)))            (setq re (concat "\\`" re)))
2757        (mapcar        (mapcar

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26