branch: elpa/fedi
commit 62aea20f11161d2665180498e79aade7e5f5a114
Merge: 0967dd0f05a d165889c466
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>

    Merge branch 'dev'
---
 fedi-post.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/fedi-post.el b/fedi-post.el
index 552022d59e6..e3c6894b3ec 100644
--- a/fedi-post.el
+++ b/fedi-post.el
@@ -621,7 +621,7 @@ Added to `after-change-functions'."
 
 (defun fedi-post--compose-buffer
     (&optional edit major minor prefix type capf-funs fields
-               init-text reply-text buf-prefix)
+               init-text reply-text buf-prefix autocomplete)
   "Create a new buffer to capture text for a new post.
 EDIT means we are editing an existing post, not composing a new one.
 MAJOR is the major mode to enable.
@@ -675,7 +675,8 @@ BUF-PREFIX is a string to prepend to the buffer name."
              (add-to-list 'company-backends 'company-capf))
         (company-mode-on))
       ;; corfu
-      (when (require 'corfu nil :no-error)
+      (when (and (require 'corfu nil :no-error)
+                 autocomplete)
         (setq-local corfu-auto t)
         (corfu--on)))
     ;; after-change:
@@ -699,6 +700,10 @@ BUF-PREFIX is a string to prepend to the buffer name."
     ;; we would need to add our own propertizing to md-mode font-locking
     (when (eq major 'markdown-mode)
       (cl-pushnew #'fedi-post-fontify-body-region after-change-functions))
+    ;; dir locals
+    (let ((enable-local-variables :all))
+      (hack-dir-local-variables-non-file-buffer))
+    ;; init and reply text
     (when init-text
       (insert init-text)
       (delete-trailing-whitespace))

Reply via email to