File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -202,15 +202,19 @@ forever delay. HEIGHT of the tooltip that will display."
202
202
(msgu-silent (describe-symbol thing))
203
203
(buffer-string )))))
204
204
205
+ (defun jcs-poptip--fill-text (text &optional column )
206
+ " Fill TEXT with COLUMN size."
207
+ (with-temp-buffer
208
+ (let ((fill-column (or column (frame-width ))))
209
+ (insert text)
210
+ (fill-region (point-min ) (point-max ))
211
+ (buffer-string ))))
212
+
205
213
(defun jcs-poptip--describe-it ()
206
214
" Describe symbol at point."
207
215
(when-let* (((derived-mode-p 'lisp-data-mode ))
208
216
(desc (jcs-poptip--describe-symbol-string))
209
- (desc (with-temp-buffer
210
- (let ((fill-column (frame-width )))
211
- (insert desc)
212
- (fill-region (point-min ) (point-max ))
213
- (buffer-string )))))
217
+ (desc (jcs-poptip--fill-text desc)))
214
218
(if (or (string-empty-p desc)
215
219
(string= (string-trim desc) " [back]" ))
216
220
(error " [ERROR] No description at point " )
You can’t perform that action at this time.
0 commit comments