make backtab key folding resp. cycling

Bug #977121 reported by Andreas Roehler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

Am 07.04.2012 10:07, schrieb Yagnesh Raghava Yakkala:
>
> Hello all,
>
> Just like org does, folding (or cycling) with its outlines by pressing
> backtab(shift+<tab>), I would want every programming language buffer to show
> such a /outline/ of the program(buffer) to get a overview of the program I am
> working on. I know this depends on the major mode of the current buffer and
> combination of suitable minor modes namely outline-minor-mode or
> hs-minor-mode. (or may be with CEDET with its semantic parsing)
>
>
> To begin with elisp, can anybody tell me how to make backtab to show the
> outline of the buffer at least for two levels. I mean first press would show
> me buffer folded upto top level comments, defuns, defcustoms and defvars
> and the second press would show me entire buffer.
>
>
> I hope my question is clear.
>
> Thanks.
> --
> YYR
>
>
>

Am 07.04.2012 11:18, schrieb Bastien:
> Yagnesh Raghava Yakkala<email address hidden> writes:
>
>> To begin with elisp, can anybody tell me how to make backtab to show the
>> outline of the buffer at least for two levels. I mean first press would show
>> me buffer folded upto top level comments, defuns, defcustoms and defvars
>> and the second press would show me entire buffer.
>
> Add a hook to use `orgstruct-mode' in emacs-lisp buffers:
>
> (add-hook 'emacs-lisp-mode-hook 'orgstruct-mode)
>
> Define a new `org-cycle-global' command:
>
> (defun org-cycle-global () (interactive) (org-cycle t))
>
> Set this keybinding:
>
> (global-set-key (kbd "<backtab>") 'org-cycle-global)
>
> HTH,
>

Changed in python-mode:
importance: Undecided → Medium
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.1.0
Changed in python-mode:
status: New → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.