Once in a while, after I hit some key-combination -- and I am not able to figure out which one, I get this error every time I am trying to use the minibuffer in any way:
wrong-type-argument consp nil
I was able to go to the *messages*
buffer (not trivial to do without using the minibuffer), and I could see:
Error in minibuffer-exit-hook (smart-dash-minibuffer-exit): (wrong-type-argument consp nil)
So I tracked this to:
(defun smart-dash-minibuffer-exit ()
(setq smart-dash-minibuffer-last-exit-command-stack
(cdr smart-dash-minibuffer-last-exit-command-stack)) ; pop
(setq smart-dash-minibuffer-this-command-stack
(cdr smart-dash-minibuffer-this-command-stack)) ; pop
(rplaca smart-dash-minibuffer-last-exit-command-stack this-command)) ;; <-- this line
where smart-dash-minibuffer-last-exit-command-stack
is nil
.
My elisp
fu is mediocre at best, so I added:
(unless smart-dash-minibuffer-last-exit-command-stack
(setq smart-dash-minibuffer-last-exit-command-stack (list nil)))
just before that line. But I am sure that you can do better than this hack (that might not even work properly).