[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 8016ae283b 1/3: corfu-popupinfo--show: Show error
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu 8016ae283b 1/3: corfu-popupinfo--show: Show error only when manually toggling the popup |
Date: |
Fri, 25 Aug 2023 03:57:34 -0400 (EDT) |
branch: externals/corfu
commit 8016ae283bd6a62a55906e2bf0c6c3f2cbf12afb
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
corfu-popupinfo--show: Show error only when manually toggling the popup
---
extensions/corfu-popupinfo.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index fdf02ee396..80b87ed278 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -185,6 +185,7 @@ all values are in pixels relative to the origin. See
(or (and (bufferp (car loc)) (car loc))
(get-file-buffer (car loc))
(let ((inhibit-message t)
+ (message-log-max nil)
(inhibit-redisplay t)
(enable-dir-local-variables nil)
(enable-local-variables :safe)
@@ -215,8 +216,8 @@ all values are in pixels relative to the origin. See
(when-let ((fun (plist-get corfu--extra :company-doc-buffer))
(res (save-excursion
(let ((inhibit-message t)
- (inhibit-redisplay t)
(message-log-max nil)
+ (inhibit-redisplay t)
;; Reduce print length for elisp backend (#249)
(print-level 3)
(print-length (* corfu-popupinfo-max-width
@@ -355,10 +356,6 @@ form (X Y WIDTH HEIGHT DIR)."
(set (make-local-variable (car var)) (cdr var)))
(when-let ((m (memq 'corfu-default (alist-get 'default
face-remapping-alist))))
(setcar m 'corfu-popupinfo)))
- (unless (eq corfu-popupinfo--toggle 'init)
- (message "No %s available for `%s'"
- (car (last (split-string (symbol-name
corfu-popupinfo--function) "-+")))
- candidate))
(corfu-popupinfo--hide)
(setq cand-changed nil coords-changed nil)))
(when (or cand-changed coords-changed)
@@ -444,7 +441,12 @@ See `corfu-popupinfo-scroll-up' for more details."
(corfu-popupinfo--hide)
(setq corfu-popupinfo--function fun
corfu-popupinfo--candidate nil)
- (corfu-popupinfo--show (nth corfu--index corfu--candidates))))
+ (let ((cand (nth corfu--index corfu--candidates)))
+ (corfu-popupinfo--show cand)
+ (unless (corfu-popupinfo--visible-p)
+ (user-error "No %s available for `%s'"
+ (car (last (split-string (symbol-name fun) "-+")))
+ cand)))))
(defun corfu-popupinfo-documentation ()
"Show or hide documentation in popup.