Le Wang <
[hidden email]> writes:
> I have this simplified macro.
>
> (defadvice kill-buffer (around show-diff-rephrase-question activate compile)
> "Prompt when a buffer is about to be killed."
> (case (read-char-choice
> "(s/k/q)? "
> (append "sSKkQq" nil))
> ((?s ?S)
> ad-do-it)
> ((?k ?K)
> ad-do-it)
> ((?q ?Q) nil))
> ad-do-it)
>
> If I compile the file and load it, then I get "Invalid function: (115 83)"
>
> It works if I evaluate it.
I've modernised the code slightly:
(require 'cl-lib)
(defadvice kill-buffer (around show-diff-rephrase-question activate compile)
"Prompt when a buffer is about to be killed."
(cl-case (read-char-choice
"(s/k/q)? "
(append "sSKkQq" nil))
((?s ?S)
ad-do-it)
((?k ?K)
ad-do-it)
((?q ?Q) nil))
ad-do-it)
I tried byte-compiling it and loading the .elc file, and it still
doesn't bug out.
So I'm guessing this has been fixed over the years? I'm closing this
bug report; if you're still seeing this in recent Emacs versions, please
respond to the debbugs address and we'll reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog:
http://lars.ingebrigtsen.no