Article View: gnu.emacs.bug
Article #784Re: selective display bug
From: Joe Wells
Date: Sun, 11 Oct 1992 02:58
Date: Sun, 11 Oct 1992 02:58
34 lines
1902 bytes
1902 bytes
In article <9210020112.AA28170@napa.TELEBIT.COM> phr@napa.telebit.com (Paul Rubin) writes:
C-x $ with no argument, disabling selective display, should not move
the cursor. For example, with selective display enabled, putting the
cursor at an interesting question in the Emacs FAQ (etc/FAQ) and
hitting C-x $ should display the answer along with the question.
Instead, as it stands, both go way, way, off the screen.
Here is RMS's fixed version:
(defun set-selective-display (arg)
"Set selective-display to ARG; clear it if no arg.
When selective-display is a number > 0,
lines whose indentation is >= selective-display are not displayed.
selective-display's value is separate 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 (selected-window)))
(princ "selective-display set to " t)
(prin1 selective-display t)
(princ "." t))
--
Joe Wells <jbw@cs.bu.edu>
Member of the League for Programming Freedom --- send e-mail for details
Technical Details
Message-ID:
<JBW.92Oct10215810@bigbird.bu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bigbird.bu.edu!jbwReferences:
<9210020112.AA28170@napa.TELEBIT.COM>Show Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.bug Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bigbird.bu.edu!jbw From: jbw@bigbird.bu.edu (Joe Wells) Subject: Re: selective display bug Message-ID: <JBW.92Oct10215810@bigbird.bu.edu> Sender: gnulists@ai.mit.edu Organization: Boston University Computer Science Department References: <9210020112.AA28170@napa.TELEBIT.COM> Distribution: gnu Date: Sun, 11 Oct 1992 02:58:10 GMT Approved: bug-gnu-emacs@prep.ai.mit.edu Lines: 35