diff options
author | jao <jao@gnu.org> | 2023-11-11 23:11:36 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2023-11-11 23:11:36 +0000 |
commit | 8ca6d8bf94f4e8418d8ceb1143a2b06e4f714278 (patch) | |
tree | 742f5b5b12a8bd79f8d8962dec96c1c39364d19a | |
parent | 2b3cbdb59589c7d5ac7e4e28a1db2c2f6e88ad57 (diff) | |
download | elibs-8ca6d8bf94f4e8418d8ceb1143a2b06e4f714278.tar.gz elibs-8ca6d8bf94f4e8418d8ceb1143a2b06e4f714278.tar.bz2 |
slack: multi-line markdown
-rw-r--r-- | init.el | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -2553,6 +2553,17 @@ ("C-c C-a" . slack-file-upload))) :hook ((slack-file-info-buffer-mode . view-mode)) :config + + (defun my-slack-nobreak-mrkdwn () + "Return non-nil (don't break line) if point is in markdown code face." + (seq-find (lambda (ov) + (eq 'slack-mrkdwn-code-block-face (overlay-get ov 'face))) + (overlays-at (point)))) + (add-hook 'slack-message-buffer-mode-hook + (lambda () + (add-hook 'fill-nobreak-predicate #'my-slack-nobreak-mrkdwn + nil 'local))) + (dolist (f (list slack-file-dir slack-image-file-directory)) (when (not (file-exists-p f)) (make-directory f))) |