From 581b67880c0d1d9193707b64b9c6b1aee2743338 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 21 Apr 2012 20:25:20 +0200 Subject: [PATCH] * progmodes/which-func.el (which-func-current): Quote % characters for mode-line processing. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/which-func.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 04cd2f736af..020e5c4b9bc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-04-21 Andreas Schwab + + * progmodes/which-func.el (which-func-current): Quote % + characters for mode-line processing. + 2012-04-21 Chong Yidong * xml.el (xml-parse-region, xml-parse-tag): Avoid errors due to diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 721c610517a..01b4c6829f7 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -178,7 +178,9 @@ and you want to simplify them for the mode line (defvar which-func-table (make-hash-table :test 'eq :weakness 'key)) (defconst which-func-current - '(:eval (gethash (selected-window) which-func-table which-func-unknown))) + '(:eval (replace-regexp-in-string + "%" "%%" + (gethash (selected-window) which-func-table which-func-unknown)))) ;;;###autoload (put 'which-func-current 'risky-local-variable t) (defvar which-func-mode nil -- 2.39.2