diff options
Diffstat (limited to 'lisp/eshell/esh-arg.el')
-rw-r--r-- | lisp/eshell/esh-arg.el | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index 026edc59808..46850958267 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el @@ -155,14 +155,22 @@ treated as a literal character." :type 'hook :group 'eshell-arg) +(defvar eshell-arg-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "C-c M-b") #'eshell-insert-buffer-name) + map)) + ;;; Functions: +(define-minor-mode eshell-arg-mode + "Minor mode for the arg eshell module. + +\\{eshell-arg-mode-map}" + :keymap eshell-arg-mode-map) + (defun eshell-arg-initialize () ;Called from `eshell-mode' via intern-soft! "Initialize the argument parsing code." - ;; This is supposedly run after enabling esh-mode, when eshell-mode-map - ;; already exists. - (defvar eshell-command-map) - (define-key eshell-command-map [(meta ?b)] 'eshell-insert-buffer-name) + (eshell-arg-mode) (set (make-local-variable 'eshell-inside-quote-regexp) nil) (set (make-local-variable 'eshell-outside-quote-regexp) nil)) |