Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions hl-tags-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,23 @@
(setq end2 (point))

(nxml-backward-single-balanced-item)
(setq start2 (point))
(setq start1 (point))

(nxml-up-element -1)
(nxml-down-element 1)
(setq end1 (point))

(nxml-forward-single-balanced-item)
(setq start1 (point))
(hl-tags--jump-to-end-of-current-context)
(setq start2 (point))

(cons (cons start1 end1) (cons start2 end2))))
(error nil)))

(defun hl-tags--jump-to-end-of-current-context ()
(condition-case nil
(while t
(nxml-forward-balanced-item))
(error nil)))

(defun hl-tags-context ()
"Return a pair ((start . end) . (start . end)) containing the
boundaries of the current start and end tag , or nil."
Expand Down