diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2022-11-19 18:07:00 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2022-11-19 18:07:00 +0100 |
| commit | b9bc65d967faff7eddc3155780d3848cd872512a (patch) | |
| tree | fe1158b548cbf8e9435b2996154193187bd0c41a | |
| parent | 0203139e5341c7203b88e8aa9b51c1ab0e1186d1 (diff) | |
corfu-popupinfo: Fix todo
| -rw-r--r-- | extensions/corfu-info.el | 2 | ||||
| -rw-r--r-- | extensions/corfu-popupinfo.el | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/extensions/corfu-info.el b/extensions/corfu-info.el index c9bf1b9..615e5d6 100644 --- a/extensions/corfu-info.el +++ b/extensions/corfu-info.el @@ -87,7 +87,7 @@ (goto-char (point-min)) (forward-line (1- (cdr loc)))) (set-window-start nil (point))))) - (user-error "Location is unknown"))) + (user-error "No location available"))) ;; Emacs 28: Do not show Corfu commands with M-X (put #'corfu-info-location 'completion-predicate #'ignore) diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el index 77beac6..657574c 100644 --- a/extensions/corfu-popupinfo.el +++ b/extensions/corfu-popupinfo.el @@ -329,11 +329,8 @@ the candidate popup, its value is 'bottom, 'top, 'right or 'left." (setf face-remapping-alist (copy-tree face-remapping-alist) (alist-get 'default face-remapping-alist) 'corfu-popupinfo)) (unless (eq corfu-popupinfo--toggle 'init) - (message - ;; TODO support custom functions, don't hard code the error! - (if (eq corfu-popupinfo--function #'corfu-popupinfo--get-documentation) - "No documentation available" - "Location is unknown"))) + (message "No %s available" + (last (split-string (symbol-name corfu-popupinfo--function) "-+")))) (corfu-popupinfo--hide) (setq doc-changed nil coords-changed nil corfu-popupinfo--toggle nil))) (when (or doc-changed coords-changed) |
