Search code examples
phpcphp-extension

What do the comments at the end php-src c files mean?


If you scroll to the end, there should be comments like these. What do they do, what do they mean?

/*
 * Local variables:
 * tab-width: 4
 * c-basic-offset: 4
 * indent-tabs-mode: t
 * End:
 */

I found a reference to GNU Emacs, but I am not familiar with it and a quick read didn't help much either. Is it a script that later generates emacs customizations from them?

https://github.com/php/php-src/blob/master/ext/reflection/php_reflection.h


Solution

  • These are Emacs File Variables. They tell the Emacs text editor to set various per-buffer options. In your example, it instructs it on the preferred indentation style when editing that program, so that it will indent each block by 4 columns.

    See Specifying File Variables in the Emacs manual for more details.