"Suggest applying the minibuffer action to each completion candidate in turn."
(interactive nil minibuffer-mode)
(with-minibuffer-completions-window
- (let ((prev (point))
- all done)
+ (let (prev all done)
(goto-char (point-min))
+ ;; Clear `first-completion' property from beginning of buffer such
+ ;; that first call to `minibuffer-next-completion' below "selects"
+ ;; the first completion, instead of moving forward to the second.
(when (get-text-property (point) 'first-completion)
(let ((inhibit-read-only t))
(remove-text-properties (point) (1+ (point)) '(first-completion))))
(call-interactively #'minibuffer-apply)))
(?n) ; Skip.
(?q (setq done t)) ; Quit.
- (?! (setq all ?y))) ; Apply to all.
+ (?! ; Apply to all.
+ (with-current-buffer completion-reference-buffer
+ (call-interactively #'minibuffer-apply))
+ (setq all ?y)))
;; We're back at the first candidate, stop.
(setq done t)
(message "Done"))))))