|
80 | 80 | (require 'font-lock) |
81 | 81 | (require 'add-log) |
82 | 82 | (require 'custom) |
83 | | -(require 'flymake) |
84 | 83 | (require 'etags) |
85 | 84 | (require 'speedbar) |
86 | 85 | (require 'imenu) |
@@ -1491,34 +1490,12 @@ a completion list." |
1491 | 1490 | (defvar php-font-lock-keywords php-font-lock-keywords-3 |
1492 | 1491 | "Default expressions to highlight in PHP Mode.") |
1493 | 1492 |
|
1494 | | -;;; Provide support for Flymake so that users can see warnings and |
1495 | | -;;; errors in real-time as they write code. |
1496 | | - |
1497 | | -(defun php-flymake-php-init () |
1498 | | - "PHP specific init-cleanup routines. |
1499 | | -
|
1500 | | -This is an alternative function of `flymake-php-init'. |
1501 | | -Look at the `php-executable' variable instead of the constant \"php\" command." |
1502 | | - (let* ((temp-file |
1503 | | - (funcall |
1504 | | - (eval-when-compile |
1505 | | - (if (fboundp 'flymake-proc-init-create-temp-buffer-copy) |
1506 | | - 'flymake-proc-init-create-temp-buffer-copy |
1507 | | - 'flymake-init-create-temp-buffer-copy)) |
1508 | | - 'flymake-create-temp-inplace)) |
1509 | | - (local-file (file-relative-name |
1510 | | - temp-file |
1511 | | - (file-name-directory buffer-file-name)))) |
1512 | | - (list php-executable (list "-f" local-file "-l")))) |
1513 | | - |
1514 | | -(add-to-list 'flymake-allowed-file-name-masks |
1515 | | - '("\\.php[345s]?\\'" |
1516 | | - php-flymake-php-init |
1517 | | - flymake-simple-cleanup |
1518 | | - flymake-get-real-file-name)) |
1519 | | - |
1520 | | -(add-to-list 'flymake-err-line-patterns |
1521 | | - '("\\(Parse\\|Fatal\\) error: \\(.*?\\) in \\(.*?\\) on line \\([0-9]+\\)" 3 4 nil 2)) |
| 1493 | +(add-to-list |
| 1494 | + (eval-when-compile |
| 1495 | + (if (boundp 'flymake-proc-allowed-file-name-masks) |
| 1496 | + 'flymake-proc-allowed-file-name-masks |
| 1497 | + 'flymake-allowed-file-name-masks)) |
| 1498 | + '("\\.php[345s]?\\'" php-flymake-php-init)) |
1522 | 1499 |
|
1523 | 1500 |
|
1524 | 1501 | (defun php-send-region (start end) |
|
0 commit comments