fix(parinfer): robust check for shared Rust object

This helps other platforms like Nix that put shared objects in
interesting places.
This commit is contained in:
Colin Woodbury 2021-09-16 21:16:32 -07:00
parent 8377046e5a
commit fc79256de5
No known key found for this signature in database
GPG key ID: 101BA589276BB074

View file

@ -3,8 +3,5 @@
(unless (fboundp 'module-load)
(warn! "Your emacs wasn't built with dynamic modules support. `parinfer-rust-mode' won't work"))
(when (and (eq system-type 'berkeley-unix)
(not (file-readable-p (concat user-emacs-directory
".local/etc/parinfer-rust/libparinfer_rust.so"))))
(warn! (concat "Could not read " user-emacs-directory
".local/etc/parinfer-rust/libparinfer_rust.so. "
"`parinfer-rust-mode' won't work")))
(not (file-readable-p parinfer-rust-library)))
(warn! (concat "Could not read " parinfer-rust-library ". `parinfer-rust-mode' won't work")))