Skip to content

Comments

Fix highlight on modern nxml-mode#4

Open
amake wants to merge 1 commit intodeactivated:masterfrom
amake:nxml-highlight-fix
Open

Fix highlight on modern nxml-mode#4
amake wants to merge 1 commit intodeactivated:masterfrom
amake:nxml-highlight-fix

Conversation

@amake
Copy link

@amake amake commented Oct 8, 2021

On Emacs 27.2 I get the following results when enabling hl-tags-mode in an nxml-mode buffer containing

<?xml version="1.0" encoding="UTF-8"?>
<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>

Results (before this PR):

Screen Shot 2021-10-08 at 11 49 55

This doesn't seem right to me. It looks like the behavior of some of the nxml movement functions might have changed. This PR adjusts things to obtain the following results:

Screen Shot 2021-10-08 at 11 42 09

Potential issues with this change:

  • It could produce bad results with whatever Emacs/nxml version this package was originally designed for
  • hl-tags--jump-to-end-of-current-context is not efficient; I couldn't figure out a better way to jump to the start of the current context's closing tag, so if anyone has a better solution please let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant