Subject: bug#12338: Status: 24.2.50; Error during redisplay (apropos which-function-mode?)

From: Michael Heerdegen <[email-masked]>
Date: Mon, 22 Oct 2012 13:12:25 +0200

Jambunathan K <[email-masked]> writes:

> See
> http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00353.html

I can confirm that this patch fixes the bug.  Please install.

BTW, here is a recipe to reproduce this bug with emacs -Q in the
*scratch* buffer:

1. M-: (progn
         (switch-to-buffer "*scratch*")
         (which-func-mode)
         (goto-char (point-max))
         (insert "(defun test (x) 1)")
         (setq pop-up-windows t)
         (display-buffer "*Messages*"))

2. Move point into the comment at the beginning of *scratch*.  You get
the message (over and over):

Error during redisplay: (eval (replace-regexp-in-string "%" "%%"
(gethash (selected-window) which-func-table which-func-unknown)))
signaled (wrong-type-argument arrayp nil)

Thanks,

Michael.