diff options
Diffstat (limited to 'lisp/eshell/esh-var.el')
-rw-r--r-- | lisp/eshell/esh-var.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index b08a5d242fe..6ec58464c54 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -197,8 +197,19 @@ function), and the arguments passed to this function would be the list (put 'eshell-variable-aliases-list 'risky-local-variable t) +(defvar eshell-var-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "C-c M-v") #'eshell-insert-envvar) + map)) + ;;; Functions: +(define-minor-mode eshell-var-mode + "Minor mode for the esh-var module. + +\\{eshell-var-mode-map}" + :keymap eshell-var-mode-map) + (defun eshell-var-initialize () ;Called from `eshell-mode' via intern-soft! "Initialize the variable handle code." ;; Break the association with our parent's environment. Otherwise, @@ -207,11 +218,6 @@ function), and the arguments passed to this function would be the list (set (make-local-variable 'process-environment) (eshell-copy-environment))) - ;; This is supposedly run after enabling esh-mode, when eshell-command-map - ;; already exists. - (defvar eshell-command-map) - (define-key eshell-command-map [(meta ?v)] 'eshell-insert-envvar) - (set (make-local-variable 'eshell-special-chars-inside-quoting) (append eshell-special-chars-inside-quoting '(?$))) (set (make-local-variable 'eshell-special-chars-outside-quoting) |