Skip to content

Commit

Permalink
Remove local variables
Browse files Browse the repository at this point in the history
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
  • Loading branch information
petk committed Feb 3, 2019
1 parent 020ca5b commit 92ac598
Show file tree
Hide file tree
Showing 888 changed files with 111 additions and 7,004 deletions.
2 changes: 0 additions & 2 deletions README.STREAMS
Original file line number Diff line number Diff line change
Expand Up @@ -374,5 +374,3 @@ the example above, you need to use mysql_free_result on the rowset, close the
connection and then use pefree to dispose of the struct you allocated.
You may read the stream->persistent field to determine if your struct was
allocated in persistent mode or not.

vim:tw=78:et
2 changes: 0 additions & 2 deletions README.WIN32-BUILD-SYSTEM
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
The Win32 Build System.

See https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2

vim:tw=78:sw=1:ts=1:et
9 changes: 0 additions & 9 deletions TSRM/TSRM.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,12 +794,3 @@ TSRM_API const char *tsrm_api_name(void)
}/*}}}*/

#endif /* ZTS */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
9 changes: 0 additions & 9 deletions TSRM/TSRM.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,3 @@ TSRM_API const char *tsrm_api_name(void);
#endif /* ZTS */

#endif /* TSRM_H */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
9 changes: 0 additions & 9 deletions TSRM/tsrm_config.w32.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,3 @@
#include <crtdbg.h>

#endif

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
9 changes: 0 additions & 9 deletions TSRM/tsrm_config_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,3 @@ char *alloca ();
#endif

#endif /* TSRM_CONFIG_COMMON_H */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
9 changes: 0 additions & 9 deletions TSRM/tsrm_strtok_r.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,3 @@ main()
}

#endif

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
9 changes: 0 additions & 9 deletions TSRM/tsrm_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,12 +820,3 @@ TSRM_API int win32_utime(const char *filename, struct utimbuf *buf) /* {{{ */
/* }}} */
#endif
#endif

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
9 changes: 0 additions & 9 deletions TSRM/tsrm_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,3 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags);
TSRM_API int shmdt(const void *shmaddr);
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
#endif

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1740,13 +1740,3 @@ ZEND_API void zend_map_ptr_extend(size_t last)
CG(map_ptr_last) = last;
}
}

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,3 @@ ZEND_API void zend_restore_error_handling(zend_error_handling *saved);
#include "zend_operators.h"

#endif /* ZEND_H */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -4407,13 +4407,3 @@ ZEND_API zend_bool zend_is_countable(zval *countable) /* {{{ */
}
}
/* }}} */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
11 changes: 0 additions & 11 deletions Zend/zend_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -1579,14 +1579,3 @@ static zend_always_inline void zend_parse_arg_zval_deref(zval *arg, zval **dest,
END_EXTERN_C()

#endif /* ZEND_API_H */


/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2948,13 +2948,3 @@ ZEND_API void * __zend_realloc(void *p, size_t len)
}
zend_out_of_memory();
}

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,3 @@ static void apc_init_heap(void)
END_EXTERN_C()

#endif

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_alloc_sizes.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,3 @@
_(29, 3072, 4, 3, x, y)

#endif /* ZEND_ALLOC_SIZES_H */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_arena.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,3 @@ static zend_always_inline void zend_arena_release(zend_arena **arena_ptr, void *
}

#endif /* _ZEND_ARENA_H_ */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -2044,13 +2044,3 @@ ZEND_API ZEND_COLD zend_string *zend_ast_export(const char *prefix, zend_ast *as
smart_str_0(&str);
return str.s;
}

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,3 @@ static zend_always_inline zend_ast *zend_ast_list_rtrim(zend_ast *ast) {
return ast;
}
#endif

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_bitset.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,3 @@ static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) {
}

#endif /* _ZEND_BITSET_H_ */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_build.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,3 @@
#define ZEND_BUILD_EXTRA

#endif

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_builtin_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -2731,13 +2731,3 @@ ZEND_FUNCTION(get_extension_funcs)
}
}
/* }}} */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_builtin_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,3 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
END_EXTERN_C()

#endif /* ZEND_BUILTIN_FUNCTIONS_H */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_closures.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,13 +763,3 @@ void zend_closure_bind_var_ex(zval *closure_zv, uint32_t offset, zval *val) /* {
ZVAL_COPY_VALUE(var, val);
}
/* }}} */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_closures.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,3 @@ ZEND_API zval* zend_get_closure_this_ptr(zval *obj);
END_EXTERN_C()

#endif

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -8700,13 +8700,3 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
*ast_ptr = zend_ast_create_zval(&result);
}
/* }}} */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -1074,13 +1074,3 @@ END_EXTERN_C()
ZEND_API zend_bool zend_binary_op_produces_numeric_string_error(uint32_t opcode, zval *op1, zval *op2);

#endif /* ZEND_COMPILE_H */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_config.w32.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,3 @@ extern "C++" {
#define ZEND_DLIMPORT __declspec(dllimport)

#endif /* ZEND_CONFIG_W32_H */

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
11 changes: 0 additions & 11 deletions Zend/zend_constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,14 +530,3 @@ ZEND_API int zend_register_constant(zend_constant *c)
}
return ret;
}


/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
10 changes: 0 additions & 10 deletions Zend/zend_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,3 @@ END_EXTERN_C()
#define ZEND_CONSTANT_DTOR free_zend_constant

#endif

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
Loading

0 comments on commit 92ac598

Please sign in to comment.