diff options
author | Tom Willemsen | 2011-08-26 12:29:11 +0200 |
---|---|---|
committer | Tom Willemsen | 2011-08-26 12:29:11 +0200 |
commit | 2532b960234e22ccec52e15cd25bcb561a1dc196 (patch) | |
tree | 4eb7d4dc2e0767042f82c38d9613294dc737ef30 /.emacs.d/init.el | |
parent | a2b8064776a2678abd856d2bad5c11a8afecd25b (diff) | |
download | dotfiles-2532b960234e22ccec52e15cd25bcb561a1dc196.tar.gz dotfiles-2532b960234e22ccec52e15cd25bcb561a1dc196.zip |
EMACS: add outline function for PHP
`.emacs.d/init.el'
- Created function `oni-php-show-outline' which calls `occur'
to search for PHP outlines (function, class, etc.
definitions).
- Bind <F7> to the function `oni-php-show-outline' in
`php-mode'.
Diffstat (limited to '.emacs.d/init.el')
-rw-r--r-- | .emacs.d/init.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index a58aa80..528e650 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -120,6 +120,10 @@ (djcb-gtags-create-or-update))) ;;; PHP +(defun oni-php-show-outline () + (interactive) + (occur "\\(function .*(\\|\\(public\\|private\\|protected\\)\\( static\\)? \\$\\|class \\sw\\)")) + (autoload 'php-mode "php-mode" "Major mode for PHP" t) (setq-default php-mode-warn-if-mumamo-off nil) ; don't warn me about this (setq php-mode-force-pear t) @@ -128,7 +132,8 @@ (lambda () (c-set-offset 'arglist-intro '+) (c-set-offset 'arglist-close '0) - (local-set-key [f6] 'comment-line))) + (local-set-key [f6] 'comment-line) + (local-set-key [f7] 'oni-php-show-outline))) (add-php-keywords) ;;; bidi |