File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 25
25
26
26
(defun +parinfer-rust-mode-maybe ()
27
27
(when (or parinfer-rust-auto-download (file-exists-p (expand-file-name parinfer-rust--lib-name parinfer-rust-library-directory)))
28
- (parinfer-rust-mode 1 ))))
28
+ (parinfer-rust-mode 1 )))
29
+
30
+ ; ; HACK: Disable `parinfer-rust-mode' on some commands.
31
+ (defvar-local +parinfer-rust--was-enabled-p nil )
32
+
33
+ (defun +parinfer-rust--restore (&rest _)
34
+ (when +parinfer-rust--was-enabled-p
35
+ (setq +parinfer-rust--was-enabled-p nil )
36
+ (parinfer-rust-mode 1 )))
37
+
38
+ (defun +parinfer-rust--disable (&rest _)
39
+ (setq +parinfer-rust--was-enabled-p (bound-and-true-p parinfer-rust-mode))
40
+ (when +parinfer-rust--was-enabled-p
41
+ (parinfer-rust-mode -1 )))
42
+
43
+ ; ; Fix the issue of `vundo` (related to `track-changes`) when exploring the undo tree
44
+ (with-eval-after-load 'vundo
45
+ (add-hook 'vundo-pre-enter-hook #'+parinfer-rust--disable )
46
+ (add-hook 'vundo-post-exit-hook #'+parinfer-rust--restore )))
29
47
30
48
(use-package macrostep
31
49
:straight t
Original file line number Diff line number Diff line change 1229
1229
1230
1230
; ;; For `me-emacs-lisp'
1231
1231
1232
+ (with-eval-after-load 'parinfer-rust-mode
1233
+ ; ; The `evil-shif-right' (and `evil-shift-left' which uses it under the hood)
1234
+ ; ; behave strangely when `parinfer-rust-mode' is enabled, so lets disable when
1235
+ ; ; using this command.
1236
+ (when (fboundp '+parinfer-rust--disable ) ; defined in `me-emacs-lisp'
1237
+ (with-eval-after-load 'evil
1238
+ (advice-add #'evil-shift-right :before #'+parinfer-rust--disable )
1239
+ (advice-add #'evil-shift-right :after #'+parinfer-rust--restore ))))
1240
+
1232
1241
(+map-local! :package macrostep :module me-emacs-lisp
1233
1242
:keymaps '(emacs-lisp-mode-map lisp-mode-map)
1234
1243
" m" '(macrostep-expand :wk " Expand macro" ))
You can’t perform that action at this time.
0 commit comments