Function: set-selective-display

set-selective-display is an interactive and byte-compiled function defined in simple.el.gz.

Signature

(set-selective-display ARG)

Documentation

Set selective-display to ARG; clear it if no arg.

When the value of selective-display is a number > 0, lines whose indentation is >= that value are not displayed. The variable selective-display has a separate value for each buffer.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun set-selective-display (arg)
  "Set `selective-display' to ARG; clear it if no arg.
When the value of `selective-display' is a number > 0,
lines whose indentation is >= that value are not displayed.
The variable `selective-display' has a separate value for each buffer."
  (interactive "P")
  (if (eq selective-display t)
      (error "selective-display already in use for marked lines"))
  (let ((current-vpos
	 (save-restriction
	   (narrow-to-region (point-min) (point))
	   (goto-char (window-start))
	   (vertical-motion (window-height)))))
    (setq selective-display
	  (and arg (prefix-numeric-value arg)))
    (recenter current-vpos))
  (set-window-start (selected-window) (window-start))
  (princ "selective-display set to " t)
  (prin1 selective-display t)
  (princ "." t))