summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--completion-conf.el40
1 files changed, 32 insertions, 8 deletions
diff --git a/completion-conf.el b/completion-conf.el
index fdf0e10..35248c6 100644
--- a/completion-conf.el
+++ b/completion-conf.el
@@ -91,18 +91,42 @@ minibuffer as usual."
(remove-hook 'minibuffer-setup-hook 'durand-headlong-minibuffer-setup-hook)
(remove-hook 'minibuffer-exit-hook 'durand-headlong-minibuffer-exit-hook))
+;; Make sure `minibuffer-message' respects `inhibit-message'.
+
+(defun durand-minibuffer-respect-inhibit-advice (fn &rest args)
+ (cond (inhibit-message)
+ (t (apply fn args))))
+
+(advice-add 'minibuffer-message :around 'durand-minibuffer-respect-inhibit-advice)
+
;;;###autoload
-(fset
- 'durand-completion-display-after-change
- (make-byte-code
- #x080
- (unibyte-string 192 32 135)
- (vector #'minibuffer-completion-help)
- 2
+(defun durand-completion-display-after-change (&rest args)
"Call `minibuffer-completion-help' with no input.
\(fn &rest ARGS)"
- nil))
+ (cond
+ ((minibufferp)
+ (let ((while-no-input-ignore-events '(selection-request)))
+ (while-no-input
+ (condition-case nil
+ (save-excursion
+ (goto-char (point-max))
+ (save-match-data
+ (let ((inhibit-message t))
+ (minibuffer-completion-help))))
+ (quit (abort-recursive-edit))))))))
+
+;; (fset
+;; 'durand-completion-display-after-change
+;; (make-byte-code
+;; #x080
+;; (unibyte-string 192 32 135)
+;; (vector #'minibuffer-completion-help)
+;; 2
+;; "Call `minibuffer-completion-help' with no input.
+
+;; \(fn &rest ARGS)"
+;; nil))
;;;###autoload
(fset