Emacs: Replace (unless slow-computer […] with :unless slow-computer.

This commit is contained in:
tastytea 2020-12-08 13:17:06 +01:00
parent c8b6a6bc90
commit d15eefdf5d
5 changed files with 255 additions and 260 deletions

View File

@ -1,6 +1,6 @@
;;; c++.el --- C++ settings. -*- lexical-binding: t; -*- ;;; c++.el --- C++ settings. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-12-07T16:21:12+0100> ;; Time-stamp: <2020-12-08T13:10:22+0100>
;;; Commentary: ;;; Commentary:
@ -10,40 +10,39 @@
(require 'basics/global-variables) (require 'basics/global-variables)
(require 'programming/common) (require 'programming/common)
(unless slow-computer (when (and (executable-find "clang-tidy")
(when (and (executable-find "clang-tidy") ;; clang-tidy is built into clangd >= 9.
;; clang-tidy is built into clangd >= 9. (< (my/clangd-version) 9.0))
(< (my/clangd-version) 9.0)) (use-package flycheck-clang-tidy
(use-package flycheck-clang-tidy :unless slow-computer
:after (flycheck projectile lsp-ui) :after (flycheck projectile lsp-ui)
:defines (lsp-mode) :defines (lsp-mode)
:functions (flycheck-clang-tidy-setup) :functions (flycheck-clang-tidy-setup)
:config (progn :config (progn
(defun my/clang-tidy-off () (defun my/clang-tidy-off ()
"Disable c/c++-clang-tidy." "Disable c/c++-clang-tidy."
(when (or (eq major-mode 'c++-mode) (when (or (eq major-mode 'c++-mode)
(eq major-mode 'c-mode)) (eq major-mode 'c-mode))
(add-to-list 'flycheck-disabled-checkers (add-to-list 'flycheck-disabled-checkers
'c/c++-clang-tidy))) 'c/c++-clang-tidy)))
(defun my/clang-tidy-on () (defun my/clang-tidy-on ()
"Enable c/c++-clang-tidy." "Enable c/c++-clang-tidy."
(when (or (eq major-mode 'c++-mode) (when (or (eq major-mode 'c++-mode)
(eq major-mode 'c-mode)) (eq major-mode 'c-mode))
(setq-local flycheck-disabled-checkers (setq-local flycheck-disabled-checkers
(remove 'c/c++-clang-tidy (remove 'c/c++-clang-tidy
flycheck-disabled-checkers)))) flycheck-disabled-checkers))))
(defun my/flycheck-clang-tidy-setup () (defun my/flycheck-clang-tidy-setup ()
(flycheck-clang-tidy-setup) (flycheck-clang-tidy-setup)
;; Run clang-tidy after the lsp-ui checker. ;; Run clang-tidy after the lsp-ui checker.
(when lsp-mode (when lsp-mode
(unless (equal (flycheck-get-next-checker-for-buffer (unless (equal (flycheck-get-next-checker-for-buffer
'lsp-ui) 'c/c++-clang-tidy) 'lsp-ui) 'c/c++-clang-tidy)
(flycheck-add-next-checker (flycheck-add-next-checker
'lsp-ui '(warning . c/c++-clang-tidy)))))) 'lsp-ui '(warning . c/c++-clang-tidy))))))
:hook ((flycheck-mode . my/flycheck-clang-tidy-setup) :hook ((flycheck-mode . my/flycheck-clang-tidy-setup)
(first-change . my/clang-tidy-off) ; Disable when file is modified. (first-change . my/clang-tidy-off) ; Disable when file is modified.
(before-save . my/clang-tidy-on)))) ; Enable if file is saved. (before-save . my/clang-tidy-on)))) ; Enable if file is saved.
) ; unless slow-computer.
;; Highlight Doxygen comments. ;; Highlight Doxygen comments.
(use-package highlight-doxygen (use-package highlight-doxygen

View File

@ -1,6 +1,6 @@
;;; common.el --- Common programming settings. -*- lexical-binding: t; -*- ;;; common.el --- Common programming settings. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-12-08T12:50:22+0100> ;; Time-stamp: <2020-12-08T13:08:13+0100>
;;; Commentary: ;;; Commentary:
@ -45,43 +45,42 @@
:hook (prog-mode . turn-on-eldoc-mode)) :hook (prog-mode . turn-on-eldoc-mode))
;; Syntax checking with many plugins. ;; Syntax checking with many plugins.
(unless slow-computer (use-package flycheck
(use-package flycheck :unless slow-computer
:demand t :demand t
:functions (flycheck-add-mode) :functions (flycheck-add-mode)
:diminish flycheck-mode :diminish flycheck-mode
:custom ((flycheck-cppcheck-checks '("style" "warning" "information")) :custom ((flycheck-cppcheck-checks '("style" "warning" "information"))
(flycheck-emacs-lisp-load-path 'inherit) ; Use load-path of Emacs. (flycheck-emacs-lisp-load-path 'inherit) ; Use load-path of Emacs.
(flycheck-idle-change-delay 2.0)) (flycheck-idle-change-delay 2.0))
:config (progn :config (progn
(global-flycheck-mode) (global-flycheck-mode)
(flycheck-add-mode 'html-tidy 'web-mode) (flycheck-add-mode 'html-tidy 'web-mode)
(flycheck-add-mode 'css-csslint 'web-mode)) (flycheck-add-mode 'css-csslint 'web-mode))
:bind (:map flycheck-mode-map :bind (:map flycheck-mode-map
("<f5>" . flycheck-previous-error) ("<f5>" . flycheck-previous-error)
("<f6>" . flycheck-next-error) ("<f6>" . flycheck-next-error)
("<f7>" . flycheck-list-errors))) ("<f7>" . flycheck-list-errors)))
) ; unless slow-computer.
;; Autocompletion mode with many plugins. ;; Autocompletion mode with many plugins.
(unless slow-computer (use-package company
(use-package company :unless slow-computer
:diminish company-mode :diminish company-mode
:custom ((company-minimum-prefix-length 1) ; Suggestions after 1 character. :custom ((company-minimum-prefix-length 1) ; Suggestions after 1 character.
(company-selection-wrap-around t) (company-selection-wrap-around t)
(company-tooltip-align-annotations t) ; Align to the right border. (company-tooltip-align-annotations t) ; Align to the right border.
(company-idle-delay 0.5)) (company-idle-delay 0.5))
:bind (:map company-active-map :bind (:map company-active-map
("<return>" . nil) ; Disable completion on return. ("<return>" . nil) ; Disable completion on return.
("RET" . nil) ; https://emacs.stackexchange.com/a/13290 ("RET" . nil) ; https://emacs.stackexchange.com/a/13290
("<tab>" . company-complete-selection) ; Make tab work in lists. ("<tab>" . company-complete-selection) ; Make tab work in lists.
("TAB" . company-complete-selection)) ; Tab in terminals. ("TAB" . company-complete-selection)) ; Tab in terminals.
:hook (after-init . global-company-mode)) :hook (after-init . global-company-mode))
;; Documentation popups for completions. ;; Documentation popups for completions.
(use-package company-quickhelp (use-package company-quickhelp
:after (company)
:config (company-quickhelp-mode)) :config (company-quickhelp-mode))
) ; unless slow-computer.
;; Sorting and filtering for company. ;; Sorting and filtering for company.
(use-package company-prescient (use-package company-prescient
@ -89,80 +88,79 @@
:hook (after-init . company-prescient-mode)) :hook (after-init . company-prescient-mode))
;; Automatic project management. ;; Automatic project management.
(unless slow-computer (use-package projectile
(use-package projectile :unless slow-computer
:demand t :demand t
:after (treemacs ivy window-purpose) :after (treemacs ivy window-purpose)
:functions (f-directory? :functions (f-directory?
treemacs-collapse-other-projects treemacs-collapse-other-projects
treemacs-toggle-node treemacs-toggle-node
my/projectile-kill-buffers my/projectile-kill-buffers
purpose-set-window-purpose-dedicated-p) purpose-set-window-purpose-dedicated-p)
:diminish projectile-mode :diminish projectile-mode
:init (progn :init (progn
(defun my/projectile-enable-caching? (&rest args) (defun my/projectile-enable-caching? (&rest args)
"Turn on caching for certain projects. "Turn on caching for certain projects.
Ignores ARGS." Ignores ARGS."
(if (string= (projectile-project-name) ".emacs.d") (if (string= (projectile-project-name) ".emacs.d")
(progn (progn
(message "Turning on caching for \"%s\"." (message "Turning on caching for \"%s\"."
(projectile-project-name)) (projectile-project-name))
(setq-local projectile-enable-caching t)) (setq-local projectile-enable-caching t))
(kill-local-variable 'projectile-enable-caching))) (kill-local-variable 'projectile-enable-caching)))
(advice-add 'projectile-find-file (advice-add 'projectile-find-file
:before #'my/projectile-enable-caching?) :before #'my/projectile-enable-caching?)
(advice-add 'counsel-projectile-find-file (advice-add 'counsel-projectile-find-file
:before #'my/projectile-enable-caching?) :before #'my/projectile-enable-caching?)
(defun my/switch-project () (defun my/switch-project ()
"Find file in project, add project to `treemacs' and "Find file in project, add project to `treemacs' and
collapse other projects." collapse other projects."
; Enable caching maybe before listing files. ; Enable caching maybe before listing files.
(my/projectile-enable-caching?) (my/projectile-enable-caching?)
(if (member 'counsel-projectile-mode minor-mode-list) (if (member 'counsel-projectile-mode minor-mode-list)
(counsel-projectile-find-file) (counsel-projectile-find-file)
(projectile-find-file)) (projectile-find-file))
(when (>= (frame-width) 120) (when (>= (frame-width) 120)
(treemacs-add-and-display-current-project) (treemacs-add-and-display-current-project)
(treemacs-collapse-other-projects) (treemacs-collapse-other-projects)
(other-window 1))) (other-window 1)))
(defun my/projectile-kill-buffers () (defun my/projectile-kill-buffers ()
"Kill project buffers and delete other windows." "Kill project buffers and delete other windows."
(interactive) (interactive)
(projectile-kill-buffers) (projectile-kill-buffers)
(delete-other-windows) (delete-other-windows)
(purpose-set-window-purpose-dedicated-p nil nil))) (purpose-set-window-purpose-dedicated-p nil nil)))
:custom ((projectile-project-compilation-dir "build") :custom ((projectile-project-compilation-dir "build")
(projectile-switch-project-action 'my/switch-project) (projectile-switch-project-action 'my/switch-project)
(projectile-project-configure-cmd (projectile-project-configure-cmd
"cmake -GUnix\\ Makefiles -DCMAKE_BUILD_TYPE=Debug \ "cmake -GUnix\\ Makefiles -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DWITH_TESTS=YES ..") -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DWITH_TESTS=YES ..")
(projectile-completion-system 'ivy) (projectile-completion-system 'ivy)
(projectile-indexing-method 'hybrid) ; Allow filtering. (projectile-indexing-method 'hybrid) ; Allow filtering.
(projectile-globally-ignored-file-suffixes '("~"))) (projectile-globally-ignored-file-suffixes '("~")))
:config (progn :config (progn
(setq projectile-project-compilation-cmd (setq projectile-project-compilation-cmd
(concat "cmake --build . -- -j" (concat "cmake --build . -- -j"
(substring (substring
(shell-command-to-string "nproc --ignore=1") 0 -1) (shell-command-to-string "nproc --ignore=1") 0 -1)
" && cd tests && ctest -Q")) " && cd tests && ctest -Q"))
(projectile-mode +1) (projectile-mode +1)
;; Mark variables as safe. Prevents prompts with .dir-locals.el. ;; Mark variables as safe. Prevents prompts with .dir-locals.el.
(put 'projectile-project-compilation-cmd (put 'projectile-project-compilation-cmd
'safe-local-variable #'stringp) 'safe-local-variable #'stringp)
(put 'projectile-project-configure-cmd (put 'projectile-project-configure-cmd
'safe-local-variable #'stringp) 'safe-local-variable #'stringp)
;; Auto-search for projects. ;; Auto-search for projects.
(if (f-directory? "~/Projekte") (if (f-directory? "~/Projekte")
(setq projectile-project-search-path '("~/Projekte")))) (setq projectile-project-search-path '("~/Projekte"))))
:bind (("C-c p" . 'projectile-command-map) :bind (("C-c p" . 'projectile-command-map)
(:map projectile-command-map (:map projectile-command-map
("k" . 'my/projectile-kill-buffers)) ("k" . 'my/projectile-kill-buffers))
(:map projectile-mode-map ; Only override in projectile-mode. (:map projectile-mode-map ; Only override in projectile-mode.
("C-x C-f" . 'projectile-find-file)))) ("C-x C-f" . 'projectile-find-file))))
) ; unless slow-computer.
;; Highlight TODO, FIXME, NOTE and so on. ;; Highlight TODO, FIXME, NOTE and so on.
(use-package hl-todo (use-package hl-todo

View File

@ -1,6 +1,6 @@
;;; git.el --- magit and stuff. -*- lexical-binding: t; -*- ;;; git.el --- magit and stuff. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-12-03T21:40:09+0100> ;; Time-stamp: <2020-12-08T13:15:20+0100>
;;; Commentary: ;;; Commentary:
@ -16,35 +16,35 @@
(setq-local fill-column 72)) (setq-local fill-column 72))
:hook (git-commit-mode . my/set-git-commit-fill-column)) :hook (git-commit-mode . my/set-git-commit-fill-column))
(unless slow-computer (use-package magit
(use-package magit :unless slow-computer
:after (keychain-environment) :after (keychain-environment)
:custom (magit-diff-refine-hunk 'all) ; Show word-granularity differences. :custom (magit-diff-refine-hunk 'all) ; Show word-granularity differences.
:bind (("C-x g" . nil) ; Disable default. :bind (("C-x g" . nil) ; Disable default.
("C-c g" . magit-status) ("C-c g" . magit-status)
("C-c M-g" . magit-dispatch) ("C-c M-g" . magit-dispatch)
(:map magit-hunk-section-map (:map magit-hunk-section-map
("RET" . magit-diff-visit-worktree-file-other-window))) ("RET" . magit-diff-visit-worktree-file-other-window)))
:hook ((after-save . magit-after-save-refresh-status) :hook ((after-save . magit-after-save-refresh-status)
(magit-mode . keychain-refresh-environment))) (magit-mode . keychain-refresh-environment)))
;; Use libgit rather than git. ;; Use libgit rather than git.
(use-package magit-libgit) (use-package magit-libgit
:after (magit))
;; Show TODOs in magit-status. ;; Show TODOs in magit-status.
(use-package magit-todos (use-package magit-todos
:after magit :after (magit)
:init (put 'magit-todos-depth 'safe-local-variable #'integerp) :init (put 'magit-todos-depth 'safe-local-variable #'integerp)
:hook (magit-mode . magit-todos-mode)) :hook (magit-mode . magit-todos-mode))
;; Work with Git forges from Magit. ;; Work with Git forges from Magit.
(use-package forge (use-package forge
:after magit :after (magit)
:config (add-to-list 'forge-alist :config (add-to-list 'forge-alist
'("schlomp.space" "schlomp.space/api/v1" '("schlomp.space" "schlomp.space/api/v1"
"schlomp.space" forge-gitea-repository)) "schlomp.space" forge-gitea-repository))
:hook (prog-mode . forge-bug-reference-setup)) :hook (prog-mode . forge-bug-reference-setup))
) ; unless slow-computer.
(provide 'programming/git) (provide 'programming/git)
;;; git.el ends here ;;; git.el ends here

View File

@ -1,6 +1,6 @@
;;; lsp.el --- Language Server Protocol. -*- lexical-binding: t; -*- ;;; lsp.el --- Language Server Protocol. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-12-07T15:03:32+0100> ;; Time-stamp: <2020-12-08T13:13:22+0100>
;;; Commentary: ;;; Commentary:
@ -10,73 +10,72 @@
(require 'basics/global-variables) (require 'basics/global-variables)
(require 'programming/common) (require 'programming/common)
(unless slow-computer ;; Client for Language Server Protocol servers.
;; Client for Language Server Protocol servers. (use-package lsp-mode
(use-package lsp-mode :if (and (executable-find "clangd") (not slow-computer))
:if (executable-find "clangd") :defines (lsp-clients-clangd-args)
:defines (lsp-clients-clangd-args) :diminish lsp-mode
:diminish lsp-mode :custom ((lsp-prefer-flymake nil) ; Disable flymake.
:custom ((lsp-prefer-flymake nil) ; Disable flymake. (lsp-auto-guess-root t) ; Don't ask for project root.
(lsp-auto-guess-root t) ; Don't ask for project root. (lsp-eldoc-render-all t)
(lsp-eldoc-render-all t) (lsp-restart 'auto-restart)
(lsp-restart 'auto-restart) (lsp-enable-semantic-highlighting t) ; Needs clangd 11(?).
(lsp-enable-semantic-highlighting t) ; Needs clangd 11(?). (lsp-semantic-tokens-apply-modifiers t)
(lsp-semantic-tokens-apply-modifiers t) (lsp-prefer-capf t)
(lsp-prefer-capf t) (lsp-keymap-prefix "C-c l")
(lsp-keymap-prefix "C-c l") (lsp-keep-workspace-alive nil))
(lsp-keep-workspace-alive nil)) :custom-face
:custom-face ;; Semantic highlighting. TODO: Check later if better options are available.
;; Semantic highlighting. TODO: Check later if better options are available. (lsp-face-semhl-variable ((t (:inherit font-lock-variable-name-face
(lsp-face-semhl-variable ((t (:inherit font-lock-variable-name-face :italic t))))
:italic t)))) (lsp-face-semhl-parameter ((t (:inherit font-lock-variable-name-face
(lsp-face-semhl-parameter ((t (:inherit font-lock-variable-name-face :italic t :underline t))))
:italic t :underline t)))) (lsp-face-semhl-member ((t (:inherit default :weight semibold))))
(lsp-face-semhl-member ((t (:inherit default :weight semibold)))) (lsp-face-semhl-enum ((t (:inherit font-lock-type-face))))
(lsp-face-semhl-enum ((t (:inherit font-lock-type-face)))) :config (progn
:config (progn (setq lsp-clients-clangd-args '("--compile-commands-dir=build"))
(setq lsp-clients-clangd-args '("--compile-commands-dir=build")) ;; Add “-clang-tidy” to clangd args if the version supports it.
;; Add “-clang-tidy” to clangd args if the version supports it. (when (>= (my/clangd-version) 9.0)
(when (>= (my/clangd-version) 9.0) (add-to-list 'lsp-clients-clangd-args "--clang-tidy" t))
(add-to-list 'lsp-clients-clangd-args "--clang-tidy" t)) ;; Mark lsp-clients-clangd-args as safe to override.
;; Mark lsp-clients-clangd-args as safe to override. (put 'lsp-clients-clangd-args 'safe-local-variable #'consp))
(put 'lsp-clients-clangd-args 'safe-local-variable #'consp)) :bind ("C-c C-f" . lsp-execute-code-action)
:bind ("C-c C-f" . lsp-execute-code-action) :hook ((c++-mode . lsp)
:hook ((c++-mode . lsp) (c-mode . lsp)
(c-mode . lsp) (python-mode . lsp)
(python-mode . lsp) (nxml-mode . lsp)
(nxml-mode . lsp) (lsp-mode . lsp-enable-which-key-integration)))
(lsp-mode . lsp-enable-which-key-integration)))
;; Eye-candy and flycheck support for lsp-mode. ;; Eye-candy and flycheck support for lsp-mode.
(use-package lsp-ui (use-package lsp-ui
:after (lsp-mode flycheck whitespace) :after (lsp-mode flycheck whitespace)
:functions (my/whitespace-mode-on my/whitespace-mode-off) :functions (my/whitespace-mode-on my/whitespace-mode-off)
:custom ((lsp-ui-sideline-enable nil) ; Do not insert doc into buffer. :custom ((lsp-ui-sideline-enable nil) ; Do not insert doc into buffer.
(lsp-ui-doc-include-signature t) ; Include signature in doc popup. (lsp-ui-doc-include-signature t) ; Include signature in doc popup.
(lsp-ui-doc-enable nil)) ; Disable doc popup. (lsp-ui-doc-enable nil)) ; Disable doc popup.
:config (defun my/lsp-ws-toggle () :config (defun my/lsp-ws-toggle ()
"Works around the dots-in-wrong-color bug." "Works around the dots-in-wrong-color bug."
(if lsp-ui-peek-mode (if lsp-ui-peek-mode
(my/whitespace-mode-off) (my/whitespace-mode-off)
(my/whitespace-mode-on))) (my/whitespace-mode-on)))
:bind (:map lsp-ui-mode-map :bind (:map lsp-ui-mode-map
("M-." . lsp-ui-peek-find-definitions) ("M-." . lsp-ui-peek-find-definitions)
("C-M-." . lsp-ui-peek-find-references) ("C-M-." . lsp-ui-peek-find-references)
("C-M-," . lsp-ui-peek-find-implementation)) ("C-M-," . lsp-ui-peek-find-implementation))
:hook ((lsp-mode . lsp-ui-mode) :hook ((lsp-mode . lsp-ui-mode)
(lsp-ui-peek-mode . my/lsp-ws-toggle))) (lsp-ui-peek-mode . my/lsp-ws-toggle)))
;; ivy interface to lsp-mode. ;; ivy interface to lsp-mode.
(use-package lsp-ivy (use-package lsp-ivy
:demand t :demand t
:after (lsp-mode ivy)) :after (lsp-mode ivy))
;; Integration between lsp-mode and treemacs. ;; Integration between lsp-mode and treemacs.
(use-package lsp-treemacs (use-package lsp-treemacs
:after (treemacs lsp-ui) :after (treemacs lsp-ui)
:bind (:map lsp-ui-mode-map :bind (:map lsp-ui-mode-map
("<f7>" . lsp-treemacs-errors-list))) ("<f7>" . lsp-treemacs-errors-list)))
) ; unless slow-computer. )
(provide 'programming/lsp) (provide 'programming/lsp)
;;; lsp.el ends here ;;; lsp.el ends here

View File

@ -1,6 +1,6 @@
;;; common.el --- Common settings for text files. -*- lexical-binding: t; -*- ;;; common.el --- Common settings for text files. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-12-07T16:03:09+0100> ;; Time-stamp: <2020-12-08T13:16:30+0100>
;;; Commentary: ;;; Commentary:
@ -105,39 +105,38 @@
(ispell-hunspell-add-multi-dic "de_DE,de_AT,de_CH"))) (ispell-hunspell-add-multi-dic "de_DE,de_AT,de_CH")))
;; Interactive spell checking. ;; Interactive spell checking.
(unless slow-computer (use-package flyspell
(use-package flyspell :if (and (not slow-computer)
:if (or (executable-find "aspell") (or (executable-find "aspell")
(executable-find "hunspell") (executable-find "hunspell")
(executable-find "ispell")) (executable-find "ispell")))
:diminish flyspell-mode :diminish flyspell-mode
:custom ((flyspell-default-dictionary "en_US")) :custom ((flyspell-default-dictionary "en_US"))
:config (progn :config (progn
(defun my/toggle-flyspell () (defun my/toggle-flyspell ()
"Toggle flyspell-mode and run flyspell-buffer after activating." "Toggle flyspell-mode and run flyspell-buffer after activating."
(interactive) (interactive)
(if (bound-and-true-p flyspell-mode) (if (bound-and-true-p flyspell-mode)
(flyspell-mode 0) (flyspell-mode 0)
(flyspell-mode) (flyspell-mode)
(flyspell-buffer))) (flyspell-buffer)))
(defun my/flyspell-german () (defun my/flyspell-german ()
"Set dictionary to german." "Set dictionary to german."
(interactive) (interactive)
(ispell-change-dictionary "de_DE"))) (ispell-change-dictionary "de_DE")))
:bind (("<f8>" . my/toggle-flyspell) :bind (("<f8>" . my/toggle-flyspell)
(:map flyspell-mode-map (:map flyspell-mode-map
("C-;" . nil) ; iedit needs C-;. ("C-;" . nil) ; iedit needs C-;.
("C-M-i" . nil))) ; imenu-anywhere needs it. ("C-M-i" . nil))) ; imenu-anywhere needs it.
:hook ((prog-mode . flyspell-prog-mode) ; Spellcheck comments. :hook ((prog-mode . flyspell-prog-mode) ; Spellcheck comments.
(text-mode . flyspell-mode) ; Spellcheck text documents ↓. (text-mode . flyspell-mode) ; Spellcheck text documents ↓.
(LaTeX-mode . my/flyspell-german) (LaTeX-mode . my/flyspell-german)
(LaTeX-mode . flyspell-mode) (LaTeX-mode . flyspell-mode)
(adoc-mode . flyspell-mode) (adoc-mode . flyspell-mode)
(markdown-mode . flyspell-mode) (markdown-mode . flyspell-mode)
(git-commit-mode . flyspell-mode)) (git-commit-mode . flyspell-mode))
:mode ("COMMIT_EDITMSG\\'" . flyspell-mode)) :mode ("COMMIT_EDITMSG\\'" . flyspell-mode))
) ; unless slow-computer.
;; The string Time-stamp: <> in the first 8 lines of the file will be updated ;; The string Time-stamp: <> in the first 8 lines of the file will be updated
;; with the current timestamp. ;; with the current timestamp.