branch: elpa/git-commit
commit 6d325d90ba1374d48c4c7088f96864b678155f48
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
Revert "git-commit-setup: Enable mode after setting local variables"
This reverts commit ece2cb84dd31aa967ef37a0d8bc2293c1c52db87.
That commit's goal was to ensure that we don't unset variables
that are not permanently local but that also prevented the major-
mode specified with `git-commit-major-mode' from being enabled.
Eventually we should fix both issues.
---
lisp/git-commit.el | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/lisp/git-commit.el b/lisp/git-commit.el
index b34fec58a0..739a65f1f5 100644
--- a/lisp/git-commit.el
+++ b/lisp/git-commit.el
@@ -530,17 +530,6 @@ to recover older messages")
;; That library declares this functions without loading
;; magit-process.el, which defines it.
(require 'magit-process nil t))
- (when git-commit-major-mode
- (let ((auto-mode-alist (list (cons (concat "\\`"
- (regexp-quote buffer-file-name)
- "\\'")
- git-commit-major-mode)))
- ;; The major-mode hook might want to consult these minor
- ;; modes, while the minor-mode hooks might want to consider
- ;; the major mode.
- (git-commit-mode t)
- (with-editor-mode t))
- (normal-mode t)))
;; Pretend that git-commit-mode is a major-mode,
;; so that directory-local settings can be used.
(let ((default-directory
@@ -557,6 +546,17 @@ to recover older messages")
(major-mode 'git-commit-mode)) ; trick dir-locals-collect-variables
(hack-dir-local-variables)
(hack-local-variables-apply)))
+ (when git-commit-major-mode
+ (let ((auto-mode-alist (list (cons (concat "\\`"
+ (regexp-quote buffer-file-name)
+ "\\'")
+ git-commit-major-mode)))
+ ;; The major-mode hook might want to consult these minor
+ ;; modes, while the minor-mode hooks might want to consider
+ ;; the major mode.
+ (git-commit-mode t)
+ (with-editor-mode t))
+ (normal-mode t)))
;; Show our own message using our hook.
(setq with-editor-show-usage nil)
(setq with-editor-usage-message git-commit-usage-message)