[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8266: :complete-function in define-widget does not work as it used t
From: |
Lennart Borgman |
Subject: |
bug#8266: :complete-function in define-widget does not work as it used to |
Date: |
Thu, 17 Mar 2011 00:39:06 +0100 |
I have used constructs like this many times, but now the
:complete-function does not work any more. It gives me "idx" (which I
expect) but insert it in the wrong place.
To show it evaluate the code below and do "M-x customize-option RET
idxsearch-engine RET" and try to complete the choice.
(defvar idxsearch-engines
'((idxdocidxer-search "DocIndexer")
(idxgds-search "Google Desktop Search")
(idxwds-search "Windows Desktop Search"))
"Search engines.")
(defun idxsearch-funp (fun)
(assoc fun idxsearch-engines))
(define-widget 'idxsearch-function 'function
"A index search function known by `idxsearch."
:complete-function (lambda ()
(interactive)
(lisp-complete-symbol 'idxsearch-funp))
:prompt-match 'idxsearch-funp
:prompt-history 'widget-function-prompt-value-history
:match-alternatives '(idxsearch-funp)
:validate (lambda (widget)
(unless (idxsearch-funp (widget-value widget))
(widget-put widget :error (format "Unknown index
search function: %S"
(widget-value widget)))
widget))
:value 'fundamental-mode
:tag "Index search specific function")
(defcustom idxsearch-engine (cond
((idxgds-query-url-p) 'idxgds-search)
(t (if (eq system-type 'windows-nt)
'idxwds-search
'idxdocidxer-search)))
"Desktop search engine for `idxsearch' to use."
:type 'idxsearch-function
:group 'idxsearch)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#8266: :complete-function in define-widget does not work as it used to,
Lennart Borgman <=