Subject: bug#22299: Obsolete selective-display

From: Stefan Monnier <[email-masked]>
Date: Thu, 21 Jan 2021 12:14:46 -0500

>> Perhaps this is done as of 2f50a99 and similar.
> The `selective-display' variable isn't marked as deprecated, though, and
> is used throughout Emacs...

I don't think it's *used* throughout.  AFAIK it's *obeyed* at many
places, in case someone still uses it (it's obsolete, not removed).
If you spot an actual use, please report it as a bug.

> should it be marked as such?  And the usages either removed (from the
> callers) or warnings suppressed (in simple.el etc).

The problem is that the var has 2 uses:
- one is the obsolete value `t` whereby \r.* is hidden
- the other is when it's set to an integer N whereby it hides lines with
  a deeper indentation than N.

The second one is a UI functionality and it's sufficiently "not terribly
useful" that nobody bothered to write a replacement for it using
overlays (instead, all the possible replacements provide a more tailored
functionality).

        Stefan