emacs.d/init.el

91 lines
2.8 KiB
EmacsLisp
Raw Normal View History

2019-11-14 10:23:03 +01:00
(require 'package)
2019-09-18 14:10:12 +02:00
2019-05-01 21:49:02 +02:00
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
2019-09-05 09:20:02 +02:00
2019-07-09 13:19:00 +02:00
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
(when no-ssl
(warn "\
Your version of Emacs does not support SSL connections,
which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning:
1. Install an Emacs version that does support SSL and be safe.
2. Remove this warning from your init file so you won't see it again."))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
2019-06-12 14:55:15 +02:00
(package-initialize)
2019-07-09 16:31:46 +02:00
2019-07-09 14:23:34 +02:00
2019-11-14 10:23:03 +01:00
(setq custom-file "~/.emacs.d/bundle/custom.el")
(load custom-file :noerror)
;; Load my custom bundles
(add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle"))
2019-11-17 11:15:18 +01:00
(require 'os)
(require 'fill-column-indicator)
2019-11-16 10:38:50 +01:00
(require 'calendar-settings)
(require 'org-mode-settings)
2019-11-17 11:21:50 +01:00
(require 'sbcl-settings)
2019-11-17 10:44:01 +01:00
(require 'display)
(require 'hooks)
2019-11-14 13:00:42 +01:00
2019-11-14 10:23:03 +01:00
;; start a server, unless one is already running
(when (require 'server nil t)
(unless (server-running-p)
(server-start)))
2019-05-03 11:49:08 +02:00
;; UTF-8 FTW
2019-05-02 13:16:44 +02:00
(prefer-coding-system 'utf-8)
2019-05-06 08:28:46 +02:00
(set-keyboard-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
2019-05-02 19:40:34 +02:00
2019-05-03 11:49:08 +02:00
(defalias 'yes-or-no-p 'y-or-n-p)
2019-11-14 13:00:42 +01:00
(with-current-buffer "*scratch*" (emacs-lock-mode 'kill))
2019-05-15 12:59:56 +02:00
2019-05-06 17:05:58 +02:00
(defun copy-whole-buffer ()
"Copy entire buffer to clipboard"
(interactive)
(clipboard-kill-ring-save (point-min) (point-max)))
2019-05-08 23:01:03 +02:00
(put 'narrow-to-region 'disabled nil)
(put 'narrow-to-page 'disabled nil)
2019-11-16 10:38:50 +01:00
(put 'upcase-region 'disabled nil)
2019-07-09 16:31:46 +02:00
(defun duplicate-line()
(interactive)
(move-beginning-of-line 1)
(kill-line)
(yank)
(open-line 1)
(next-line 1)
(yank)
2019-08-01 21:15:57 +02:00
)
2019-07-09 16:31:46 +02:00
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
2019-11-16 10:38:50 +01:00
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
2019-07-17 19:36:05 +02:00
;; slime
(setq slime-contribs '(slime-fancy))
2019-09-18 14:10:12 +02:00
;; ==================== GLOBAL KEYS ==================== ;;
2019-09-19 09:40:06 +02:00
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-cb" 'org-switchb)
(global-set-key "\C-xg" 'magit-status)
(global-set-key "\C-xM-g" 'magit-dispatch)
2019-09-18 14:10:12 +02:00
(global-unset-key "\C-z")
2019-08-21 16:59:17 +02:00
;; Local Variables:
;; mode: emacs-lisp
;; coding: utf-8-unix
;; End: