summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-04-21 20:25:20 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2012-04-21 20:25:20 +0200
commit581b67880c0d1d9193707b64b9c6b1aee2743338 (patch)
treef6d2103ffea2937736950235ff993c9768b2183e
parent18edb22d4f484783b009d3b4420f62462025f350 (diff)
downloademacs-581b67880c0d1d9193707b64b9c6b1aee2743338.tar.gz
* progmodes/which-func.el (which-func-current): Quote %
characters for mode-line processing.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/which-func.el4
2 files changed, 8 insertions, 1 deletions
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 <schwab@linux-m68k.org>
+
+ * progmodes/which-func.el (which-func-current): Quote %
+ characters for mode-line processing.
+
2012-04-21 Chong Yidong <cyd@gnu.org>
* 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