|
|
|
|
@ -462,13 +462,19 @@ |
|
|
|
|
#+end_src |
|
|
|
|
** Smart open-line |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(defun open-line-and-indent () |
|
|
|
|
(interactive) |
|
|
|
|
(save-excursion (newline-and-indent)) |
|
|
|
|
(indent-line)) |
|
|
|
|
(defun open-line-and-indent (arg) |
|
|
|
|
(interactive "*p") |
|
|
|
|
(save-excursion |
|
|
|
|
(newline-and-indent) |
|
|
|
|
(skip-chars-forward "[:blank:]") |
|
|
|
|
(when (eolp) |
|
|
|
|
(let ((e (point)) |
|
|
|
|
(b (progn (beginning-of-line) (point)))) |
|
|
|
|
(delete-region b e)))) |
|
|
|
|
(funcall indent-line-function)) |
|
|
|
|
|
|
|
|
|
(global-set-key (kbd "C-o") #'open-line-and-indent) |
|
|
|
|
#+end_src |
|
|
|
|
#+end_src |
|
|
|
|
** Whitespace |
|
|
|
|
Trailing whitespace is evil; get rid of it unless we are in special |
|
|
|
|
modes, namely calendar (and later mu4e) |
|
|
|
|
|