From ab39fb98a7a7a116427961e93a46f3738cb27935 Mon Sep 17 00:00:00 2001 From: Ravi R Kiran Date: Thu, 8 Jan 2015 08:18:06 -0800 Subject: Even better automatic indentation on newlines diff --git a/ravi-init-appearance.el b/ravi-init-appearance.el index 16730a8..c227b99 100644 --- a/ravi-init-appearance.el +++ b/ravi-init-appearance.el @@ -127,8 +127,13 @@ Delete all whitespace on a successive key press." ) ;; Enable automatic indentation, if possible -(bind-key "" 'newline-and-indent prog-mode-map) -(bind-key "" 'newline-and-indent emacs-lisp-mode-map) +(use-package smart-newline + :commands (smart-newline) + :init + (progn + (bind-key "" 'smart-newline prog-mode-map) + (bind-key "" 'smart-newline emacs-lisp-mode-map)) + :ensure t) ;; Zap up to char is more useful than zap-char (autoload 'zap-up-to-char "misc" "Kill up to, but not including ARGth occurrence of CHAR.") -- cgit v0.10.1