Re: Meaning of // {{{

From: Date: Sun, 22 Jul 2001 15:53:49 +0000
Subject: Re: Meaning of // {{{
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-977@lists.php.net to get a copy of this message
On Sun, Jul 22, 2001 at 05:36:38PM +0200, Tomas V.V.Cox wrote: | > > | > > > What do the "// {{{ <functionname>" in most of the PEAR | > > > files stand for? | > > | > > I guess it's Xemacs stuff for quick access to functions (you know | > > Ctrl+Meta+Shift+AltGr+& will move the cursor to the next function ;) | > > | > :)) *grin* nope, I would still be happy then to know something like that | > exists | | Oops... I'm sure I have read somewhere that the {{{ ... ok, wrong :) in a way, it's half right. first: I don't think I know the real rationale behind having this in PEAR, but "// {{{ <function name>" can be used for easier source navigation in Emacs: [this is my personal setup. Emacs purists will say I'm doing needless and inconsistent keybinding. :) ] (global-set-key (kbd "M-<left>") 'fold-hide) (global-set-key (kbd "M-<right>") 'fold-show) (global-set-key (kbd "M-C-h") 'fold-whole-buffer) (add-hook 'c++-mode-hook 'folding-mode) ;; Folding setup, shamelessly stolen from borud (require 'folding (expand-file-name "~/elisp/folding.el")) (setq fold-mode-marks-alist '((c++-mode "// {{{ " "// }}}") (perl-mode "# {{{ " "# }}}") ...)) the file folding.el defines folding mode. I use version 1.6, by Jamie Lokier. oh, and setting the variable paragraph-start to a suitable regexp will allow you to use the forward-/backward-paragraph functions (by default bound to C-<up>/-<down> and M-{/M-}) to move quickly to functions. tomorrow I'll tell you all about my recent dabbrev-expand revelation. :) -- Øyvind Møll oyvindmo@initio.no

« previous php.pear.dev (#977) next »