From: Lennart Borgman <lennart.borgman@gmail.com>
To: Emacs-Devel devel <emacs-devel@gnu.org>,
Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Small patch for rng-valid.el
Date: Wed, 13 May 2009 11:33:25 +0200 [thread overview]
Message-ID: <e01d8a50905130233h5b6ecfafwc9f9799fd2fdb66d@mail.gmail.com> (raw)
In-Reply-To: <e01d8a50905091902k447416dcm917c1fdad71aed1c@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]
It seems like I just sent the wrong patch for rng-valid.el on 2 May.
Here is the patch I thought I sent. It contains only some error
checking and is very simple (the errors actually happens sometimes). I
would be glad if it could be installed now.
On Sun, May 10, 2009 at 4:02 AM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> Ehum, my bad. I forgot that I had some other patches applied to
> rng-valid.el too...
>
> What I thought I sent was just a patch to surround the body of
> rng-after-change-function with
>
> (when rng-valid-up-to-date-end
> ...
> )
>
>
> On Sat, May 2, 2009 at 1:14 AM, Lennart Borgman
> <lennart.borgman@gmail.com> wrote:
>> I just realized that I have a small patch for rng-valid.el that is
>> needed for it to work with nXhtml/MuMaMo. I would be glad if we could
>> apply it now and I do not believe it can break anything. I have
>> attached the patch.
>>
>> Several people have had problems with this, see
>>
>> https://bugs.launchpad.net/nxhtml/+bug/354363
>>
>
[-- Attachment #2: rng-valid.el.diff --]
[-- Type: application/octet-stream, Size: 1745 bytes --]
Index: rng-valid.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/nxml/rng-valid.el,v
retrieving revision 1.9
diff -u -b -r1.9 rng-valid.el
--- rng-valid.el 5 Jan 2009 03:22:55 -0000 1.9
+++ rng-valid.el 1 May 2009 23:08:18 -0000
@@ -304,6 +304,7 @@
(or rng-validate-mode (rng-validate-mode)))
(defun rng-after-change-function (start end pre-change-len)
+ (when rng-validate-up-to-date-end
;; Work around bug in insert-file-contents.
(when (> end (1+ (buffer-size)))
(setq start 1)
@@ -343,7 +344,7 @@
;; Arrange to revalidate
(rng-activate-timers)
;; Need to do this after activating the timer
- (force-mode-line-update))
+ (force-mode-line-update)))
(defun rng-compute-mode-line-string ()
(cond (rng-validate-timer
@@ -443,6 +444,8 @@
;; validation process down.
(defun rng-validate-while-idle (buffer)
+ (if (not (buffer-live-p buffer))
+ (rng-kill-timers)
(with-current-buffer buffer
(if rng-validate-mode
(if (let ((rng-validate-display-point (point))
@@ -451,16 +454,18 @@
(force-mode-line-update)
(rng-validate-done))
;; must have done kill-all-local-variables
- (rng-kill-timers))))
+ (rng-kill-timers)))))
(defun rng-validate-quick-while-idle (buffer)
+ (if (not (buffer-live-p buffer))
+ (rng-kill-timers)
(with-current-buffer buffer
(if rng-validate-mode
(if (rng-do-some-validation)
(force-mode-line-update)
(rng-validate-done))
;; must have done kill-all-local-variables
- (rng-kill-timers))))
+ (rng-kill-timers)))))
(defun rng-validate-done ()
(when (or (not (current-message))
next prev parent reply other threads:[~2009-05-13 9:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-01 23:14 Small patch for rng-valid.el Lennart Borgman
2009-05-02 1:37 ` Stefan Monnier
2009-05-02 1:41 ` Lennart Borgman
2009-05-02 11:46 ` Davi Leal
2009-05-02 11:50 ` Lennart Borgman
2009-05-10 2:02 ` Lennart Borgman
2009-05-13 9:33 ` Lennart Borgman [this message]
2009-05-13 14:34 ` Jason Rumney
2009-05-13 20:55 ` Lennart Borgman
2009-05-13 22:53 ` Jason Rumney
2009-05-13 22:59 ` Lennart Borgman
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=e01d8a50905130233h5b6ecfafwc9f9799fd2fdb66d@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.