From: Takafumi Arakaki <aka.tkf@gmail.com>
To: emacs-devel@gnu.org
Subject: [PATCH] Fix "Error during redisplay" from which-func.el
Date: Sun, 7 Oct 2012 07:43:40 +0200 [thread overview]
Message-ID: <CAPM+gBTwk+e-i-hQvft9mx3sTyKJ0nBHPjgaJAVj4_mp=cNEyA@mail.gmail.com> (raw)
[-- 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
next reply other threads:[~2012-10-07 5:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-07 5:43 Takafumi Arakaki [this message]
2012-10-07 6:46 ` [PATCH] Fix "Error during redisplay" from which-func.el Jambunathan K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPM+gBTwk+e-i-hQvft9mx3sTyKJ0nBHPjgaJAVj4_mp=cNEyA@mail.gmail.com' \
--to=aka.tkf@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).