summaryrefslogtreecommitdiffstats
path: root/init.el
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2022-11-24 21:17:18 +0000
committerMatthew Lemon <matt@matthewlemon.com>2022-11-24 21:17:18 +0000
commitdcdb1ff2aec04056d861c7342826a2183bd7ca6e (patch)
treefeef6cd43c5f1bd07ad74002ef5c0b99abd7c779 /init.el
parenta013fa100f1706200af4e656dd09d1a1f75b2c44 (diff)
function to remove checks from successive checkbox lines in markdown
Diffstat (limited to 'init.el')
-rw-r--r--init.el25
1 files changed, 14 insertions, 11 deletions
diff --git a/init.el b/init.el
index 88aa226..1d7d33a 100644
--- a/init.el
+++ b/init.el
@@ -224,18 +224,21 @@ Restart works only on graphic display."
(setq coding-system-for-read 'utf-8)
(setq coding-system-for-write 'utf-8)
-;; PACKAGES
-
-;; markdown mode
+;; for markdown mode
+;; do this for a region next
+(defun mrl/clear-check-single-line (&optional lines)
+ "Remove the check from LINES number of markdown checkbox lines."
+ (interactive "p")
+ (while (> lines 0)
+ (save-excursion
+ (beginning-of-line)
+ (forward-char 3)
+ (delete-char 1)
+ (insert-char ?\s))
+ (next-line)
+ (setq lines (- lines 1))))
-(defun mrl/clear-check-single-line ()
- (interactive)
- (save-excursion
- (beginning-of-line)
- (forward-char 3)
- (delete-char 1)
- (insert-char ?\s))
- (next-line))
+;; PACKAGES
(use-package markdown-mode
:ensure t