diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2015-01-08 16:18:06 (GMT) |
|---|---|---|
| committer | Ravi R Kiran <aine.marina@gmail.com> | 2015-01-08 16:18:06 (GMT) |
| commit | ab39fb98a7a7a116427961e93a46f3738cb27935 (patch) | |
| tree | b9afddc9849f9f925611b01dad1ac13147c6bbad /ravi-init-appearance.el | |
| parent | c6998021f6202e7bc22691ac18bf105f8da991f8 (diff) | |
| download | dotemacs-ab39fb98a7a7a116427961e93a46f3738cb27935.zip dotemacs-ab39fb98a7a7a116427961e93a46f3738cb27935.tar.gz dotemacs-ab39fb98a7a7a116427961e93a46f3738cb27935.tar.bz2 | |
Even better automatic indentation on newlines
Diffstat (limited to 'ravi-init-appearance.el')
| -rw-r--r-- | ravi-init-appearance.el | 9 |
1 files changed, 7 insertions, 2 deletions
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 "<return>" 'newline-and-indent prog-mode-map) -(bind-key "<return>" 'newline-and-indent emacs-lisp-mode-map) +(use-package smart-newline + :commands (smart-newline) + :init + (progn + (bind-key "<return>" 'smart-newline prog-mode-map) + (bind-key "<return>" '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.") |
