Function: Info-hide-cookies-node

Info-hide-cookies-node is a byte-compiled function defined in info.el.gz.

Signature

(Info-hide-cookies-node)

Documentation

Hide unrecognized cookies in current node.

Source Code

;; Defined in /usr/src/emacs/lisp/info.el.gz
;; Texinfo 4.7 adds cookies of the form ^@^H[NAME CONTENTS ^@^H].
;; Hide any construct of the general form ^@[^@-^_][ ...  ^@[^@-^_]],
;; including one optional trailing newline.
(defun Info-hide-cookies-node ()
  "Hide unrecognized cookies in current node."
  (save-excursion
    (let ((inhibit-read-only t)
	  (case-fold-search t))
      (goto-char (point-min))
      (while (re-search-forward
	      "\\(\0[\0-\37][[][^\0]*\0[\0-\37][]]\n?\\)"
	      nil t)
	(let* ((start (match-beginning 1)))
	  (if (and (not (get-text-property start 'invisible))
		   (not (get-text-property start 'display)))
	      (put-text-property start (point) 'invisible t)))))
    (set-buffer-modified-p nil)))