(defunmy/gtkw-reset-color()" 复位gtkw 中的颜色设置 "(interactive)(my/color-gtkw-wavesnil))(defunmy/gtkw-auto-set-color()" 自动设备 gtkw 文件中的信号的颜色, 按顺序颜色从1 到8 交替 "(interactive)(my/color-gtkw-wavest))(defunmy/color-gtkw-waves(auto)(save-excursion;; First pass: remove all lines starting with [color](goto-char(point-min))(while(not(eobp))(if(looking-at"^\\[color\\]")(progn(message"line %d"(current-line))(delete-region(point)(progn(forward-line1)(point))))(forward-line1)))(whenauto;; Second pass: insert [color] x before lines starting with a letter(let*((color-counter1))(goto-char(point-min))(while(not(eobp))(when(looking-at"^[[:alpha:]]")(insert(format"[color] %d\n"color-counter))(setqcolor-counter(if(=color-counter8)1(1+color-counter))))(forward-line1))))))