[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sgml-mode skip tag forward/back bug fix -- followup
From: |
Kevin Rodgers |
Subject: |
Re: sgml-mode skip tag forward/back bug fix -- followup |
Date: |
29 Apr 2002 17:34:43 -0600 |
"Mallory, Rich" <Rich.Mallory@ausinfo.com> writes:
> Further testing revealed that the bug fix proposed in that email
> was incomplete. The complete set of diffs follows, including the
> diffs from the original email. The proposed fix works without the
> new additions. However, the change to line 687 is needed to
> keep up-list from beeping each time function sgml-skip-tag-forward
> is executed. (My machine at work has no speaker, so I didn't hear
> a beep and ignored the message until I got home.) The original
> code for line 683 produces no beep, but the change to line 683
> seems advisable.
...
> The changes to lines 683 and 687 are required by the change to
> line 676. The latter causes the regexp 're' to match one
> additional character, leaving the point after that character. If this
> character is '>', the point is outside the tag matched by 're'. In
> the original code, the point was inside the tag, and up-list moved
> the point to the beginning of the tag. With the point after the
> closing '>', up-list can't do that.
Why don't you make use of the syntax table, and append "\\>" instead
to the tag regexp? That would prevent matching element names that are
a prefix of the one to be skipped as desired, and wouldn't match the
extra character that necessitates the call to backward-char before
up-list.
--
Kevin Rodgers <kevinr@ihs.com>