File tree Expand file tree Collapse file tree 4 files changed +7
-13
lines changed Expand file tree Collapse file tree 4 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -1123,9 +1123,8 @@ A scroll bar is displayed from LO to LO+BAR."
1123
1123
1124
1124
(cl-defgeneric corfu--affixate (cands)
1125
1125
" Annotate CANDS with annotation function."
1126
- (let* ((extras (nth 4 completion-in-region--data))
1127
- (dep (plist-get extras :company-deprecated ))
1128
- (mf (let ((completion-extra-properties extras))
1126
+ (let* ((dep (corfu--metadata-get 'company-deprecated ))
1127
+ (mf (let ((completion-extra-properties (nth 4 completion-in-region--data)))
1129
1128
(run-hook-with-args-until-success 'corfu-margin-formatters corfu--metadata))))
1130
1129
(setq cands
1131
1130
(if-let ((aff (corfu--metadata-get 'affixation-function )))
Original file line number Diff line number Diff line change @@ -86,8 +86,7 @@ subsequent delay."
86
86
(funcall (if corfu-echo--message #'cdr #'car )
87
87
corfu-echo-delay)
88
88
corfu-echo-delay))
89
- (extra (nth 4 completion-in-region--data))
90
- (fun (plist-get extra :company-docsig ))
89
+ (fun (corfu--metadata-get 'company-docsig ))
91
90
(cand (and (>= corfu--index 0 )
92
91
(nth corfu--index corfu--candidates))))
93
92
(if (<= delay 0 )
Original file line number Diff line number Diff line change @@ -74,8 +74,7 @@ If called with a prefix ARG, the buffer is persistent."
74
74
(when (< corfu--index 0 )
75
75
(user-error " No candidate selected" ))
76
76
(let ((cand (nth corfu--index corfu--candidates)))
77
- (if-let ((extra (nth 4 completion-in-region--data))
78
- (fun (plist-get extra :company-doc-buffer ))
77
+ (if-let ((fun (corfu--metadata-get 'company-doc-buffer ))
79
78
(res (funcall fun cand)))
80
79
(set-window-start (corfu-info--display-buffer
81
80
(get-buffer (or (car-safe res) res))
@@ -92,8 +91,7 @@ If called with a prefix ARG, the buffer is persistent."
92
91
(when (< corfu--index 0 )
93
92
(user-error " No candidate selected" ))
94
93
(let ((cand (nth corfu--index corfu--candidates)))
95
- (if-let ((extra (nth 4 completion-in-region--data))
96
- (fun (plist-get extra :company-location ))
94
+ (if-let ((fun (corfu--metadata-get 'company-location ))
97
95
; ; BUG: company-location may throw errors if location is not found
98
96
(loc (ignore-errors (funcall fun cand))))
99
97
(with-selected-window
Original file line number Diff line number Diff line change @@ -182,8 +182,7 @@ all values are in pixels relative to the origin. See
182
182
(let ((old-buffers (buffer-list )) (buffer nil ))
183
183
(unwind-protect
184
184
(when-let
185
- ((extra (nth 4 completion-in-region--data))
186
- (fun (plist-get extra :company-location ))
185
+ ((fun (corfu--metadata-get 'company-location ))
187
186
; ; BUG: company-location may throw errors if location is not found
188
187
(loc (ignore-errors (funcall fun candidate)))
189
188
((setq buffer
@@ -218,8 +217,7 @@ all values are in pixels relative to the origin. See
218
217
219
218
(defun corfu-popupinfo--get-documentation (candidate )
220
219
" Get the documentation for CANDIDATE."
221
- (when-let ((extra (nth 4 completion-in-region--data))
222
- (fun (plist-get extra :company-doc-buffer ))
220
+ (when-let ((fun (corfu--metadata-get 'company-doc-buffer ))
223
221
(res (save-excursion
224
222
(let ((inhibit-message t )
225
223
(message-log-max nil )
You can’t perform that action at this time.
0 commit comments