[Top][All Lists]

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

Re: program outlining

From: Rusi
Subject: Re: program outlining
Date: Mon, 11 Jul 2016 07:34:22 -0700 (PDT)
User-agent: G2/1.0

On Monday, July 11, 2016 at 7:42:10 PM UTC+5:30, Rusi wrote:
> On Monday, July 11, 2016 at 7:18:18 PM UTC+5:30, Kaushal Modi wrote:
> > Outshine works fine for me, along with the TAB and s-TAB (<backtab>)
> > behavior, and I use it everyday in emacs-lisp-mode and other modes like
> > shell-script-mode and verilog-mode.
> > 
> > Here's my outshine setup:
> >
> > 
> > If you ignore the 'modi/outline-toc' function definition in the above link,
> > there's very little configuration I need to do for outshine. The only
> > important config is to set the outline-minor-mode-prefix and adding
> > outshine-hook-function to outline-minor-mode-hook.
> Looks impressive
> How does it work?
> Which modes?
> I can load this file alright
> But thereafter outshine is so undocumented that I dont know what next
> On a different note does outshine understand programming language syntax?
> Or does it need addition of org-style 'cookies'?
> Because if latter its not much use for arbitrary codebases
> (which hideshow seems to handle at least somewhat)

I guess the closest to what is required is org-hideshow.
On first trial seems to work though a bit bitrotten

Here's an extract showing its a bit out of date

(defmacro hs-org/define-keys ()
     ,@(mapcar (lambda (key) `(hs-org/define-key ,key hs-org/hideshow)) 
     ,@(mapcar (lambda (key) `(hs-org/define-key ,key hs-org/hideshow-all)) 

;; No closures is killing me!
(defmacro hs-org/define-key (key function)
  `(define-key hs-org/minor-mode-map ,key (lambda () (interactive)
                                                  (,function ,key))))

I guess the “no closures” gripe is not true after lexical binding??

reply via email to

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