Function: semantic--tag-unlink-secondary-overlays

semantic--tag-unlink-secondary-overlays is a byte-compiled function defined in decorate.el.gz.

Signature

(semantic--tag-unlink-secondary-overlays TAG)

Documentation

Unlink secondary overlays from TAG.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/decorate.el.gz
(defun semantic--tag-unlink-secondary-overlays (tag)
  "Unlink secondary overlays from TAG."
  (let ((ol (semantic-tag-secondary-overlays tag))
	(nl nil))
    (while ol
      (if (overlay-get (car ol) 'semantic-link-hook)
	  ;; Only put in a proxy if there is a link-hook.  If there is no link-hook
	  ;; the decorating mode must know when tags are unlinked on its own.
	  (setq nl (cons (overlay-get (car ol) 'semantic-link-hook)
			 nl))
	;; Else, remove all  traces of ourself from the tag
	;; Note to self: Does this prevent multiple types of secondary
	;; overlays per tag?
	(semantic-tag-remove-hook tag 'link-hook 'semantic--tag-link-secondary-overlays)
	(semantic-tag-remove-hook tag 'unlink-hook 'semantic--tag-unlink-secondary-overlays)
	(semantic-tag-remove-hook tag 'unlink-copy-hook 'semantic--tag-unlink-copy-secondary-overlays)
	)
      (delete-overlay (car ol))
      (setq ol (cdr ol)))
    (semantic--tag-put-property tag 'secondary-overlays (nreverse nl))
    ))