Skip to content

Commit

Permalink
fix: Use append instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Dec 10, 2023
1 parent 5935e6a commit 2aa643c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rainbow-csv.el
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

(defun rainbow-csv--revert-font-lock-keywords ()
"Revert to default font lock rules."
(unless rainbow-csv--old-csv-font-lock-keywords ; First assign
(unless rainbow-csv--old-csv-font-lock-keywords
(setq rainbow-csv--old-csv-font-lock-keywords csv-font-lock-keywords))
(setq csv-font-lock-keywords rainbow-csv--old-csv-font-lock-keywords))

Expand Down Expand Up @@ -126,8 +126,9 @@
separator separator (1+ i)))
(color (or (nth i rainbow-csv-colors)
(rainbow-csv--rgb))))
(nconc csv-font-lock-keywords
`((,r (1 '(face (:foreground ,color)) prepend t)))))))
(setq csv-font-lock-keywords
(append csv-font-lock-keywords
`((,r (1 '(face (:foreground ,color)) prepend t))))))))
(font-lock-refresh-defaults))

;;
Expand All @@ -138,7 +139,8 @@
"Post insert."
(when (memq last-command-event '(?, ?\"))
(message "update once!")
(rainbow-csv-highlight)))
;;(rainbow-csv-highlight)
))

(provide 'rainbow-csv)
;;; rainbow-csv.el ends here

0 comments on commit 2aa643c

Please sign in to comment.