mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2025-12-16 20:10:58 +01:00
fixed org-table hook
This commit is contained in:
@@ -6,9 +6,11 @@
|
|||||||
|
|
||||||
;; via https://stackoverflow.com/a/26297700
|
;; via https://stackoverflow.com/a/26297700
|
||||||
(defun tvd-cleanup-org-tables ()
|
(defun tvd-cleanup-org-tables ()
|
||||||
(save-excursion
|
(interactive)
|
||||||
(goto-char (point-min))
|
(when (equal major-mode 'markdown-mode)
|
||||||
(while (search-forward "-+-" nil t) (replace-match "-|-"))))
|
(save-excursion
|
||||||
|
(goto-char (point-min))
|
||||||
|
(while (search-forward "-+-" nil t) (replace-match "-|-")))))
|
||||||
|
|
||||||
(defun tvd-markdown-todo ()
|
(defun tvd-markdown-todo ()
|
||||||
"Create dynamically highlighted TODO list of MD list"
|
"Create dynamically highlighted TODO list of MD list"
|
||||||
@@ -33,24 +35,9 @@ save the buffer [again], also check if parens are balanced"
|
|||||||
:config
|
:config
|
||||||
(modify-syntax-entry ?\" "\"" markdown-mode-syntax-table)
|
(modify-syntax-entry ?\" "\"" markdown-mode-syntax-table)
|
||||||
|
|
||||||
;; (defun tvd-markdown-hooks ()
|
(add-hook 'before-save-hook 'tvd-cleanup-org-tables)
|
||||||
;; (when buffer-file-name
|
|
||||||
;; (add-hook 'after-save-hook
|
|
||||||
;; 'check-parens
|
|
||||||
;; nil t)
|
|
||||||
;; (add-hook 'after-save-hook 'tvd-cleanup-org-tables nil 'make-it-local))
|
|
||||||
|
|
||||||
;; (modify-syntax-entry ?\" "\"" markdown-mode-syntax-table)
|
:hook
|
||||||
|
|
||||||
;; (when (fboundb 'orgtbl-mode)
|
|
||||||
;; (add-hook 'markdown-mode-hook 'orgtbl-mode))
|
|
||||||
|
|
||||||
;; ;; (when (fboundb 'orgalist))
|
|
||||||
;; (add-hook 'markdown-mode-hook 'orgalist-mode))
|
|
||||||
|
|
||||||
(add-hook 'after-save-hook 'tvd-cleanup-org-tables nil 'make-it-local)
|
|
||||||
|
|
||||||
:hook ;; tvd-markdown-hooks
|
|
||||||
(markdown-mode . orgalist-mode)
|
(markdown-mode . orgalist-mode)
|
||||||
(markdown-mode . orgtbl-mode))
|
(markdown-mode . orgtbl-mode))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user