Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve the behavior of 'space' when rebinding inside a minibuffer #497

Merged
merged 1 commit into from
Oct 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Preserve the behavior of 'space' when rebinding inside a minibuffer
In minibuffers, the usual binding for 'space' is 'complete-word.  When
completing filenames, it is overriden to allow literal spaces.  This
fix preserves that override.

Fixes #471
  • Loading branch information
wlandry committed Oct 23, 2020
commit 10007d278575e7156b6d74f5578170c8432166f2
7 changes: 6 additions & 1 deletion ergoemacs-map.el
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down