[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/drupal-mode a25b4df69a 179/308: Cope with different implem
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/drupal-mode a25b4df69a 179/308: Cope with different implementations of flymake-phpcs. |
Date: |
Tue, 25 Jan 2022 10:59:45 -0500 (EST) |
branch: elpa/drupal-mode
commit a25b4df69a8c23920cada4392901ff07ae6e7d21
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>
Cope with different implementations of flymake-phpcs.
---
drupal/flymake-phpcs.el | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/drupal/flymake-phpcs.el b/drupal/flymake-phpcs.el
index 3b285b57c9..65bb429b89 100644
--- a/drupal/flymake-phpcs.el
+++ b/drupal/flymake-phpcs.el
@@ -34,7 +34,8 @@
;; Only available when `flymake' is the fork from
;; https://github.com/illusori/emacs-flymake.
-(when (boundp 'flymake-run-in-place)
+(when (or (boundp 'flymake-run-in-place)
+ (fboundp 'flymake-phpcs-load))
(defcustom drupal/flymake-phpcs-run-in-place t
"If nil, flymake will run on copies in `temporary-file-directory' rather
than the same directory as the original file.
@@ -61,12 +62,16 @@ file (and thus on the remote machine), or in the same place
as
(executable-find flymake-phpcs-command)
drupal/phpcs-standard)
;; Set the coding standard to "Drupal" (we checked that it is
- ;; supported above.
+ ;; supported above).
(set (make-local-variable 'flymake-phpcs-standard) drupal/phpcs-standard)
;; Set whether flymake runs in place.
(when (and (boundp 'drupal/flymake-phpcs-run-in-place)
(not (eq drupal/flymake-phpcs-run-in-place 'default)))
+ (when (fboundp 'flymake-phpcs-load)
+ (if drupal/flymake-phpcs-run-in-place
+ (set (make-local-variable 'flymake-phpcs-location) 'inplace)
+ (set (make-local-variable 'flymake-phpcs-location) 'tempdir)))
(set (make-local-variable 'flymake-run-in-place)
drupal/flymake-phpcs-run-in-place))
;; Flymake-phpcs will also highlight trailing whitespace as an
@@ -76,13 +81,15 @@ file (and thus on the remote machine), or in the same place
as
;; This is a php-mode file so add the extension to a buffer locale
;; version of `flymake-allowed-file-name-masks' and make
;; flymake-phpcs initialize.
- (make-local-variable 'flymake-allowed-file-name-masks)
- (let ((extension (file-name-extension (or buffer-file-name
(buffer-name)))))
- (when (string-match "\\.tpl\\.php\\'" (or buffer-file-name
(buffer-name)))
- (setq extension "tpl\\.php"))
- (add-to-list 'flymake-allowed-file-name-masks
- `(,(concat "\\." extension "\\'") flymake-phpcs-init)))
- (flymake-mode 1)))
+ (if (fboundp 'flymake-phpcs-load)
+ (flymake-phpcs-load)
+ (make-local-variable 'flymake-allowed-file-name-masks)
+ (let ((extension (file-name-extension (or buffer-file-name
(buffer-name)))))
+ (when (string-match "\\.tpl\\.php\\'" (or buffer-file-name
(buffer-name)))
+ (setq extension "tpl\\.php"))
+ (add-to-list 'flymake-allowed-file-name-masks
+ `(,(concat "\\." extension "\\'") flymake-phpcs-init)))
+ (flymake-mode 1))))
(add-hook 'drupal-mode-hook #'drupal/flymake-phpcs-enable)
- [nongnu] elpa/drupal-mode 8d57a2a3d6 146/308: Added `hash-table-p` check., (continued)
- [nongnu] elpa/drupal-mode 8d57a2a3d6 146/308: Added `hash-table-p` check., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 274015c27a 147/308: Merge pull request #37 from xendk/develop, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 4adeb0c218 150/308: Fixed tar on Mac OS X., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode e20d8fefaa 153/308: Swicth to https links to Drupal.org., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 8eec967164 152/308: Fixed latest commit., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 36a8caff76 156/308: Bumped version number to 0.3.0., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 557f34c5d3 163/308: Fixed tar on Mac OS X., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 4e4714fc16 165/308: ..., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 919154b7f4 158/308: Merge branch 'release/0.3.0' into develop, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 493acf44da 166/308: Redone building `drupal-mode-map`., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode a25b4df69a 179/308: Cope with different implementations of flymake-phpcs.,
ELPA Syncer <=
- [nongnu] elpa/drupal-mode 9b091a3b71 182/308: Merge tag '0.4.0' into develop, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 3bb1e40acc 183/308: Silence byte compiler., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode cd07abb544 189/308: Made it possible to refer to issue comments., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 4532cd7217 193/308: Use `._flymake` as temp file pattern., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 7ddadecabd 191/308: Reduced number of times calling `drupal-detect-drupal-version`., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 1d1690b855 203/308: Merge branch 'release/0.5.0', ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode ca93db3d20 027/308: Only change dictionary to `american' if it exists., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode ab0af570f8 095/308: Added .profile to `auto-load-alist' for `php-mode'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 8d2c52c821 188/308: Prepared for .api.php CoderSniffer sniffs., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 95d6ecdd75 194/308: Bumped version number., ELPA Syncer, 2022/01/25