about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+crux.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/+crux.el b/lisp/+crux.el index 45b4dee..c55a0b9 100644 --- a/lisp/+crux.el +++ b/lisp/+crux.el
@@ -44,5 +44,15 @@ prompt for the time format."
44 (format-time-string +crux-alternate-date-format time)) 44 (format-time-string +crux-alternate-date-format time))
45 (t (format-time-string (read-string "Time Format: ") time)))))) 45 (t (format-time-string (read-string "Time Format: ") time))))))
46 46
47(defun +crux-kill-and-join-forward (&optional arg)
48 "If at end of line, join with following; else (visual)-kill line.
49In `visual-line-mode', runs command `kill-visual-line'; in other
50modes, runs command `kill-line'. Passes ARG to command when
51provided. Deletes whitespace at join."
52 (interactive "P")
53 (if (and (eolp) (not (bolp)))
54 (delete-indentation 1)
55 (funcall (if visual-line-mode #'kill-visual-line #'kill-line) arg)))
56
47(provide '+crux) 57(provide '+crux)
48;;; +crux.el ends here 58;;; +crux.el ends here