-
Notifications
You must be signed in to change notification settings - Fork 0
/
php-mode.elc
181 lines (169 loc) · 42 KB
/
php-mode.elc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
;ELC
;;; Compiled by shant@ultraio on Sat Sep 27 19:36:33 2014
;;; from file /home/shant/.emacs.d/php-mode.el
;;; in Emacs version 24.3.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#@26 PHP Mode version number.
(defconst php-mode-version-number "1.11" (#$ . 502))
#@22 PHP Mode build date.
(defconst php-mode-modified "2013-07-15" (#$ . 586))
(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\306\307!\204 \310\307\311\"\210\312\313\314\315\316\317\320\321&\210\322\323\324\325\326\327\320\313&\210\322\330\331\332\326\333\320\313&\210\322\334\335\336\326\333\320\313&\210\322\337\340\341\326\342\343\344\320\313& \210\322\345\314\346\326\342\343\347\320\313& \210\322\350\340\351\326\342\320\313&\210\322\352\353\354\326\355\320\313&\207" [require font-lock cc-mode cc-langs custom flymake fboundp cl-flet defalias flet custom-declare-group php nil "Major mode `php-mode' for editing PHP code." :prefix "php-" :group languages custom-declare-variable php-executable "/usr/bin/php" "The location of the PHP executable." :type string php-default-face 'default "Default face in `php-mode' buffers." face php-function-call-face 'default "Default face for function calls in `php-mode' buffers." php-speedbar-config t "When set to true automatically configures Speedbar to observe PHP files.\nIgnores php-file patterns option; fixed to expression \"\\.\\(inc\\|php[s345]?\\)\"" boolean :set #[(sym val) "\302 \"\210 \205 \303\304!\205 \305\306!\207" [sym val set-default boundp speedbar speedbar-add-supported-extension "\\.\\(inc\\|php[s345]?\\|phtml\\)"] 3] php-mode-speedbar-open "Normally `php-mode' starts with the speedbar closed.\nTurning this on will open it whenever `php-mode' is loaded." #[(sym val) "\302 \"\210 \205\f \303\304!\207" [sym val set-default speedbar 1] 3] php-template-compatibility "Should detect presence of html tags." php-extra-constants 'nil "A list of additional strings to treat as PHP constants." list] 10)
#@452 Make a regular expression for methods with the given VISIBILITY.
VISIBILITY must be a string that names the visibility for a PHP
method, e.g. 'public'. The parameter VISIBILITY can itself also
be a regular expression.
The regular expression this function returns will check for other
keywords that can appear in method signatures, e.g. 'final' and
'static'. The regular expression will have one capture group
which will be the name of the method.
(defalias 'php-create-regexp-for-method #[(visibility) "\301\302\303\304\260\207" [visibility "^\\s-*\\(?:\\(?:abstract\\|final\\)\\s-+\\)?" "\\s-+\\(?:static\\s-+\\)?" "function\\s-+" "\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*("] 5 (#$ . 2299)])
#@187 Accepts a `type' of a 'classlike' object as a string, such as
'class' or 'interface', and returns a regexp as a string which
can be used to match against definitions for that classlike.
(defalias 'php-create-regexp-for-classlike #[(type) "\301\302Q\207" [type "^\\s-*\\(?:\\(?:abstract\\|final\\)\\s-+\\)?" "\\s-+\\(\\(?:\\sw\\|\\\\\\|\\s_\\)+\\)"] 3 (#$ . 2996)])
#@72 Imenu generic expression for PHP Mode. See `imenu-generic-expression'.
(defvar php-imenu-generic-expression (byte-code "\300\301\302!\303BB\304\301\305!\306BB\307\301\310!\311BB\312\301\313!\314BB\315\316\317!\320BB\321\316\322!\323BB\324\316\325!\326BB\327\316\330!\331BB\332BBBBBBBB\207" ["Namespaces" php-create-regexp-for-classlike "namespace" (1) "Classes" "class" (1) "Interfaces" "interface" (1) "Traits" "trait" (1) "All Methods" php-create-regexp-for-method "\\(?:\\sw\\|\\s_\\)+" (1) "Private Methods" "private" (1) "Protected Methods" "protected" (1) "Public Methods" "public" (1) (("Anonymous Functions" "\\<\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*=\\s-*function\\s-*(" 1) ("Named Functions" "^\\s-*function\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1))] 10) (#$ . 3368))
(byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\307&\210\300\313\314\315\304\305\306\307&\210\300\316\314\317\304\305\306\307&\210\320\321\322\323B\"\210\300\324\325\326\304\327\306\307&\210\300\330\325\331\304\327\306\307&\210\300\332\325\333\304\327\306\307&\210\300\334\325\335\304\327\306\307&\210\300\336\325\337\304\327\306\307&\210\300\340\325\341\304\342\306\307&\210\300\343\344\345\304\346\306\307&\210\300\347\350\351\304\352\306\307\353\354\355\356&\207" [custom-declare-variable php-manual-url "http://www.php.net/manual/en/" "URL at which to find PHP manual.\nYou can replace \"en\" with your ISO language code." :type string :group php php-search-url "http://www.php.net/" "URL at which to search for documentation on a word." php-completion-file "" "Path to the file which contains the function names known to PHP." php-manual-path "Path to the directory which contains the PHP manual." add-to-list interpreter-mode-alist "php" php-mode php-mode-hook nil "List of functions to be executed on entry to `php-mode'." hook php-mode-pear-hook "Hook called when a PHP PEAR file is opened with `php-mode'." php-mode-drupal-hook "Hook called when a Drupal file is opened with `php-mode'." php-mode-wordpress-hook "Hook called when a WordPress file is opened with `php-mode'." php-mode-symfony2-hook "Hook called when a Symfony2 file is opened with `php-mode'." php-mode-force-pear "Normally PEAR coding rules are enforced only when the filename contains \"PEAR.\"\nTurning this on will force PEAR rules on all PHP files." boolean php-mode-warn-if-mumamo-off t "Warn once per buffer if you try to indent a buffer without\nmumamo-mode turned on. Detects if there are any HTML tags in the\nbuffer before warning, but this is is not very smart; e.g. if you\nhave any tags inside a PHP string, it will be fooled." (choice (const :tag "Warg" t) (const "Don't warn" nil)) php-mode-coding-style 'pear "Select default coding style to use with php-mode.\nThis variable can take one of the following symbol values:\n\n`PEAR' - use coding styles preferred for PEAR code and modules.\n\n`Drupal' - use coding styles preferred for working with Drupal projects.\n\n`WordPress' - use coding styles preferred for working with WordPress projects.\n\n`Symfony2' - use coding styles preferred for working with Symfony2 projects." (choice (const :tag "PEAR" pear) (const :tag "Drupal" drupal) (const :tag "WordPress" wordpress) (const :tag "Symfony2" symfony2)) :set php-mode-custom-coding-style-set :initialize custom-initialize-default] 12)
(defalias 'php-mode-custom-coding-style-set #[(sym value) "\303=\2052 \nL\210\304 \n\"\210\n\305=\203 \306 \207\n\307=\203! \310 \207\n\311=\203* \312 \207\n\313=\2052 \314 \207" [major-mode sym value php-mode set-default pear php-enable-pear-coding-style drupal php-enable-drupal-coding-style wordpress php-enable-wordpress-coding-style symfony2 php-enable-symfony2-coding-style] 3])
(c-add-style "pear" '((c-basic-offset . 4) (c-offsets-alist (block-open . -) (block-close . 0) (topmost-intro-cont . c-lineup-cascaded-calls) (brace-list-intro . +) (brace-list-entry . c-lineup-cascaded-calls) (arglist-close . php-lineup-arglist-close) (arglist-intro . php-lineup-arglist-intro) (statement-cont first c-lineup-cascaded-calls +))))
#@80 Sets up php-mode to use the coding styles preferred for PEAR
code and modules.
(defalias 'php-enable-pear-coding-style #[nil "\302\303\304\305!\207" [tab-width indent-tabs-mode 4 nil c-set-style "pear"] 2 (#$ . 7453) nil])
(c-add-style "drupal" '((c-basic-offset . 2) (c-offsets-alist (case-label . +) (topmost-intro-cont . c-lineup-cascaded-calls) (brace-list-intro . +) (brace-list-entry . c-lineup-cascaded-calls) (arglist-close . php-lineup-arglist-close) (arglist-intro . php-lineup-arglist-intro) (arglist-cont-nonempty . c-lineup-math) (statement-cont first c-lineup-cascaded-calls +))))
#@79 Makes php-mode use coding styles that are preferable for
working with Drupal.
(defalias 'php-enable-drupal-coding-style #[nil "\304\305\306\307\310\311\312\"\210\313\314!\207" [tab-width indent-tabs-mode fill-column show-trailing-whitespace 2 nil 78 t add-hook before-save-hook delete-trailing-whitespace c-set-style "drupal"] 3 (#$ . 8056) nil])
(c-add-style "wordpress" '((c-basic-offset . 4) (c-offsets-alist (arglist-cont . 0) (arglist-intro . php-lineup-arglist-intro) (arglist-close . php-lineup-arglist-close) (topmost-intro-cont . c-lineup-cascaded-calls) (brace-list-intro . +) (brace-list-entry . c-lineup-cascaded-calls) (case-label . 2) (arglist-close . 0) (defun-close . 0) (defun-block-intro . +) (statement-cont first c-lineup-cascaded-calls +))))
#@82 Makes php-mode use coding styles that are preferable for
working with Wordpress.
(defalias 'php-enable-wordpress-coding-style #[nil "\304\305\306\304\307\310!\207" [indent-tabs-mode fill-column tab-width c-indent-comments-syntactically-p t 78 4 c-set-style "wordpress"] 2 (#$ . 8829) nil])
(c-add-style "symfony2" '((c-basic-offset . 4) (c-offsets-alist (arglist-cont . php-lineup-arglist) (arglist-intro . php-lineup-arglist-intro) (arglist-close . php-lineup-arglist-close) (topmost-intro-cont . c-lineup-cascaded-calls) (brace-list-intro . +) (brace-list-entry . c-lineup-cascaded-calls) (case-label . 4) (statement-case-intro . 4) (defun-close . 0) (defun-block-intro . +) (statement-cont . php-lineup-hanging-semicolon))))
#@81 Makes php-mode use coding styles that are preferable for
working with Symfony2.
(defalias 'php-enable-symfony2-coding-style #[nil "\304\305\306\307\310\311!\207" [indent-tabs-mode fill-column tab-width c-indent-comments-syntactically-p nil 78 4 t c-set-style "symfony2"] 2 (#$ . 9567) nil])
#@52 Display string describing the version of PHP mode.
(defalias 'php-mode-version #[nil "\302\303 #\207" [php-mode-version-number php-mode-modified message "PHP mode %s of %s"] 4 (#$ . 9868) nil])
#@40 Regular expression for a PHP function.
(defconst php-beginning-of-defun-regexp "^\\s-*\\(?:\\(?:abstract\\|final\\|private\\|protected\\|public\\|static\\)\\s-+\\)*function\\s-+&?\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" (#$ . 10069))
#@118 Move to the beginning of the ARGth PHP function from point.
Implements PHP version of `beginning-of-defun-function'.
(defalias 'php-beginning-of-defun #[(&optional arg) "\206 \303\211\304V\203 \305 \306\307#\210S\211\202 \304W\205B \303\210`\310\303!\210\311\312!\210\303y\210\n`=\203; \313 \306\307#\210T)\202 )\207" [arg php-beginning-of-defun-regexp opoint 1 0 re-search-backward nil noerror beginning-of-defun forward-list 2 re-search-forward] 5 (#$ . 10303) "p"])
#@133 Move the end of the ARGth PHP function from point.
Implements PHP befsion of `end-of-defun-function'
See `php-beginning-of-defun'.
(defalias 'php-end-of-defun #[(&optional arg) "\301\206 \302[!\207" [arg php-beginning-of-defun 1] 2 (#$ . 10792) "p"])
(defvar php-warned-bad-indent nil)
(defalias 'php-check-html-for-indentation #[nil "\306`\307 b\210\310\302!\203 \n\204* \311 \312\216\313 \314 \315#\206&