|
@@ -10499,32 +10499,27 @@ from."
|
|
|
|
|
|
(defun org-icompleting-read (&rest args)
|
|
|
"Completing-read using `ido-mode' or `iswitchb' speedups if available.
|
|
|
-
|
|
|
Should be called like `completing-read'."
|
|
|
- (let ((default-completion (or completing-read-function
|
|
|
- completion-read)))
|
|
|
- (org-without-partial-completion
|
|
|
- (if (not (listp (second args)))
|
|
|
- ;; Ido only supports lists as the COLLECTION argument. Use
|
|
|
- ;; default completion function when second argument is not a
|
|
|
- ;; list.
|
|
|
- (apply default-completion args)
|
|
|
- (let ((ido-enter-matching-directory nil))
|
|
|
- (apply (cond ((and org-completion-use-ido
|
|
|
- (fboundp 'ido-completing-read)
|
|
|
- (boundp 'ido-mode)
|
|
|
- ido-mode)
|
|
|
- 'ido-completing-read)
|
|
|
- ((and org-completion-use-iswitchb
|
|
|
- (boundp 'iswitchb-mode)
|
|
|
- iswitchb-mode)
|
|
|
- 'org-iswitchb-completing-read)
|
|
|
- (t default-completion))
|
|
|
- (pop args)
|
|
|
- (if (org-some 'consp (car args))
|
|
|
- (mapcar 'car (pop args))
|
|
|
- (pop args))
|
|
|
- args))))))
|
|
|
+ (org-without-partial-completion
|
|
|
+ (if (not (listp (nth 1 args)))
|
|
|
+ ;; Ido only supports lists as the COLLECTION argument. Use
|
|
|
+ ;; default completion function when second argument is not
|
|
|
+ ;; a list.
|
|
|
+ (apply #'completing-read args)
|
|
|
+ (let ((ido-enter-matching-directory nil))
|
|
|
+ (apply (cond ((and org-completion-use-ido
|
|
|
+ (fboundp 'ido-completing-read)
|
|
|
+ (org-bound-and-true-p ido-mode))
|
|
|
+ #'ido-completing-read)
|
|
|
+ ((and org-completion-use-iswitchb
|
|
|
+ (org-bound-and-true-p iswitchb-mode))
|
|
|
+ #'org-iswitchb-completing-read)
|
|
|
+ (t #'completing-read))
|
|
|
+ (pop args)
|
|
|
+ (if (org-some #'consp (car args))
|
|
|
+ (mapcar #'car (pop args))
|
|
|
+ (pop args))
|
|
|
+ args)))))
|
|
|
|
|
|
(defun org-extract-attributes (s)
|
|
|
"Extract the attributes cookie from a string and set as text property."
|