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'.
This commit is contained in:
parent
a2b8064776
commit
2532b96023
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue