all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Fix "Error during redisplay" from which-func.el
@ 2012-10-07  5:43 Takafumi Arakaki
  2012-10-07  6:46 ` Jambunathan K
  0 siblings, 1 reply; 2+ messages in thread
From: Takafumi Arakaki @ 2012-10-07  5:43 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

Hi,

This patch should fix the following error when there is no function
defined at point.

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

I get this error at point in python file when there is no function
defined before the cursor.

Takafumi

[-- Attachment #2: which-func-current-safer.patch --]
[-- Type: application/octet-stream, Size: 595 bytes --]

diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 4819149..1dd56c6 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -182,7 +182,8 @@ and you want to simplify them for the mode line
 (defconst which-func-current
   '(:eval (replace-regexp-in-string
 	   "%" "%%"
-	   (gethash (selected-window) which-func-table which-func-unknown))))
+	   (or (gethash (selected-window) which-func-table which-func-unknown)
+	       which-func-unknown))))
 ;;;###autoload (put 'which-func-current 'risky-local-variable t)
 
 (defvar which-func-mode nil

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix "Error during redisplay" from which-func.el
  2012-10-07  5:43 [PATCH] Fix "Error during redisplay" from which-func.el Takafumi Arakaki
@ 2012-10-07  6:46 ` Jambunathan K
  0 siblings, 0 replies; 2+ messages in thread
From: Jambunathan K @ 2012-10-07  6:46 UTC (permalink / raw)
  To: Takafumi Arakaki; +Cc: emacs-devel

Takafumi Arakaki <aka.tkf@gmail.com> writes:

> Hi,
>
> This patch should fix the following error when there is no function
> defined at point.
>
> Error during redisplay: (eval (replace-regexp-in-string "%" "%%"
> (gethash (selected-window) which-func-table which-func-unknown)))
> signaled (wrong-type-argument arrayp nil)
>
> I get this error at point in python file when there is no function
> defined before the cursor.
>
> Takafumi
>

There is an existing bug report with similar symptoms

    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12338 
-- 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-07  6:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-07  5:43 [PATCH] Fix "Error during redisplay" from which-func.el Takafumi Arakaki
2012-10-07  6:46 ` Jambunathan K

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.