diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 3585147..cdd652d 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -20,23 +20,20 @@ (global-set-key (kbd "C-c k") 'kill-current-buffer) (global-set-key (kbd "C-c e v") 'eval-buffer) -(defun reindent-buffer (start end &optional column) - "Reindent the current buffer." - (interactive "r\nP") - (save-excursion - (mark-whole-buffer) - (indent-region start end column))) -(global-set-key (kbd "C-c C-r") 'reindent-buffer) - +;; utilities (defun edit-init-file () - "Switch to a buffer visiting your user's init file. -One will be created if none exist." + "Switch to a buffer visiting your init file." (interactive) (find-file user-init-file)) -(global-set-key (kbd "C-c e i") 'edit-init-file) +(defun reindent-buffer () + "Reindent the current buffer." + (interactive) + (indent-region (point-min) (point-max))) -(defalias 'describe-word 'dictionary-search) -(global-set-key (kbd "C-h w") 'describe-word) +;; other key binds +(global-set-key (kbd "C-c e r") 'reindent-buffer) +(global-set-key (kbd "C-c e i") 'edit-init-file) +(global-set-key (kbd "C-h w") 'dictionary-search) ;; variables (setq compilation-scroll-output t