rolandwalker / simpleclip

Simplified access to the system clipboard in Emacs.
173 stars 16 forks source link

Make sure 'simpleclip-custom-content-provider is non-nil before using it. #17

Closed djl closed 3 years ago

djl commented 3 years ago

Fixes an issue introduced in #15.

Before this fix 'simpleclip-custom-content-provider was always used because it only checked that the variable was bound instead of checking for a non-nil value.

(boundp 'simpleclip-custom-content-provider)
;; t
simpleclip-custom-content-provider
;; nil

This resulted in always running an empty shell command.

A cleaner way might to be to only check for a non-nil value since if it's non-nil, 'bound-p will return true.

rolandwalker commented 3 years ago

Hi!

Makes sense.