From: Jonathan Nieder <jrnieder@gmail.com>
To: Alexandre Julliard <julliard@winehq.org>
Cc: "Kevin Ryde" <user42@zip.com.au>,
git@vger.kernel.org, "David Kågedal" <davidk@lysator.liu.se>
Subject: [BUG?] git.el: M-x git-commit-file produces error if font lock is disabled
Date: Thu, 3 Feb 2011 18:10:16 -0600 [thread overview]
Message-ID: <20110204001016.GC16688@elie> (raw)
In-Reply-To: <87lkkgw9mg.fsf@wine.dyndns.org>
Hi,
Kevin Ryde reports[1]:
> If font lock is disabled, M-x git-commit-file gets an error when setting
> up the log message edit buffer.
>
> M-: (global-font-lock-mode 0)
> M-x git-status
> /some/git/directory
> c <- on a modified file
>
> => Font-lock trying to use keywords before setting them up
>
> I suppose font-lock-compile-keywords should not be used if font lock is
> not enabled. I suspect font-lock-add-keywords might be the right thing
> instead. It seems to work for me (the code is supposed to replace the
> normal log-edit-mode keywords is it?).
and suggests a patch[2]. Does it make sense?
Ignorantly,
Jonathan
[1] http://bugs.debian.org/577834 from a while ago.
Sorry for the long delay.
[2]
contrib/emacs/git.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 214930a..0c93ef1 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -1337,7 +1337,7 @@ The FILES list must be sorted."
(log-edit 'git-do-commit nil '((log-edit-listfun . git-log-edit-files)
(log-edit-diff-function . git-log-edit-diff)) buffer)
(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))
+ (font-lock-add-keywords nil git-log-edit-font-lock-keywords 'set)
(setq paragraph-separate (concat (regexp-quote git-log-msg-separator) "$\\|Author: \\|Date: \\|Merge: \\|Signed-off-by: \\|\f\\|[ ]*$"))
(setq buffer-file-coding-system coding-system)
(re-search-forward (regexp-quote (concat git-log-msg-separator "\n")) nil t))))
--
1.7.4
next prev parent reply other threads:[~2011-02-04 0:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-06 13:46 [PATCH] git.el: Avoid setting font lock keywords before entering log-edit mode Alexandre Julliard
2011-02-04 0:10 ` Jonathan Nieder [this message]
2011-02-04 11:40 ` [BUG?] git.el: M-x git-commit-file produces error if font lock is disabled Lawrence Mitchell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110204001016.GC16688@elie \
--to=jrnieder@gmail.com \
--cc=davidk@lysator.liu.se \
--cc=git@vger.kernel.org \
--cc=julliard@winehq.org \
--cc=user42@zip.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).