summaryrefslogtreecommitdiffstats
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/init.el b/init.el
index 551ff0e..88aa226 100644
--- a/init.el
+++ b/init.el
@@ -227,10 +227,20 @@ Restart works only on graphic display."
;; PACKAGES
;; markdown mode
+
+(defun mrl/clear-check-single-line ()
+ (interactive)
+ (save-excursion
+ (beginning-of-line)
+ (forward-char 3)
+ (delete-char 1)
+ (insert-char ?\s))
+ (next-line))
+
(use-package markdown-mode
:ensure t
:bind (:map markdown-mode-map
- ("C-c C-v" . mrl/markdown-clear-checkbox))
+ ("C-c C-v" . mrl/clear-check-single-line))
:hook (markdown-mode-hook . (lambda ()
(when buffer-file-name
(add-hook 'after-save-hook