php-mode icon indicating copy to clipboard operation
php-mode copied to clipboard

php-show-arglist for built-in PHP functions

Open drzraf opened this issue 11 years ago • 2 comments

This could be seen as a documentation issue : when using (php-show-arglist) on a PHP core function I'd expect to see it's prototype (what could be quicker than C-C C-F to browse www.php.net and often useful given the sometimes so strange order of PHP function's arguments).

But doing so bring up a "Visit tags table" prompt from what I deduce that the "php-completion-file" isn't used for (show-arg-file) since :

  1. this file is a shell-generated output which does not contains the PHP functions' arguments
  2. it's "not a valid tag file" (just plain-text) (php-show-arglist) does not seem to directly use "php-manual-path" neither.

Finally after looking at the code I went to think that (php-show-arglist) only applies to project-code for which a TAG file has been generated.

Thus my question is :

  • am I right when I think it's not currently possible or did I overlooked something ?
  • why no one has been interested in this up to now ?
  • has there been any attempt into converting the php-doc to etags parsable code in order to create a "built-in PHP TAG file" which could then be used by php-mode (php-show-arglist) ?

I don't know enough about etags to imagine and provide a PoF of the best/efficient way to do that (though I think it's feasible) neither I know if there is a huge performance penalty risk.

anyway, long-life php-mode !

drzraf avatar Feb 02 '14 23:02 drzraf

You may find that php-auto-yasnippets by @ejmr would address some of your desires here.

I've found that it largely solves the problem of remembering PHP's inconsistent argument ordering.

NateEag avatar Feb 03 '14 04:02 NateEag

https://github.com/emacs-php/php-mode/pull/551

drzraf avatar Jul 26 '19 16:07 drzraf