diff options
author | Sean Allred <code@seanallred.com> | 2014-11-19 10:57:43 -0500 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2014-11-19 10:57:43 -0500 |
commit | 48e3e7bfd485901e90d807e4470ce8d192459933 (patch) | |
tree | ac6bf1e984054319d7efa6f83310ef675fab5df4 | |
parent | 54d19079879332b0ff034c290baf1fe79a697f10 (diff) |
Use `user-error' when there's no question at point
-rw-r--r-- | sx-question-mode.el | 2 | ||||
-rw-r--r-- | sx-request.el | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sx-question-mode.el b/sx-question-mode.el index 4e40e2c..37d50f9 100644 --- a/sx-question-mode.el +++ b/sx-question-mode.el @@ -456,7 +456,7 @@ URL is used as 'help-echo and 'url properties." (interactive) (browse-url (or (get-text-property (or pos (point)) 'url) - (error "No url under point: %s" (or pos (point)))))) + (user-error "No url under point: %s" (or pos (point)))))) (defun sx-question-mode-find-reference (id &optional fallback-id) "Find url identified by reference ID in current buffer. diff --git a/sx-request.el b/sx-request.el index aeb2931..c49a62d 100644 --- a/sx-request.el +++ b/sx-request.el @@ -130,6 +130,7 @@ the main content of the response is returned." (error "Something went wrong in `url-retrieve-synchronously'") (with-current-buffer response-buffer (let* ((data (progn + ;; @TODO use url-http-end-of-headers (goto-char (point-min)) (if (not (search-forward "\n\n" nil t)) (error "Headers missing; response corrupt") |