diff options
-rw-r--r-- | init.el | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/init.el b/init.el index c2d4b2b..18cc30d 100644 --- a/init.el +++ b/init.el | |||
@@ -247,13 +247,24 @@ | |||
247 | (tooltip-mode -1) | 247 | (tooltip-mode -1) |
248 | (winner-mode +1) | 248 | (winner-mode +1) |
249 | 249 | ||
250 | ;; Bindings | 250 | ;;; Bindings |
251 | (:global "M-SPC" cycle-spacing | 251 | (:global "M-SPC" cycle-spacing |
252 | "M-/" hippie-expand | 252 | "M-/" hippie-expand |
253 | "M-=" count-words | 253 | "M-=" count-words |
254 | "C-x C-b" ibuffer | 254 | "C-x C-b" ibuffer |
255 | "C-c i" acdw/find-emacs-dotfiles | 255 | "C-c i" acdw/find-emacs-dotfiles |
256 | "C-x k" acdw/kill-a-buffer)) | 256 | "C-x k" acdw/kill-a-buffer) |
257 | |||
258 | ;;; Advice | ||
259 | ;; `acdw/kill-line-and-join-advice' cribs from `crux-kill-and-join-forward'. | ||
260 | ;; I can't simply advise `kill-line' with an override from crux because crux | ||
261 | ;; itself calls `kill-line', leading to a infinite nesting situation. | ||
262 | (advice-add 'kill-line :around | ||
263 | (defun acdw/kill-line-and-join-advice (orig &rest args) | ||
264 | "If at end of line, join with following; otherwise kill line." | ||
265 | (if (and (eolp) (not (bolp))) | ||
266 | (delete-indentation 1) | ||
267 | (apply orig args))))) | ||
257 | 268 | ||
258 | ;; Regular modes (`text-mode', `prog-mode', etc.) | 269 | ;; Regular modes (`text-mode', `prog-mode', etc.) |
259 | (defun acdw/setup-regular-modes () | 270 | (defun acdw/setup-regular-modes () |