Skip to content

Commit c82bcfb

Browse files
committed
explain: reference to free variable ‘url-http-end-of-headers’
1 parent ac6369a commit c82bcfb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

consult-hn.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ BUFFER-CALLBACK is an optional function called with the request buffer."
230230
(equal input expected-search))
231231
(if-let ((error (plist-get status :error)))
232232
(message "HN fetch error: %s" error)
233+
;; When `url-retrieve` fetches an HTTP resource, it:
234+
;; 1. Creates a buffer with the full HTTP response (headers + body)
235+
;; 2. Sets `url-http-end-of-headers` as a marker pointing to the position right
236+
;; after the HTTP headers end (typically after the blank line that separates
237+
;; headers from body)
233238
(when (and url-http-end-of-headers
234239
(marker-position url-http-end-of-headers))
235240
(goto-char url-http-end-of-headers)
@@ -373,6 +378,7 @@ INITIAL is for when it's called programmatically with an input."
373378
consult-hn--plist-keywordize
374379
(apply consult-hn-browse-fn)))
375380

381+
(defvar embark-default-action-overrides)
376382
(when (featurep 'embark)
377383
(setf (alist-get 'consult-hn-result embark-default-action-overrides)
378384
#'consult-hn--open))

0 commit comments

Comments
 (0)