Skip to content

Commit 92ac598

Browse files
committed
Remove local variables
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.
1 parent 020ca5b commit 92ac598

File tree

888 files changed

+111
-7004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

888 files changed

+111
-7004
lines changed

README.STREAMS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,5 +374,3 @@ the example above, you need to use mysql_free_result on the rowset, close the
374374
connection and then use pefree to dispose of the struct you allocated.
375375
You may read the stream->persistent field to determine if your struct was
376376
allocated in persistent mode or not.
377-
378-
vim:tw=78:et

README.WIN32-BUILD-SYSTEM

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
The Win32 Build System.
22

33
See https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2
4-
5-
vim:tw=78:sw=1:ts=1:et

TSRM/TSRM.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -794,12 +794,3 @@ TSRM_API const char *tsrm_api_name(void)
794794
}/*}}}*/
795795

796796
#endif /* ZTS */
797-
798-
/*
799-
* Local variables:
800-
* tab-width: 4
801-
* c-basic-offset: 4
802-
* End:
803-
* vim600: sw=4 ts=4 fdm=marker
804-
* vim<600: sw=4 ts=4
805-
*/

TSRM/TSRM.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,3 @@ TSRM_API const char *tsrm_api_name(void);
210210
#endif /* ZTS */
211211

212212
#endif /* TSRM_H */
213-
214-
/*
215-
* Local variables:
216-
* tab-width: 4
217-
* c-basic-offset: 4
218-
* End:
219-
* vim600: sw=4 ts=4 fdm=marker
220-
* vim<600: sw=4 ts=4
221-
*/

TSRM/tsrm_config.w32.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,3 @@
1212
#include <crtdbg.h>
1313

1414
#endif
15-
16-
/*
17-
* Local variables:
18-
* tab-width: 4
19-
* c-basic-offset: 4
20-
* End:
21-
* vim600: sw=4 ts=4 fdm=marker
22-
* vim<600: sw=4 ts=4
23-
*/

TSRM/tsrm_config_common.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,3 @@ char *alloca ();
6969
#endif
7070

7171
#endif /* TSRM_CONFIG_COMMON_H */
72-
73-
/*
74-
* Local variables:
75-
* tab-width: 4
76-
* c-basic-offset: 4
77-
* End:
78-
* vim600: sw=4 ts=4 fdm=marker
79-
* vim<600: sw=4 ts=4
80-
*/

TSRM/tsrm_strtok_r.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,3 @@ main()
6161
}
6262

6363
#endif
64-
65-
/*
66-
* Local variables:
67-
* tab-width: 4
68-
* c-basic-offset: 4
69-
* End:
70-
* vim600: sw=4 ts=4 fdm=marker
71-
* vim<600: sw=4 ts=4
72-
*/

TSRM/tsrm_win32.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -820,12 +820,3 @@ TSRM_API int win32_utime(const char *filename, struct utimbuf *buf) /* {{{ */
820820
/* }}} */
821821
#endif
822822
#endif
823-
824-
/*
825-
* Local variables:
826-
* tab-width: 4
827-
* c-basic-offset: 4
828-
* End:
829-
* vim600: sw=4 ts=4 fdm=marker
830-
* vim<600: sw=4 ts=4
831-
*/

TSRM/tsrm_win32.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,3 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags);
109109
TSRM_API int shmdt(const void *shmaddr);
110110
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
111111
#endif
112-
113-
/*
114-
* Local variables:
115-
* tab-width: 4
116-
* c-basic-offset: 4
117-
* End:
118-
* vim600: sw=4 ts=4 fdm=marker
119-
* vim<600: sw=4 ts=4
120-
*/

Zend/zend.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,13 +1740,3 @@ ZEND_API void zend_map_ptr_extend(size_t last)
17401740
CG(map_ptr_last) = last;
17411741
}
17421742
}
1743-
1744-
/*
1745-
* Local variables:
1746-
* tab-width: 4
1747-
* c-basic-offset: 4
1748-
* indent-tabs-mode: t
1749-
* End:
1750-
* vim600: sw=4 ts=4 fdm=marker
1751-
* vim<600: sw=4 ts=4
1752-
*/

0 commit comments

Comments
 (0)