emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C-r and C-s in minibuffer should search completion


From: Juri Linkov
Subject: Re: C-r and C-s in minibuffer should search completion
Date: Tue, 22 Apr 2008 00:51:01 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

>> This works correctly in the following patch:
>
> Looks good, feel free to install.

Ah, I accidentally tested this with a Lisp version of
`internal-complete-buffer' that I created earlier.
But when I restored the C version of `internal-complete-buffer',
it doesn't work with it.

I don't understand why it works with with the equivalent
Lisp version, but not with the C version.  The C version
returns a full buffer list disregarding the `predicate' arg.
This is a working Lisp version for your reference:

(defun internal-complete-buffer (string predicate flag)
  (let ((table (mapcar 'buffer-name (buffer-list))))
    (cond
     ((null flag) (try-completion string table predicate))
     ((eq flag t) (all-completions string table predicate t))
     (t (test-completion string table predicate)))))

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]