[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: customize hideshow.el?

From: Stephen Leake
Subject: Re: customize hideshow.el?
Date: Sun, 27 Aug 2017 07:07:24 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (windows-nt)

Stephen Leake <address@hidden> writes:

> Eli Zaretskii <address@hidden> writes:
>>> From: Stephen Leake <address@hidden>
>>> Date: Sun, 13 Aug 2017 11:46:55 -0500
>>> I'd like to customize hideshow.el to display the first and last line in
>>> each hidden block.
>> Did you try "C-x $" (with an appropriate numerical argument)?
> I was not aware of that. It affects the whole buffer, but that's not a
> problem.
> With some wrappers to implement "hide lines more indented than this one"
> and "unhide all", that might do it.
> Thanks,

Just for the record, this works for me:

(defun sal-ada-hide-block ()
  "Hide contents of block whose structure is on current line."
    (setq selective-display (1+ (current-column)))))

(defun sal-ada-toggle-hide-block ()
  (if selective-display
      (setq selective-display nil)
  (force-window-update (selected-window)))

(define-key ada-mode-map "\C-ch" 'sal-ada-toggle-hide-block)

-- Stephe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]