Subject: Re: bug#16733: messed up unicode chars in package description

From: Stefan Monnier <[email-masked]>
Date: Fri, 21 Mar 2014 22:54:23 -0400

> --- lisp/url/url-handlers.el    2014-01-01 07:43:34 +0000
> +++ lisp/url/url-handlers.el    2014-03-22 01:16:06 +0000
> @@ -290,11 +290,14 @@
>        (insert data))
>      (list (length data) charset)))

> -;;;###autoload
> -(defun url-insert-file-contents (url &optional visit beg end replace)
> +(defun url-insert-file-contents-internal (check url &optional visit
> beg end replace)
>    (let ((buffer (url-retrieve-synchronously url)))
> -    (if (not buffer)
> -       (error "Opening input file: No such file or directory, %s" url))
> +    (when check
> +      (condition-case err
> +         (funcall check buffer url visit beg end replace)
> +       (error
> +        (when buffer (kill-buffer))
> +        (signal (car err) (cdr err)))))
>      (if visit (setq buffer-file-name url))
>      (save-excursion
>        (let* ((start (point))

Let's not call it "-internal" since it should be "always" preferred over
the other one.  Also, I see no need to pass "url visit beg end replace"
to "check" (if that function needs it, the caller can provide it).

Also, how 'bout only calling that `check' function in case of a problem?

        Stefan