From 2405e1aa4cae7a1d5ab921edcd3c161461c9ad02 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 8 May 2017 10:46:11 +0200 Subject: [PATCH] Fix +eval/region failing on first invocation --- TODO.org | 5 +++-- modules/feature/eval/config.el | 25 +++++++++++++------------ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/TODO.org b/TODO.org index a64148ccb..696b26ce6 100644 --- a/TODO.org +++ b/TODO.org @@ -93,11 +93,12 @@ + [ ] Fix invisible buffer-info in modeline for terminal Emacs + [ ] tools/upload: add ~+upload/open-remote-file~ command to open current file on the remote (with TRAMP) -** 2.0.2 [54/58] +** 2.0.2 [55/58] + [ ] Update screenshots -+ [ ] Fix ~+eval/region~ failing only on first invokation. + [ ] send-to-REPL workflow: does it still work? (see ~:repl~ & ~+eval/repl-send-region~) + [ ] Fix ~0/0~ displaying in modeline (caused by leftover anzu state) ++ [X] Fix ~+eval/region~ failing only on first invocation. + Caused by ~+eval-runners-alist~ not being populated until quickrun is loaded. + [X] Fix: Neotree forgets it's a neotree window when switching perspectives + +Restore neotree state on perspective switch+ + +Or close neotree before switching/creating perspectives+ diff --git a/modules/feature/eval/config.el b/modules/feature/eval/config.el index 97ce85154..7c17884e4 100644 --- a/modules/feature/eval/config.el +++ b/modules/feature/eval/config.el @@ -71,18 +71,19 @@ invokes the repl. Takes the same arguements as `rtog/add-repl'." (quickrun-add-command MODE COMMAND :mode MODE). 4. If MODE is not a string and COMMANd is a symbol, add it to `+eval-runners-alist', which is used by `+eval/region'." - `(after! quickrun - ,(cond ((symbolp command) - `(push ',(cons mode command) +eval-runners-alist)) - ((stringp command) - `(push ',(cons mode command) - ,(if (stringp mode) - 'quickrun-file-alist - 'quickrun--major-mode-alist))) - ((listp command) - `(quickrun-add-command - ,(symbol-name mode) - ',command :mode ',mode))))) + (cond ((symbolp command) + `(push ',(cons mode command) +eval-runners-alist)) + ((stringp command) + `(after! quickrun + (push ',(cons mode command) + ,(if (stringp mode) + 'quickrun-file-alist + 'quickrun--major-mode-alist)))) + ((listp command) + `(after! quickrun + (quickrun-add-command + ,(symbol-name mode) + ',command :mode ',mode))))) (def-package! quickrun :commands (quickrun