Dette er php-extras.info, produceret med makeinfo version 4.8 ud fra
stdin.


File: php-extras.info,  Node: Top,  Up: (dir)

Top
***

* Menu:

* PHP Extras::


File: php-extras.info,  Node: PHP Extras,  Prev: Top,  Up: Top

1 PHP Extras
************

A small collection of extra features for Emacs `php-mode'.

   Currently includes:

   * `php-extras-insert-previous-variable'

   * `php-extras-eldoc-documentation-function'

   * Auto complete source for PHP functions based on
     `php-extras-eldoc-documentation-function'

   * Company completion back-end for PHP functions based on
     `php-extras-eldoc-documentation-function'

* Menu:

* php-extras-insert-previous-variable::
* php-extras-eldoc-documentation-function::
* Auto complete source for PHP functions based::
* Company completion back-end for PHP functions based::
* Installation::
* Development of PHP Extras::


File: php-extras.info,  Node: php-extras-insert-previous-variable,  Next: php-extras-eldoc-documentation-function,  Up: PHP Extras

1.1 `php-extras-insert-previous-variable'
=========================================

When variable names get too long or you have to juggle a lot of nested
arrays it gets cumbersome to repeat the same variables over and over
again while programming.

   In example you have the code below and want to debug what value you
actually parsed to `some_function()'. You have point at `^' and now all
you have to write is repeat the variable...

some_function($my_array['some_level'][0]['another_level'][7]);
print_r(^);

   Enter `php-extras' and you just hit C-c C-$ and it will insert the
previous variable (including array indexes).

   If you prefix the command (i.e. C-u 3 C-c C-$) it will search back 3
variables and with negative prefix arguments it will search forward.


File: php-extras.info,  Node: php-extras-eldoc-documentation-function,  Next: Auto complete source for PHP functions based,  Prev: php-extras-insert-previous-variable,  Up: PHP Extras

1.2 `php-extras-eldoc-documentation-function'
=============================================

`eldoc-mode' is a nice minor mode that ships with Emacs. It will
display a function tip in the mini buffer showing the function and its
arguments for the function at point. That is if you provide a function
to look up the function definition.

   `php-extras' provides such a function for looking up all the core
PHP functions.

   The function `php-extras-generate-eldoc' will download the PHP
function list (http://doc.php.net/downloads/json/php_manual_en.json)
and extract the function definitions (slow) and store them in a hash
table on disk for you.

   If you install `php-extras' as an ELPA package from Marmalade
(http://marmalade-repo.org/packages/php-extras) the hash table is
already generated for you.


File: php-extras.info,  Node: Auto complete source for PHP functions based,  Next: Company completion back-end for PHP functions based,  Prev: php-extras-eldoc-documentation-function,  Up: PHP Extras

1.3 Auto complete source for PHP functions based
================================================

The PHP functions extracted for
`php-extras-eldoc-documentation-function' is also setup as a source for
auto-complete (http://cx4a.org/software/auto-complete).

   auto-complete (http://cx4a.org/software/auto-complete) already comes
with a dictionary of PHP functions and will auto complete on them using
the `ac-source-dictionary'.

   The source we provide with `php-extras' will hopefully be more up to
date.


File: php-extras.info,  Node: Company completion back-end for PHP functions based,  Next: Installation,  Prev: Auto complete source for PHP functions based,  Up: PHP Extras

1.4 Company completion back-end for PHP functions based
=======================================================

Users of company-mode (http://company-mode.github.io/) will also get
in-buffer completion based on the extracted PHP functions.


File: php-extras.info,  Node: Installation,  Next: Development of PHP Extras,  Prev: Company completion back-end for PHP functions based,  Up: PHP Extras

1.5 Installation
================

The easiest way to install `php-extras' is probably to install it via
the ELPA archive at Marmalade
(http://marmalade-repo.org/packages/php-extras).

   ELPA (package.el) is part of Emacs 24. For Emacs 23 see Marmalade
(http://marmalade-repo.org) for installation instructions.

   The version number of the ELPA package will have the date appended
when the package was build and hence the date the documentation got
extracted from php.net (http://php.net).

* Menu:

* Manual installation::


File: php-extras.info,  Node: Manual installation,  Up: Installation

1.5.1 Manual installation
-------------------------

I really recommend that you install this package via ELPA as described
above.

   If you insist on installing it manually try to follow this recipe:

   * Place the folder with the files somewhere on your disk.

   * Add this to your `.emacs' / `.emacs.d/init.el':



(add-to-list 'load-path "/somewhere/on/your/disk/php-extras")
(eval-after-load 'php-mode
  (require 'php-extras))

   * Either restart your Emacs or evaluate the `add-to-list' expression.

   * Generate the hash table containing the PHP functions:


   M-x load-library RET php-extras-gen-eldoc RET

   M-x php-extras-generate-eldoc RET


File: php-extras.info,  Node: Development of PHP Extras,  Prev: Installation,  Up: PHP Extras

1.6 Development of PHP Extras
=============================

PHP Extras is developed at GitHub
(https://github.com/arnested/php-extras). Feature requests, ideas, bug
reports, and pull request are more than welcome!



Tag Table:
Node: Top77
Node: PHP Extras160
Node: php-extras-insert-previous-variable884
Node: php-extras-eldoc-documentation-function1791
Node: Auto complete source for PHP functions based2787
Node: Company completion back-end for PHP functions based3502
Node: Installation3920
Node: Manual installation4605
Node: Development of PHP Extras5336

End Tag Table
