Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun completing-read-alist (prompt collection &rest args)
- (let* ((coll (mapc (lambda (el)
- (if (and (consp el) (cdr el))
- (setf (car el)
- (propertize (format "%s" (car el)) :values (cdr el)))
- el))
- collection))
- (input (apply 'completing-read prompt coll args)))
- (or (get-text-property 0 :values input) input)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement