From b4a8efb46e77f88053bc1babb50969b5bbb0733a Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 28 Jun 2001 04:02:26 +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 8d704d8..f3b9bd2 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 9d2aa99..645fbb1 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -725,6 +725,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 @@ -2606,7 +2617,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 350de37..54ae2b3 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -536,6 +536,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 880c419..bc5b2d2 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -554,6 +554,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