summaryrefslogtreecommitdiffstats
path: root/init.el
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2022-11-24 20:38:15 +0000
committerMatthew Lemon <matt@matthewlemon.com>2022-11-24 20:38:15 +0000
commitf52436da06a172a7164f67a6a026b1b207f6dca9 (patch)
tree949f48d67017d978052d122b4aea47d003ae5177 /init.el
parentf8170600eefb8c07fb64825484cdfabfad4d5a76 (diff)
a function now to clear the checkbox
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