branch: externals/ergoemacs-mode
commit 2091646676a31043512e4924f08aa68015190a70
Merge: f5aa0f7 10007d2
Author: Matthew Fidler <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #497 from wlandry/space_in_filenames
Preserve the behavior of 'space' when rebinding inside a minibuffer
---
ergoemacs-map.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ergoemacs-map.el b/ergoemacs-map.el
index 15a1040..1e758cd 100644
--- a/ergoemacs-map.el
+++ b/ergoemacs-map.el
@@ -1023,7 +1023,12 @@ When INI is non-nil, add conditional maps to
`minor-mode-map-alist'."
(use-local-map (ergoemacs current-local-map))
(setq ergoemacs-map--breadcrumb ""))
(when (and (minibufferp) ergoemacs-read-from-minibuffer-map)
- (use-local-map (ergoemacs ergoemacs-read-from-minibuffer-map))
+ ;; Preserve bindings for space, such as when completing a filename
+ (if (and (equal (key-binding " ") 'self-insert-command))
+ (use-local-map (list 'keymap
+ '(32 . self-insert-command) ;; space==32
+ (ergoemacs
ergoemacs-read-from-minibuffer-map)))
+ (use-local-map (ergoemacs ergoemacs-read-from-minibuffer-map)))
(setq ergoemacs-read-from-minibuffer-map nil
ergoemacs-map--breadcrumb ""))
;; Run deferred "hooks"