;;; init.el --- bandali's emacs configuration -*- lexical-binding: t -*-
-;; Copyright (C) 2018-2019 Amin Bandali <bandali@gnu.org>
+;; Copyright (C) 2018-2020 Amin Bandali <bandali@gnu.org>
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
(interactive)
(kill-buffer (current-buffer)))
+(defun b/move-indentation-or-beginning-of-line (arg)
+ "Move to the indentation or to the beginning of line."
+ (interactive "^p")
+ ;; (if (bolp)
+ ;; (back-to-indentation)
+ ;; (move-beginning-of-line arg))
+ (if (= (point)
+ (progn (back-to-indentation)
+ (point)))
+ (move-beginning-of-line arg)))
+
\f
;;; Defaults
;;; General bindings
(bind-keys
+ ("C-a" . b/move-indentation-or-beginning-of-line)
("C-c a i" . ielm)
("C-c e b" . eval-buffer)
;; (global-company-mode t)
)
-(comment
(use-package flycheck
+ :disabled
:defer 0.6
:hook (prog-mode . flycheck-mode)
:bind
(setq flycheck-check-syntax-automatically '(mode-enabled save))
:custom (flycheck-mode-line-prefix "flyc"))
-(use-package flyspell)
+;; (use-package flyspell)
;; http://endlessparentheses.com/ispell-and-apostrophes.html
(use-package ispell
+ :disabled
:defer 0.6
:config
;; ’ can be part of a word
(use-package reveal
:hook (emacs-lisp-mode . reveal-mode))
-(use-package elisp-mode)
-
-;; (use-package alloy-mode
-;; :straight (:host github :repo "dwwmmn/alloy-mode")
-;; :mode "\\.\\(als\\|dsh\\)\\'"
-;; :config
-;; (setq alloy-basic-offset 2)
-;; ;; (defun b/alloy-simple-indent (start end)
-;; ;; (interactive "r")
-;; ;; ;; (if (region-active-p)
-;; ;; ;; (indent-rigidly start end alloy-basic-offset)
-;; ;; ;; (if (bolp)
-;; ;; ;; (indent-rigidly (line-beginning-position)
-;; ;; ;; (line-end-position)
-;; ;; ;; alloy-basic-offset)))
-;; ;; (indent-to (+ (current-column) alloy-basic-offset)))
-;; :bind (:map alloy-mode-map
-;; ("RET" . electric-newline-and-maybe-indent)
-;; ;; ("TAB" . b/alloy-simple-indent)
-;; ("TAB" . indent-for-tab-command))
-;; :hook (alloy-mode . (lambda () (setq-local indent-tabs-mode nil))))
+;; (use-package elisp-mode)
+(use-package alloy-mode
+ :mode "\\.\\(als\\|dsh\\)\\'"
+ :config
+ (setq alloy-basic-offset 2)
+ ;; (defun b/alloy-simple-indent (start end)
+ ;; (interactive "r")
+ ;; ;; (if (region-active-p)
+ ;; ;; (indent-rigidly start end alloy-basic-offset)
+ ;; ;; (if (bolp)
+ ;; ;; (indent-rigidly (line-beginning-position)
+ ;; ;; (line-end-position)
+ ;; ;; alloy-basic-offset)))
+ ;; (indent-to (+ (current-column) alloy-basic-offset)))
+ :bind (:map alloy-mode-map
+ ("RET" . electric-newline-and-maybe-indent)
+ ;; ("TAB" . b/alloy-simple-indent)
+ ("TAB" . indent-for-tab-command))
+ :hook (alloy-mode . (lambda () (setq-local indent-tabs-mode nil))))
+
+(comment
(eval-when-compile (defvar lean-mode-map))
(use-package lean-mode
:defer 0.4
lean-input-user-translations '(("/" "/")))
(lean-input-setup))
-(use-package mhtml-mode)
+;; (use-package mhtml-mode)
(use-package sgml-mode
:config
(use-package window
:bind
- (("C-c w e" . (lambda ()
- (interactive)
- (split-window-right)
- (other-window 1)
- (erc-switch-to-buffer)))
- ("C-c w s l" . (lambda ()
+ (("C-c w s l" . (lambda ()
(interactive)
(split-window-right)
(other-window 1)))