<commit_before>;;
;; programming.init.el - Support for programming in Emacs. Important.
;;

;; Show trailing whitespace so that it can be eliminated.
(setq-default show-trailing-whitespace t)

;; Tabs violate the Principle of Least Astonishment. Never use them.
(setq-default indent-tabs-mode nil)

;; Indent comments properly.
(setq-default c-comment-only-line-offset 'set-from-style)
(setq-default sh-indent-comment t)
;; FIXME: Comment indentation is still insane in python-mode

;; prog-mode is new in Emacs 24, so we have to enumerate the modes for now.
(setq prog-hook-list '(python-mode-hook perl-mode-hook
                       c-mode-common-hook js-mode-hook
                       sh-mode-hook emacs-lisp-mode-hook))
(defun add-prog-hook (hook)
  (mapc (lambda (mode-hook) (add-hook mode-hook hook)) prog-hook-list))
;; FIXME: If running Emacs 24, just use prog-mode-hook instead

;; The tab support in Python mode is stupid
(defun my-python-mode ()
  (local-set-key (kbd "<backtab>") (if (fboundp 'python-indent-shift-left)
                                       'python-indent-shift-left
                                       'python-shift-left))
  ;(setq indent-line-function 'python-indent-line-1)
)
(add-hook 'python-mode-hook 'my-python-mode)

;; Make MATLAB mode less annoying
(setq matlab-auto-fill nil)<commit_msg>emacs: Add markdown-mode to auto-mode-alist<commit_after>;;
;; programming.init.el - Support for programming in Emacs. Important.
;;

;; Show trailing whitespace so that it can be eliminated.
(setq-default show-trailing-whitespace t)

;; Tabs violate the Principle of Least Astonishment. Never use them.
(setq-default indent-tabs-mode nil)

;; Indent comments properly.
(setq-default c-comment-only-line-offset 'set-from-style)
(setq-default sh-indent-comment t)
;; FIXME: Comment indentation is still insane in python-mode

;; prog-mode is new in Emacs 24, so we have to enumerate the modes for now.
(setq prog-hook-list '(python-mode-hook perl-mode-hook
                       c-mode-common-hook js-mode-hook
                       sh-mode-hook emacs-lisp-mode-hook))
(defun add-prog-hook (hook)
  (mapc (lambda (mode-hook) (add-hook mode-hook hook)) prog-hook-list))
;; FIXME: If running Emacs 24, just use prog-mode-hook instead

;; The tab support in Python mode is stupid
(defun my-python-mode ()
  (local-set-key (kbd "<backtab>") (if (fboundp 'python-indent-shift-left)
                                       'python-indent-shift-left
                                       'python-shift-left))
  ;(setq indent-line-function 'python-indent-line-1)
)
(add-hook 'python-mode-hook 'my-python-mode)

;; Make MATLAB mode less annoying
(setq matlab-auto-fill nil)

;; Use Markdown mode for Markdown files
(if (fboundp 'markdown-mode)
    (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)))
{'fraction_non_alphanumeric': 0.12482369534555712, 'fraction_numerical': 0.003526093088857546, 'mean_word_length': 2.8441734417344176, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2983205', 'n_tokens_mistral': 931, 'n_tokens_neox': 898, 'n_words': 264}