From 1975d5f685a1bbb9bfd1f9572797272f8429202d Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 28 Jun 2001 04:02:46 +0000 Subject: [PATCH] * message-ja.texi (message-suspend-font-lock-when-citing): Add a description. * message.texi (message-suspend-font-lock-when-citing): Ditto. * message.el (message-yank-original): Suspend font-lock'ing while citing an original message. (message-suspend-font-lock-when-citing): New user option. --- ChangeLog | 10 ++++++++++ lisp/message.el | 21 ++++++++++++++++++++- texi/message-ja.texi | 10 ++++++++++ texi/message.texi | 9 +++++++++ 4 files changed, 49 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f0fd49e..89487e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2001-06-28 Katsumi Yamaoka + + * texi/message-ja.texi (message-suspend-font-lock-when-citing): Add + a description. + * texi/message.texi (message-suspend-font-lock-when-citing): Ditto. + + * lisp/message.el (message-yank-original): Suspend font-lock'ing + while citing an original message. + (message-suspend-font-lock-when-citing): New user option. + 2001-06-25 Katsumi Yamaoka * lisp/gnus-clfns.el (find-cl-run-time-functions): New diff --git a/lisp/message.el b/lisp/message.el index c44e64c..ee08f7b 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -716,6 +716,17 @@ Note that `message-cite-original' uses `mail-citation-hook' if that is non-nil." :group 'message-insertion) ;;;###autoload +(defcustom message-suspend-font-lock-when-citing nil + "Non-nil means suspend font-lock'ing while citing an original message. +Some lazy demand-driven fontification tools (or Emacs itself) have a +bug that they often miss a buffer to be fontified. It will mostly +occur when Emacs prompts user for any inputs in the minibuffer. +Setting this option to non-nil may help you to avoid unpleasant errors +even if it is an add-hoc expedient." + :type 'boolean + :group 'message-insertion) + +;;;###autoload (defcustom message-indent-citation-function 'message-indent-citation "*Function for modifying a citation just inserted in the mail buffer. This can also be a list of functions. Each function can find the @@ -2577,7 +2588,15 @@ be added to \"References\" field. (backward-delete-char 1))))) (unless arg - (funcall message-cite-function)) + (if (and message-suspend-font-lock-when-citing + (boundp 'font-lock-mode) + (symbol-value 'font-lock-mode)) + (progn + (sit-for 0) + (font-lock-mode 0) + (funcall message-cite-function) + (font-lock-mode 1)) + (funcall message-cite-function))) (message-exchange-point-and-mark) (unless (bolp) (insert ?\n)) diff --git a/texi/message-ja.texi b/texi/message-ja.texi index 8058bbe..299996a 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -526,6 +526,16 @@ Hallvard B Furuseth writes: ますが、署名は省きます。Supercite を使うために、それ を @code{sc-cite-original} に設定する事もできます。 +@item message-suspend-font-lock-when-citing +@vindex message-suspend-font-lock-when-citing +@code{nil} でなければ、本記事を引用している間 font-lock の動作を止めます。 +いくつかの、Emacs が暇なときに遅れて動作する font-lock のためのツー +ル (または Emacs 自身) にはバグがあり、それらはしばしば font-lock の動作 +を行なう対象となるバッファを取り違えます。それはたいてい Emacs がミニバッ +ファでユーザに何かの入力を促すときに起こります。これはその場しのぎの対策 +ではあるのですが、このオプションを非-@code{nil} にすることによって、あな +たは不愉快なエラーを回避できるかもしれません。 + @item message-indent-citation-function @vindex message-indent-citation-function ちょうどメールバッファに挿入された引用文を修正するための関数です。これは diff --git a/texi/message.texi b/texi/message.texi index 9e7fc67..c543196 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -544,6 +544,15 @@ and prepends @samp{> } to each line. the signature. You can also set it to @code{sc-cite-original} to use Supercite. +@item message-suspend-font-lock-when-citing +@vindex message-suspend-font-lock-when-citing +If non-@code{nil}, suspend font-lock'ing while citing an original +message. Some lazy demand-driven fontification tools (or Emacs itself) +have a bug that they often miss a buffer to be fontified. It will +mostly occur when Emacs prompts user for any inputs in the minibuffer. +Setting this option to non-@code{nil} may help you to avoid unpleasant +errors even if it is an add-hoc expedient. + @item message-indent-citation-function @vindex message-indent-citation-function Function for modifying a citation just inserted in the mail buffer. -- 1.7.10.4