- (add-hook 'minibuffer-setup-hook 'tmm-add-prompt)
- (if default-item
- (setq out (car (nth index-of-default tmm-km-list)))
- (save-excursion
- (unwind-protect
- (setq out
- (completing-read
- (concat gl-str
- " (up/down to change, PgUp to menu): ")
- tmm-km-list nil t nil
- (cons 'history
- (- (* 2 history-len) index-of-default))))
- (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt)
- (if (get-buffer "*Completions*")
- (with-current-buffer "*Completions*"
- (use-local-map tmm-old-comp-map)
- (bury-buffer (current-buffer)))))))))
+ (setq out
+ (if default-item
+ (car (nth index-of-default tmm-km-list))
+ (minibuffer-with-setup-hook #'tmm-add-prompt
+ (completing-read
+ (concat gl-str
+ " (up/down to change, PgUp to menu): ")
+ tmm-km-list nil t nil
+ (cons 'history
+ (- (* 2 history-len) index-of-default))))))))