diff options
| author | Simeon Simeonov | 2017-03-08 13:41:14 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2017-03-08 13:41:14 +0100 |
| commit | 380ef3e4b3907c5f4a203947f38bebe4c0498c4c (patch) | |
| tree | cd80beab87b337830fee71789086f7985be25c5c /.emacs.d/lisp/php-mode.el | |
| parent | 16cd879c8727fcd433fc9cb5575c23cc19905a34 (diff) | |
Upgrade mod-php and yasnippet
Diffstat (limited to '.emacs.d/lisp/php-mode.el')
| -rw-r--r-- | .emacs.d/lisp/php-mode.el | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/.emacs.d/lisp/php-mode.el b/.emacs.d/lisp/php-mode.el index cd35d7d..da5da0a 100644 --- a/.emacs.d/lisp/php-mode.el +++ b/.emacs.d/lisp/php-mode.el | |||
| @@ -257,14 +257,33 @@ can be used to match against definitions for that classlike." | |||
| 257 | "^\\s-*function\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1)) | 257 | "^\\s-*function\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1)) |
| 258 | "Imenu generic expression for PHP Mode. See `imenu-generic-expression'.") | 258 | "Imenu generic expression for PHP Mode. See `imenu-generic-expression'.") |
| 259 | 259 | ||
| 260 | (defcustom php-manual-url "http://www.php.net/manual/en/" | 260 | (defcustom php-site-url "http://php.net/" |
| 261 | "Default PHP.net site URL. | ||
| 262 | |||
| 263 | The URL to use open PHP manual and search word. | ||
| 264 | You can find a mirror site closer to you." | ||
| 265 | :type 'string | ||
| 266 | :link '(url-link :tag "List of Mirror Sites" "http://php.net/mirrors.php")) | ||
| 267 | |||
| 268 | (defcustom php-manual-url 'en | ||
| 261 | "URL at which to find PHP manual. | 269 | "URL at which to find PHP manual. |
| 262 | You can replace \"en\" with your ISO language code." | 270 | You can replace \"en\" with your ISO language code." |
| 263 | :type 'string) | 271 | :type '(choice (const :tag "English" 'en) |
| 272 | (const :tag "Brazilian Portuguese" 'pt_BR) | ||
| 273 | (const :tag "Chinese (Simplified)" 'zh) | ||
| 274 | (const :tag "French" 'fr) | ||
| 275 | (const :tag "German" 'de) | ||
| 276 | (const :tag "Japanese" 'ja) | ||
| 277 | (const :tag "Romanian" 'ro) | ||
| 278 | (const :tag "Russian" 'ru) | ||
| 279 | (const :tag "Spanish" 'es) | ||
| 280 | (const :tag "Turkish" 'tr) | ||
| 281 | (string :tag "PHP manual URL"))) | ||
| 264 | 282 | ||
| 265 | (defcustom php-search-url "http://www.php.net/" | 283 | (defcustom php-search-url nil |
| 266 | "URL at which to search for documentation on a word." | 284 | "URL at which to search for documentation on a word." |
| 267 | :type 'string) | 285 | :type '(choice (string :tag "URL to search PHP documentation") |
| 286 | (const :tag "Use `php-site-url' variable" nil))) | ||
| 268 | 287 | ||
| 269 | (defcustom php-completion-file "" | 288 | (defcustom php-completion-file "" |
| 270 | "Path to the file which contains the function names known to PHP." | 289 | "Path to the file which contains the function names known to PHP." |
| @@ -1309,12 +1328,12 @@ With a prefix argument, prompt (with completion) for a word to search for." | |||
| 1309 | t))) | 1328 | t))) |
| 1310 | 1329 | ||
| 1311 | (defsubst php-search-web-documentation (word) | 1330 | (defsubst php-search-web-documentation (word) |
| 1312 | (php-browse-documentation-url (concat php-search-url | 1331 | "Return URL to search PHP manual search by `WORD'." |
| 1313 | (replace-regexp-in-string "_" "-" (downcase word))))) | 1332 | (php-browse-documentation-url (concat (or php-search-url php-site-url) word))) |
| 1314 | 1333 | ||
| 1315 | ;; Define function documentation function | 1334 | ;; Define function documentation function |
| 1316 | (defun php-search-documentation (word) | 1335 | (defun php-search-documentation (word) |
| 1317 | "Search PHP documentation for the word at point. | 1336 | "Search PHP documentation for the `WORD' at point. |
| 1318 | 1337 | ||
| 1319 | If `php-manual-path' has a non-empty string value then the command | 1338 | If `php-manual-path' has a non-empty string value then the command |
| 1320 | will first try searching the local documentation. If the requested | 1339 | will first try searching the local documentation. If the requested |
| @@ -1335,7 +1354,9 @@ a completion list." | |||
| 1335 | (defun php-browse-manual () | 1354 | (defun php-browse-manual () |
| 1336 | "Bring up manual for PHP." | 1355 | "Bring up manual for PHP." |
| 1337 | (interactive) | 1356 | (interactive) |
| 1338 | (browse-url php-manual-url)) | 1357 | (browse-url (if (stringp php-manual-url) |
| 1358 | php-manual-url | ||
| 1359 | (format "%smanual/%s/" php-site-url php-manual-url)))) | ||
| 1339 | 1360 | ||
| 1340 | (defconst php-phpdoc-type-keywords | 1361 | (defconst php-phpdoc-type-keywords |
| 1341 | (list "string" "integer" "int" "boolean" "bool" "float" | 1362 | (list "string" "integer" "int" "boolean" "bool" "float" |
