help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: code folding with <backtab> ?


From: Yagnesh Raghava Yakkala
Subject: Re: code folding with <backtab> ?
Date: Sun, 08 Apr 2012 18:37:57 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux)

Hello Bastien,

Bastien <address@hidden> writes:

> Yagnesh Raghava Yakkala <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)

Wow this is great, working nice too (except when point is at the end of
buffer). I didn't think, Org itself can be used here. I wonder why its not
working with other programming modes, say perl and python.


Thanks.

-- 
YYR




reply via email to

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