branch: externals/ergoemacs-mode commit c7907aaaa5450a9453ab4149305b156412822ab2 Author: Walter Landry <wlan...@caltech.edu> Commit: Walter Landry <wlan...@caltech.edu>
In term-mode, modify both term-raw-map and current-local-map Fixes #499 --- ergoemacs-map.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ergoemacs-map.el b/ergoemacs-map.el index 1e758cd..8702952 100644 --- a/ergoemacs-map.el +++ b/ergoemacs-map.el @@ -1020,7 +1020,16 @@ When INI is non-nil, add conditional maps to `minor-mode-map-alist'." (setq ergoemacs-map--breadcrumb (format "%s" major-mode)) (when (eq major-mode 'ess-mode) (setq ergoemacs-map--breadcrumb (format "ess-mode-%s" ess-language))) - (use-local-map (ergoemacs current-local-map)) + ;; term-mode has a term-raw-map that it checks against + ;; current-local-map to see if it is in line-mode or + ;; char-mode. So we have to modify both term-raw-map and + ;; current-local-map to be able to switch. + (if (not (eq major-mode 'term-mode)) + (use-local-map (ergoemacs current-local-map)) + (progn + (setq term-raw-map (ergoemacs term-raw-map)) + (use-local-map term-raw-map)) + ) (setq ergoemacs-map--breadcrumb "")) (when (and (minibufferp) ergoemacs-read-from-minibuffer-map) ;; Preserve bindings for space, such as when completing a filename