# HG changeset patch # User xaltsc # Date 1651168286 -7200 # Thu Apr 28 19:51:26 2022 +0200 # Node ID c80e031cab0075fc0389188f8ca3781c7f082bde # Parent c47cc59c2260671ba12e6f592718b91f0855da4c fix: better percent escape and right alignment diff --git a/xc-look-mode-line.el b/xc-look-mode-line.el --- a/xc-look-mode-line.el +++ b/xc-look-mode-line.el @@ -113,7 +113,7 @@ (require 'dash) (defun --escape-percent-construct (string) - (s-replace "%" "%%" string)) + (replace-regexp-in-string "\\(%\\)" "\\1\\1" string)) ;(defun --merge-face-in-list (sexp face-to-merge) ; (let ((head (car sexp))) @@ -139,7 +139,8 @@ ; (defun xc-line/centre-space (right-length) "Creates the space for the centre of the mode line" - `(:propertize " " display (space :align-to (- right ,right-length)))) + `(:propertize " " display (space :align-to (- right (- 0 right-margin) + ,right-length)))) (defun xc-line/format-part-expand-symbols (sym) "Expands symbols when they are bound"