From: Bastien Guerry Date: Thu, 24 Jan 2013 12:46:49 +0000 (+0100) Subject: org-faq.org: Add "Can I get the visibility-cycling features in emacs-lisp-mode?" X-Git-Url: http://orgmode.org/w/?p=worg.git;a=commitdiff_plain;h=7dab319cb60aca3842bd84543eaa331bf8c1efe4 org-faq.org: Add "Can I get the visibility-cycling features in emacs-lisp-mode?" --- diff --git a/org-faq.org b/org-faq.org index f7e8516..6924e39 100644 --- a/org-faq.org +++ b/org-faq.org @@ -804,6 +804,21 @@ version of Org-mode you are using. For instructions on how to stay current with Org-mode, consult [[keeping-current-with-Org-mode-development][this FAQ]] or follow the instructions on [[http://orgmode.org][the official Org-mode site]]. +** Can I get the visibility-cycling features in emacs-lisp-mode? + +Yes. This snippet in your =.emacs= will bind =C-M-]= and =M-]= to global +and local cycling: + +#+BEGIN_SRC emacs-lisp +(global-set-key (kbd "C-M-]") (lambda () (interactive) (org-cycle t))) +(global-set-key (kbd "M-]") (lambda () + (interactive) + (ignore-errors + (end-of-defun) + (beginning-of-defun)) + (org-cycle))) +#+END_SRC + ** Can I get the visibility-cycling features in outline-mode and outline-minor-mode? :PROPERTIES: :CUSTOM_ID: use-visibility-cycling-in-outline-mode