Move markdown-mode bindings into use-package

This commit is contained in:
contrapunctus 2022-01-15 17:21:30 +05:30
parent 381b74304b
commit f5121d50dd
1 changed files with 7 additions and 9 deletions

View File

@ -4010,7 +4010,12 @@ From https://emacs.stackexchange.com/questions/20577/org-babel-load-all-language
("C-c C-h C-u" . #'markdown-toggle-url-hiding)
("C-c C-h C-m" . #'markdown-toggle-markup-hiding)
("C-c C-h C-i" . #'markdown-toggle-inline-images)
("C-c C-r" . #'reverse-region)))
("C-c C-r" . #'reverse-region)
("M-w" . cp/copy-md-link)
("TAB" . markdown-cycle)
("C-c C-." . markdown-demote)
("C-c C-," . markdown-promote)
("C-c C-l" . markdown-insert-link)))
(defun cp/copy-line-or-md-link (prefix-arg)
(interactive "P")
@ -4044,14 +4049,7 @@ whole-line-or-region-kill-ring-save instead."
(let ((point-a (point)))
(forward-char -1)
(forward-sexp)
(copy-region-as-kill point-a (- (point) 1))))))
(bind-keys
(:map markdown-mode-map
("M-w" . cp/copy-md-link)
("TAB" . markdown-cycle)
("C-c C-." . markdown-demote)
("C-c C-," . markdown-promote)
("C-c C-l" . markdown-insert-link))))
(copy-region-as-kill point-a (- (point) 1)))))))
(defun cp/copy-bus-entry ()
"For personal use, when working between Markdown and the OSM wiki."