.emacs.d/init.d/basics/global-variables.el

55 lines
2.5 KiB
EmacsLisp
Raw Normal View History

2020-02-26 23:07:19 +01:00
;;; global-variables.el --- Set some global variables. -*- lexical-binding: t; -*-
2019-10-14 17:38:14 +02:00
;; Time-stamp: <2020-03-13T11:17:28+0100>
2019-10-14 17:38:14 +02:00
;;; Commentary:
;; * Banish customizations.
;; * Fewer startup messages.
;; * Configure backup settings.
;; * Set username and email-address.
2020-02-26 23:07:19 +01:00
;; * Set up authentication sources
2020-03-10 14:33:47 +01:00
;; * Set `LC_MESSAGES'.
;; * Set `slow-computer'.
2019-10-14 17:38:14 +02:00
;;; Code:
(use-package emacs
:ensure nil
2020-02-11 17:59:12 +01:00
:diminish abbrev-mode
2020-02-11 18:04:27 +01:00
:diminish auto-fill-function
2019-10-14 17:38:14 +02:00
;; Banish customizations to another file.
2020-03-10 14:33:47 +01:00
:init (setq custom-file (concat user-emacs-directory "custom.el"))
:custom ((inhibit-startup-screen t)
(inhibit-startup-echo-area-message t)
(backup-directory-alist ; Save backups in ~/.emacs.d/backups/.
`(("." . ,(concat user-emacs-directory "backups"))))
(delete-old-versions t) ; Delete old backups.
(kept-new-versions 6) ; Keep 6 newest backups.
(backup-by-copying t) ; Copy to backup folder.
(version-control t) ; Append version numbers to file names.
(auto-save-file-name-transforms ; Save auto-saves in backup dir.
`((".*" ,(concat user-emacs-directory "backups/") t)))
(create-lockfiles nil) ; Don't create lockfiles (.#<file>).
(user-full-name "tastytea")
(user-mail-address "tastytea@tastytea.de")
(recentf-max-saved-items 200) ; Number of buffers to keep in history.
(auth-sources ; Preference of authentication sources.
'("~/.authinfo.gpg" "~/.authinfo" "~/.netrc"))
(auth-source-gpg-encrypt-to ; Encrypt to these users.
(cons (symbol-value 'user-mail-address) '())))
:config (progn
;; read more data per chunk. LSP responses are large.
(setq read-process-output-max (* 1024 1024))
(defalias 'yes-or-no-p 'y-or-n-p) ; Just type y/n instead of yes/no.
(savehist-mode t) ; Save minibuffer history.
(global-auto-revert-mode t) ; Auto-revert file if changed on disk.
;; Show manpages and error messages from compilers in English.
(setenv "LC_MESSAGES" "en_US.utf8")
(defvar slow-computer nil) ; Slow computers load fewer packages.
(if (member (system-name) '("steuerbeamter" "azimuth" "localhost"))
(setq slow-computer t)))) ; localhost is schnibble.
2019-10-14 17:38:14 +02:00
(provide 'basics/global-variables)
;;; global-variables.el ends here