<commit_before>(require 'cc-mode)
(add-hook 'c-mode-hook '(lambda () (c-toggle-auto-state t)))
(add-hook 'c++-mode-hook '(lambda () (c-toggle-auto-state t)))

;; From http://xugx2007.blogspot.ca/2007/06/benjamin-rutts-emacs-c-development-tips.html
(setq compilation-finish-function
   (lambda (buf str)

     (if (string-match "exited abnormally" str)

         ;;there were errors
         (message "compilation errors, press C-x ` to visit")

       ;;no errors, make the compilation window go away in 0.5 seconds
       (run-at-time 0.5 nil 'delete-windows-on buf)
       (message "No compilation errors."))))<commit_msg>Tweak auto-closing of compilation window<commit_after>(require 'cc-mode)
(add-hook 'c-mode-hook '(lambda () (c-toggle-auto-state t)))
(add-hook 'c++-mode-hook '(lambda () (c-toggle-auto-state t)))

;; From http://xugx2007.blogspot.ca/2007/06/benjamin-rutts-emacs-c-development-tips.html
(setq compilation-finish-function
   (lambda (buf str)

     (if (or (string-match "exited abnormally" str)
            (string-match "FAILED" (buffer-string)))

         ;;there were errors
         (message "There were errors. SPC-e-n to visit.")

       ;;no errors, make the compilation window go away in 0.5 seconds
       (run-at-time 1.0 nil 'delete-windows-on buf)
       (message "Ok."))))
{'fraction_non_alphanumeric': 0.15889992360580596, 'fraction_numerical': 0.0213903743315508, 'mean_word_length': 3.171974522292994, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2857538', 'n_tokens_mistral': 470, 'n_tokens_neox': 431, 'n_words': 113}