Function: add-to-invisibility-spec

add-to-invisibility-spec is a byte-compiled function defined in subr.el.gz.

Signature

(add-to-invisibility-spec ELEMENT)

Documentation

Add ELEMENT to buffer-invisibility-spec.

See documentation for buffer-invisibility-spec for the kind of elements that can be added.

If buffer-invisibility-spec isn't a list before calling this function, buffer-invisibility-spec will afterwards be a list with the value (t ELEMENT). This means that if text exists that invisibility values that aren't either t or ELEMENT, that text will become visible.

View in manual

Probably introduced at or before Emacs version 20.1.

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
;;;; invisibility specs

(defun add-to-invisibility-spec (element)
  "Add ELEMENT to `buffer-invisibility-spec'.
See documentation for `buffer-invisibility-spec' for the kind of elements
that can be added.

If `buffer-invisibility-spec' isn't a list before calling this
function, `buffer-invisibility-spec' will afterwards be a list
with the value `(t ELEMENT)'.  This means that if text exists
that invisibility values that aren't either t or ELEMENT, that
text will become visible."
  (if (eq buffer-invisibility-spec t)
      (setq buffer-invisibility-spec (list t)))
  (setq buffer-invisibility-spec
	(cons element buffer-invisibility-spec)))