Variable: sgml-tags-invisible
sgml-tags-invisible is a buffer-local variable defined in
sgml-mode.el.gz.
Documentation
Non-nil if Sgml-Tags-Invisible mode is enabled.
Use the command sgml-tags-invisible(var)/sgml-tags-invisible(fun) to change this variable.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/sgml-mode.el.gz
(define-minor-mode sgml-tags-invisible
"Toggle visibility of existing tags."
:global nil
(with-silent-modifications
(save-excursion
(goto-char (point-min))
(if sgml-tags-invisible
(while (re-search-forward sgml-tag-name-re nil t)
(let ((string
(cdr (assq (intern-soft (downcase (match-string 1)))
sgml-display-text))))
(goto-char (match-beginning 0))
(and (stringp string)
(not (overlays-at (point)))
(let ((ol (make-overlay (point) (match-beginning 1))))
(overlay-put ol 'before-string string)
(overlay-put ol 'sgml-tag t)))
(put-text-property (point)
(let ((forward-sexp-function nil))
(forward-sexp 1)
(point))
'category 'sgml-tag)))
(let ((pos (point-min)))
(while (< (setq pos (next-overlay-change pos)) (point-max))
(dolist (ol (overlays-at pos))
(if (overlay-get ol 'sgml-tag)
(delete-overlay ol)))))
(remove-text-properties (point-min) (point-max) '(category nil)))))
(when sgml-tags-invisible
(cursor-sensor-mode 1)))