diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2022-11-24 21:17:18 +0000 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2022-11-24 21:17:18 +0000 |
commit | dcdb1ff2aec04056d861c7342826a2183bd7ca6e (patch) | |
tree | feef6cd43c5f1bd07ad74002ef5c0b99abd7c779 /init.el | |
parent | a013fa100f1706200af4e656dd09d1a1f75b2c44 (diff) |
function to remove checks from successive checkbox lines in markdown
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -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 |