I am using the function tika-keymap-showhrk
which takes a list of modes, then constructs the associated -map
variable value for use with define-key
.
But I get the error
Debugger entered--Lisp error: (void-variable sh-mode-map)
symbol-value(sh-mode-map)
Here is the implementation code
(defun tika-keymap-showhrk (mdlist)
"Bind key sequence in keymap to the outline-show-all command."
(dolist (mjmode mdlist)
(let ( ($map (symbol-value (intern (format "%s-map" mjmode)))) )
(define-key $map (kbd "H-o a") #'outline-show-all))) )
(defvar tika-mjmode
'(emacs-lisp-mode sh-mode f90-mode fortran-mode latex-mode
plain-tex-mode) )
(defun tika-keymap-outlhrk ()
"My Elisp stuff."
(tika-keymap-showhrk tika-mjmode))