I don't see the problem in facts: anyway inserting a final PHP closing tag is not required[1] and some (including me) recommends not to insert it[2], for the reason you mention − unwanted headers.
I know and agree, however this recommendation seems quite recent : a lot of "old" PHP source code, as well as widely used PHP projects based on quite "old" code (e.g. phpMyAdmin, TestLink...), still use that final closing tag. Then for example, just modifying a PHP config file with Geany's default settings, can break things up. WordPress follows the recommendation, but users get confused [1]. As well, the debate about closing tag is still opened [2]... Therefore, I think that despite the recommendations, the problem will remain for a long time.
Anyway, depending on the file type, an automatic new line is sometimes useful, sometimes painful. So the suggested behavior shouldn't be useless, since it would avoid headache to users.
Regards, Maxime
[1] http://wordpress.org/support/topic/287505 [2] http://choosetheforce.blogspot.com/2008/05/should-you-close-that-php-tag.htm...
Colomban Wendling a écrit :
Hi,
Maxime Pacary a écrit :
I still don't see what's the problem with simply deactiviting the feature if it causes troubles for you.
The problem is the *default value*. Each time a PHP developer installs Geany, he must keep in mind to disable this feature to avoid weird problems when using the *header()* function (frequent).
I don't see the problem in facts: anyway inserting a final PHP closing tag is not required[1] and some (including me) recommends not to insert it[2], for the reason you mention − unwanted headers.
But there may be languages where having a newline cause real trouble, I don't know. Anyway I think having an ending newline is better in most cases (for example, some UNIX commands works better with it). Then, I think adding such an option in the filetypes is somewhat overkill, but of course if anybody adds it − as far as C, Python and Vala keeps the same behaviour ;) − I wouldn't complain.
Regards, Colomban
[1] http://fr.php.net/manual/en/language.basic-syntax.instruction-separation.php [2] http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html for example
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel