Command reported as "??"
fniessen opened this issue · 3 comments
fniessen commented
Hello,
I do have the following code in https://github.com/fniessen/emacs-leuven/blob/master/emacs-leuven.el.
;; Hotkey for showing the log buffer.
(global-set-key (kbd "C-h C-l")
(lambda ()
(interactive)
(interaction-log-mode 1)
(display-buffer ilog-buffer-name)))
Though, after C-h, Guide-key shows me that typing C-l calls "??", as you can see on http://screencast.com/t/cxcHCzzFhWX.
Any idea what's wrong here?
kai2nenobu commented
It's because lambda expression doesn't have its name .
If you want to name it, explicitly define it as below.
(defun your-favorite-command-name ()
(interactive)
(interaction-log-mode 1)
(display-buffer ilog-buffer-name)))
(global-set-key (kbd "C-h C-l") 'your-favorite-command-name)
svauban commented
Of course; how can I have missed that? Sorry for disturbing you! Thx.
kai2nenobu commented
You are welcome.