diff options
-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))) |