Commit 56b6cb04 authored by Linus Tolke Y's avatar Linus Tolke Y
Browse files

Fixed completing for complete but not unique (and emacs-18)

parent f5c43851
No preview for this file type
......@@ -90,12 +90,17 @@ Returns the name."
lyskom-minibuffer-local-completion-map)
(minibuffer-local-must-match-map
lyskom-minibuffer-local-must-match-map))
(condition-case error
(completing-read prompt
'lyskom-read-conf-name-internal
type
mustmatch
initial
'lyskom-name-hist)))
'lyskom-name-hist)
(wrong-number-of-arguments ; This is for emacs 18.
(completing-read prompt 'lyskom-read-conf-name-internal
type mustmatch)))
))
(defun lyskom-read-conf-name-internal (string predicate all)
......@@ -163,9 +168,28 @@ to conf-no translator."
res)))))
(cond
((eq all 'conf-no)
(cond
((= (length mappedlist) 1)
(car mappedlist))
(t (let ((found nil))
(while (and (not found) mappedlist)
(if (string= string
(conf-stat->name (blocking-do 'get-conf-stat
(car mappedlist))))
(setq found (car mappedlist)))
(setq mappedlist (cdr mappedlist)))
found))))
((eq all 'lambda)
(= (length mappedlist) 1))
(or (= (length mappedlist) 1)
(let ((found nil))
(while (and (not found)
mappedlist)
(if (string= string
(conf-stat->name (blocking-do 'get-conf-stat
(car mappedlist))))
(setq found t))
(setq mappedlist (cdr mappedlist)))
found)))
(all
(mapcar (function (lambda (no)
(conf-stat->name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment