diff --git a/mode-icons.el b/mode-icons.el index 4556133..28b06f1 100644 --- a/mode-icons.el +++ b/mode-icons.el @@ -318,9 +318,15 @@ If ICON-PATH is a string, return that." "Get xpm image from ICON-PATH and reaplce REP-ALIST in file. When NAME is non-nil, also replace the internal xpm image name." (let ((case-fold-search t) - (img (mode-icons-get-xpm-string icon-path))) + (img (mode-icons-get-xpm-string icon-path)) + (i 0)) (dolist (c rep-alist) - (setq img (replace-regexp-in-string (regexp-quote (car c)) (cdr c) img t t))) + (setq img (replace-regexp-in-string (regexp-quote (car c)) (format "COLOR<%d>" i) img t t) + i (1+ i))) + (let ((i 0)) + (dolist (c rep-alist) + (setq img (replace-regexp-in-string (format "COLOR<%d>" i) (cdr c) img t t) + i (1+ i)))) (when name (setq img (replace-regexp-in-string "^[ ]*static[ ]+char[ ]+[*][ ]+.*?\\[" (concat "static char * " name "[") img t t))) img))