From 034f9363e316920cd79151ba40fd8a21f85a383b Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sun, 8 Sep 2019 10:44:27 +0000 Subject: [PATCH] Fix untidinesses in compile.el. * lisp/progmodes/compile.el (compilation--margin-string): Renamed from compilation-margin-string. Use defconst rather than defvar. Use propertize rather than a separate put-text-property. Trim the doc string. --- lisp/progmodes/compile.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index c1f23b16aa6..f0b34c702ca 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -2609,16 +2609,13 @@ column zero points to the current message." When non-nil, this overlay causes redisplay to display `overlay-arrow-string' at the overlay's start position.") -(defvar compilation-margin-string "=>" - "The string which will appear in the margin in compilation mode. -This must be two characters long; there should be no need to -change the default.") -(put-text-property 0 2 'face 'default compilation-margin-string) +(defconst compilation--margin-string (propertize "=>" 'face 'default) + "The string which will appear in the margin in compilation mode.") (defconst compilation--dummy-string (propertize ">" 'display - `((margin left-margin) ,compilation-margin-string)) - "A string which is only a placeholder for compilation-margin-string. + `((margin left-margin) ,compilation--margin-string)) + "A string which is only a placeholder for `compilation--margin-string'. Actual value is never used, only the text property.") (defun compilation-set-up-arrow-spec-in-margin () -- 2.39.5