From add146f09f0f73f4af4760cc6205b287076c08d8 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 30 Jul 2019 23:35:42 +0300 Subject: [PATCH] * lisp/bindings.el (mode-line-defining-kbd-macro): New defvar. (minor-mode-alist): Use it for `defining-kbd-macro'. (Bug#36564) --- lisp/bindings.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/bindings.el b/lisp/bindings.el index 64842c4e1ff..0be14587981 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -644,6 +644,11 @@ Switch to the most recently selected buffer other than the current one." (let ((indicator (car (nth 4 (car (cdr event)))))) (describe-minor-mode-from-indicator indicator))) +(defvar mode-line-defining-kbd-macro (propertize " Def" 'face 'font-lock-warning-face) + "String displayed in the mode line in keyboard macro recording mode.") +;;;###autoload +(put 'mode-line-defining-kbd-macro 'risky-local-variable t) + (defvar minor-mode-alist nil "\ Alist saying how to show minor modes in the mode line. Each element looks like (VARIABLE STRING); @@ -653,13 +658,14 @@ Actually, STRING need not be a string; any mode-line construct is okay. See `mode-line-format'.") ;;;###autoload (put 'minor-mode-alist 'risky-local-variable t) -;; Don't use purecopy here--some people want to change these strings. +;; Don't use purecopy here--some people want to change these strings, +;; also string properties are lost when put into pure space. (setq minor-mode-alist - `((abbrev-mode " Abbrev") + '((abbrev-mode " Abbrev") (overwrite-mode overwrite-mode) (auto-fill-function " Fill") ;; not really a minor mode... - (defining-kbd-macro ,(propertize " Def" 'face 'error)))) + (defining-kbd-macro mode-line-defining-kbd-macro))) ;; These variables are used by autoloadable packages. ;; They are defined here so that they do not get overridden -- 2.39.2