Hi Al,

Thanks for your patch.  I haven't tested, but from a quick look:

> --- a/preview.el
> +++ b/preview.el
> @@ -509,6 +509,11 @@ where:
>                      `buframe-position-right-of-overlay').
>    FRAME-PARAMETERS  Alist of extra frame parameters.
>    BUF-PARAMETERS    Alist of buffer-local variables and values."
> +  :set (lambda (sym val)
> +         (when (eq (or (and (consp val) (car val)) val)
> +                   'buframe)
> +           (require 'buframe))
> +         (set-default sym val))

I think the (require ...) here will inhibit lazy-loading of buframe.
Also, it returns a raw file-missing error rather than a user-error.

> +(defvar preview--buframe-error t
> +  "When non-nil, issue a one-time error if loading buframe fails.")
> +
>  (defun preview--update-buframe (&optional force)
>    "Show or hide a buframe popup depending on overlays at point.
>  
>  The frame is not updated if the `buframe' property has not changed,
>  unless FORCE is non-nil."

> ...

> +  (if (require 'buframe nil t)

> ...

> +    (when preview--buframe-error
> +      (error "buframe is unavailable for use with preview. \
> +See `preview-at-point-placement'.")
> +      (setq preview--buframe-error nil))))

It seems to me that this "else" branch will run whenever
preview--update-buframe is called, independent of whether the user
selected 'buframe for preview-at-point-placement.

Moreover, the setq will not happen because it comes after the error.

Thanks, best,

Paul



_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to