У меня есть следующая привязка, она работает большую часть времени, за исключением нескольких случаев, когда файл в fundamental-mode
.
(define-key evil-motion-state-map "gd" 'dired-jump)
Я получаю эту ошибку, когда она вызывается
Debugger entered--Lisp error: (wrong-type-argument keymapp nil)
define-key(nil [menu-bar Operate] ("Operate" keymap "Operate"))
easy-menu-get-map(nil ("Operate") nil)
easy-menu-add-item(nil ("Operate") ["Find Files" dired-do-find-marked-files :help "Find current or marked files"] "Shell Command...")
byte-code
autoload-do-load((autoload "dired-x" "Jump to Dired buffer corresponding to current buffer.\nIf in a file, Dired the current directory and move to file's line.\nIf in Dired already, pop up a level and goto old directory's line.\nIn case the proper Dired file line cannot be found, refresh the dired\nbuffer and try again.\nWhen OTHER-WINDOW is non-nil, jump to Dired buffer in other window.\nWhen FILE-NAME is non-nil, jump to its line in Dired.\nInteractively with prefix argument, read FILE-NAME.\n\n(fn &optional OTHER-WINDOW FILE-NAME)" t nil) dired-jump)
command-execute(dired-jump)
Я подозреваю, что эта строка
(let ((menu (lookup-key dired-mode-map [menu-bar])))
(easy-menu-add-item menu '("Operate")
["Find Files" dired-do-find-marked-files
:help "Find current or marked files"]
"Shell Command...")
in dired-x.el
возвращает menu
как nil
. Можно ли как-то определить [menu-bar]
для dired-mode-map
? Или есть другое решение?