>>> - Add a setter code to `preview-at-point-placement` to require buframe
>>>   and issue an error if it's not available.
>>> - To deal with the case of the variable being set directly (without
>>>   calling the setter code), we can issue an error and override the value
>>>   of preview-at-point-placement back to its default value to avoid
>>>   further errors.
>>>
>>> What do you think?
>>
>> I think I have a preference for the latter; user could then still use
>> `setq' and not `setopt'.
>>
>> Best, Arash
>>
>
> How about:
>
> - (when (require 'buframe nil t) ...) in preview--update-buframe
>
> - A variable watcher that, when 'preview-at-point-placement' is changed
> to 'buframe, tries to require 'buframe and signals a user-error on
> failure.
>
> This would explain the problem without rewriting any user options.

On second thought, that approach would preclude lazy-loading for
buframe.  One could instead either:

(1) use (locate-library buframe) in the watcher to check whether it can
be loaded without loading it, or

(2) remove the watcher and simply issue a one-time warning in
preview-at-point-placement if buframe is not available.



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

Reply via email to