<commit_before>(use-package cc-mode
  :mode ("\\.m\\'" . objc-mode)
  :hook (objc-mode . ar/objc-mode-hook-function)
  :bind (:map objc-mode-map
              ("M-]" . ar/smartparens-wrap-square-bracket))
  :init
  (defun ar/objc-mode-hook-function ()
    "Called when entering `objc-mode'."
    ;; Hook is run twice. Avoid:
    ;; http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16759
    (unless (boundp 'objc-mode-hook-did-run)
      (set-fill-column 100)

      ;; Company backends for Objective-C.
      (setq-local company-backends '((company-files
                                      company-keywords)))

      ;; Format files for me.
      (add-hook 'before-save-hook #'clang-format-buffer t t)

      (setq-local objc-mode-hook-did-run t)))
  (defun ar/smartparens-wrap-square-bracket (arg)
    "[] equivalent of `paredit-wrap-round'."
    (interactive "P")
    (save-excursion
      (unless (sp-point-in-symbol)
        ;; (sp-skip-backward-to-symbol)
        (sp-backward-parallel-sexp)
        ;; (sp-backward-down-sexp)
        )
      (sp-wrap-with-pair "[")))
  :config
  (use-package clang-format<commit_msg>Workaround cc-mode's missing symbols<commit_after>(use-package cc-mode
  :mode ("\\.m\\'" . objc-mode)
  :hook (objc-mode . ar/objc-mode-hook-function)
  :bind (:map objc-mode-map
              ("M-]" . ar/smartparens-wrap-square-bracket))
  :init
  ;; Workaround to define two missing functions. Try removing in future.
  (defun c-before-change-check-unbalanced-strings (beg end))
  (defun c-after-change-mark-abnormal-strings (beg end _old-len))

  (defun ar/objc-mode-hook-function ()
    "Called when entering `objc-mode'."
    ;; Hook is run twice. Avoid:
    ;; http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16759
    (unless (boundp 'objc-mode-hook-did-run)
      (set-fill-column 100)

      ;; Company backends for Objective-C.
      (setq-local company-backends '((company-files
                                      company-keywords)))

      ;; Format files for me.
      (add-hook 'before-save-hook #'clang-format-buffer t t)

      (setq-local objc-mode-hook-did-run t)))
  (defun ar/smartparens-wrap-square-bracket (arg)
    "[] equivalent of `paredit-wrap-round'."
    (interactive "P")
    (save-excursion
      (unless (sp-point-in-symbol)
        ;; (sp-skip-backward-to-symbol)
        (sp-backward-parallel-sexp)
        ;; (sp-backward-down-sexp)
        )
      (sp-wrap-with-pair "[")))
  :config
  (use-package clang-format
{'fraction_non_alphanumeric': 0.16153846153846155, 'fraction_numerical': 0.006477732793522267, 'mean_word_length': 2.3527815468113977, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4404234', 'n_tokens_mistral': 922, 'n_tokens_neox': 863, 'n_words': 159}