No, the add-hook actually enables hs-minor-mode automatically when a buffer
enters ledger-mode. hs-minor-mode enables the hideshow-keybindings.


On Thu, Jan 2, 2014 at 7:21 PM, Steve Purcell <notifications@github.com>wrote:

> In lisp/ledger-hideshow.el:
>
> > +  (or (when (search-forward-regexp ledger--transaction-start-re nil t)
> > +        (forward-line -1)
> > +        (goto-char (line-end-position))
> > +        t)
> > +      (goto-char (point-max))))
> > +
> > +(eval-after-load 'hideshow
> > +  '(add-to-list 'hs-special-modes-alist
> > +                `(ledger-mode
> > +                  ,ledger--transaction-start-re
> > +                  nil
> > +                  nil
> > +                  ledger--hs-forward
> > +                  nil)))
> > +
> > +(add-hook 'ledger-mode-hook 'hs-minor-mode)
>
> I presume that this doesn't actually enable hideshow, but rather just
> tells it how to hide/show ledger transactions.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/ledger/ledger/pull/219/files#r8618686>
> .
>