branch: externals/vc-jj
commit 5fc07c89d14bdefc9fefde2eaba3ec23ad13f4b8
Author: Rudi Schlatte <r...@constantly.at>
Commit: Rudi Schlatte <r...@constantly.at>

    Use log-edit-mode for .jjdescription files
    
    This uses log-edit-mode when `jj describe` invokes emacs, for example
    when emacs or emacsclient are set as `$EDITOR`.
---
 NEWS.org | 4 ++++
 vc-jj.el | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/NEWS.org b/NEWS.org
index 1be5f7f13c..2e2789dd60 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -4,6 +4,10 @@
 
 *** Changed
 
+- Files of type =.jjdescription= are now edited using =log-edit-mode=
+  instead of fundamental mode.  Such files are created by jj when
+  invoking an editor via =jj describe=.
+
 - Display more information in =vc-dir= headers:
   - Display change id, commit id, description of the current changeset
     in one line.
diff --git a/vc-jj.el b/vc-jj.el
index 9b97be8746..8cd6e03769 100644
--- a/vc-jj.el
+++ b/vc-jj.el
@@ -621,5 +621,8 @@ the command to run, e.g., the semi-standard \"jj git push 
-c @-\"."
                         nil))))
   (vc-set-async-update buffer))
 
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.jjdescription\\'" . log-edit-mode))
+
 (provide 'vc-jj)
 ;;; vc-jj.el ends here

Reply via email to