summaryrefslogtreecommitdiff
path: root/basic.el
blob: 0398073cb0a2c573cf526091e4b58ff9adf0f498 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
;;; -*- lexical-binding: t; -*-

;;; disable some default modes

(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(blink-cursor-mode -1)

;;; Use spaces instead of tabs

(set 'indent-tabs-mode nil)

;;; Don't make noise when saving files

(setq save-silently t)

;;; no title on the frame

(setq frame-title-format ""
      icon-title-format "")

;;; major mode of the scratch buffer

(set 'initial-major-mode 'emacs-lisp-mode)

;;; echo quickly

(setq echo-keystrokes 0.002)

;;; Scroll conservatively please

(setq scroll-conservatively 30)

;;; don't make backup files

(setq make-backup-files nil)

;;; don't use a GUI dialog box as that is distracting to me

(setq use-dialog-box nil)

;;; don't make noise
;;; and when two buffers have the same base name, include more parts to distinguish them

(setq uniquify-buffer-name-style 'forward
      ring-bell-function #'ignore
      visible-bell nil)

;;; mac specific settings

(setq ns-right-alternate-modifier 'none
      ns-pop-up-frames nil
      ns-use-native-fullscreen nil
      ns-use-proxy-icon nil)

;;; where to find the C source code of Emacs.

(setq find-function-C-source-directory "/Users/durand/w.emacs.d/emacs/src/")

;;; frame parameters

(setq initial-frame-alist
      '((width . 118)))
(set-frame-width nil 118)
(add-to-list 'default-frame-alist '(width . 118))
(add-to-list 'default-frame-alist '(font . "Droid Sans Mono for Powerline-20"))
(add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
(add-to-list 'default-frame-alist '(ns-appearance . dark))
(add-to-list 'default-frame-alist '(fullscreen . maximized))
(setq frame-resize-pixelwise t)
(setq revert-without-query '(".*"))
(set-face-attribute 'variable-pitch nil :family "Avenir" :height 1.0)

;;; disable line numbers, as that is a performace killer for me.

(setq-default display-line-numbers-type nil)
(global-display-line-numbers-mode -1)

;;; package management

;;;###autoload
(defvar package-dir "/Users/durand/elisp_packages/"
  "The directory containing packages.")

;;;###autoload
(defmacro use-package (package-path package-name &rest configs)
  "Add PACKAGE-PATH to `load-path' and require PACKAGE-NAME.
The remaining CONFIGS are evaluated after the package is loaded."
  (declare (indent 2) (debug defun))
  `(progn
     (add-to-list 'load-path
      (expand-file-name ,package-path ,package-dir))
     (require ,package-name)
     ,@configs))