From be137e04b079c1a1f84b2b2db01e30e62c02cac1 Mon Sep 17 00:00:00 2001 From: Colin Woodbury Date: Thu, 2 Sep 2021 11:54:14 -0700 Subject: [PATCH] refactor!(parinfer): drop support for parinfer-mode BREAKING CHANGE: It is no longer maintained, and its author directly recommends `parinfer-rust-mode`. Fix #4323 --- modules/editor/parinfer/config.el | 25 ------------------------- modules/editor/parinfer/doctor.el | 17 ++++++++--------- modules/editor/parinfer/packages.el | 16 +--------------- 3 files changed, 9 insertions(+), 49 deletions(-) diff --git a/modules/editor/parinfer/config.el b/modules/editor/parinfer/config.el index fbb2f5050..4f1f14a21 100644 --- a/modules/editor/parinfer/config.el +++ b/modules/editor/parinfer/config.el @@ -1,31 +1,6 @@ ;;; editor/parinfer/config.el -*- lexical-binding: t; -*- -(use-package! parinfer - :unless (featurep! +rust) - :hook ((emacs-lisp-mode - clojure-mode - scheme-mode - lisp-mode - racket-mode - hy-mode) . parinfer-mode) - :init - (setq parinfer-extensions - '(defaults - pretty-parens - smart-tab - smart-yank)) - (when (featurep! :editor evil +everywhere) - (push 'evil parinfer-extensions)) - :config - (map! :map parinfer-mode-map - "\"" nil ; smartparens handles this - :i "" #'parinfer-smart-tab:dwim-right-or-complete - :i "" #'parinfer-smart-tab:dwim-left - :localleader - "p" #'parinfer-toggle-mode)) - (use-package! parinfer-rust-mode - :when (featurep! +rust) :when (bound-and-true-p module-file-suffix) :hook ((emacs-lisp-mode clojure-mode diff --git a/modules/editor/parinfer/doctor.el b/modules/editor/parinfer/doctor.el index 41528d6ea..092c982ba 100644 --- a/modules/editor/parinfer/doctor.el +++ b/modules/editor/parinfer/doctor.el @@ -1,11 +1,10 @@ ;;; editor/parinfer/doctor.el -*- lexical-binding: t; -*- -(when (featurep! +rust) - (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")))) +(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"))) diff --git a/modules/editor/parinfer/packages.el b/modules/editor/parinfer/packages.el index 7735494c6..a82d3e487 100644 --- a/modules/editor/parinfer/packages.el +++ b/modules/editor/parinfer/packages.el @@ -1,18 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/parinfer/packages.el -(if (featurep! +rust) - (package! parinfer-rust-mode :pin "c2c1bbec6cc7dad4f546868aa07609b8d58a78f8") - (when (featurep! :editor evil) - ;; Parinfer uses `evil-define-key' without loading evil, so if evil is - ;; installed *after* parinfer, parinfer will throw up void-function errors. - ;; because evil-define-key (a macro) wasn't expanded at compile-time. So we - ;; make sure evil is installed before parinfer... - (package! evil) - ;; ...and that it can see `evil-define-key' if evil was installed in a - ;; separate session: - (autoload 'evil-define-key "evil-core" nil nil 'macro)) - - (package! parinfer - :recipe (:host github :repo "emacsattic/parinfer") - :pin "8659c99a9475ee34af683fdf8f272728c6bebb3a")) +(package! parinfer-rust-mode :pin "c2c1bbec6cc7dad4f546868aa07609b8d58a78f8")