summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f281e3a)
raw | patch | inline | side by side (parent: f281e3a)
author | Alexandre Julliard <julliard@winehq.org> | |
Sat, 6 Jan 2007 13:46:47 +0000 (14:46 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 6 Jan 2007 18:45:13 +0000 (10:45 -0800) |
Instead, reinitialize the keywords after the fact. This avoids
conflicts with other users of log-edit mode, like pcl-cvs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
conflicts with other users of log-edit mode, like pcl-cvs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
contrib/emacs/git.el | patch | blob | history |
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 38915e59aacde35f7042d7c949fe5446ed06a0f8..ede3ab2bd8bd77f9bf110f83bb0dfb9688634aef 100644 (file)
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
(eval-when-compile (require 'cl))
(require 'ewoc)
+(require 'log-edit)
;;;; Customizations
(defconst git-log-msg-separator "--- log message follows this line ---")
+(defvar git-log-edit-font-lock-keywords
+ `(("^\\(Author:\\|Date:\\|Parent:\\|Signed-off-by:\\)\\(.*\\)$"
+ (1 font-lock-keyword-face)
+ (2 font-lock-function-name-face))
+ (,(concat "^\\(" (regexp-quote git-log-msg-separator) "\\)$")
+ (1 font-lock-comment-face))))
+
(defun git-get-env-strings (env)
"Build a list of NAME=VALUE strings from a list of environment strings."
(mapcar (lambda (entry) (concat (car entry) "=" (cdr entry))) env))
(sign-off
(insert (format "\n\nSigned-off-by: %s <%s>\n"
(git-get-committer-name) (git-get-committer-email)))))))
- (let ((log-edit-font-lock-keywords
- `(("^\\(Author:\\|Date:\\|Parent:\\|Signed-off-by:\\)\\(.*\\)"
- (1 font-lock-keyword-face)
- (2 font-lock-function-name-face))
- (,(concat "^\\(" (regexp-quote git-log-msg-separator) "\\)$")
- (1 font-lock-comment-face)))))
- (log-edit #'git-do-commit nil #'git-log-edit-files buffer)
- (re-search-forward (regexp-quote (concat git-log-msg-separator "\n")) nil t))))
+ (log-edit #'git-do-commit nil #'git-log-edit-files buffer)
+ (setq font-lock-keywords (font-lock-compile-keywords git-log-edit-font-lock-keywords))
+ (re-search-forward (regexp-quote (concat git-log-msg-separator "\n")) nil t)))
(defun git-find-file ()
"Visit the current file in its own buffer."