emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/drupal-mode 5ac9531321 177/308: Added default to run flyma


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode 5ac9531321 177/308: Added default to run flymake in place.
Date: Tue, 25 Jan 2022 10:59:45 -0500 (EST)

branch: elpa/drupal-mode
commit 5ac95313210d3e3d39148acb3c74bf02c9a8f48a
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>

    Added default to run flymake in place.
---
 drupal/flymake-phpcs.el | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/drupal/flymake-phpcs.el b/drupal/flymake-phpcs.el
index d861bf3f22..ac50b0b0ee 100644
--- a/drupal/flymake-phpcs.el
+++ b/drupal/flymake-phpcs.el
@@ -32,6 +32,29 @@
 (define-obsolete-variable-alias 
'drupal/flymake-phpcs-dont-show-trailing-whitespace 
'drupal/phpcs-dont-show-trailing-whitespace)
 (require 'drupal/phpcs)
 
+;; Only available when `flymake' is the fork from
+;; https://github.com/illusori/emacs-flymake.
+(when (boundp 'flymake-run-in-place)
+  (defcustom drupal/flymake-run-in-place t
+    "If nil, flymake will run on copies in `temporary-file-directory' rather
+than the same directory as the original file.
+
+Drupal Coder Sniffer has some sniffs that will only work if run in place.
+
+Defaults to `t'. Set to `default' to use whatever
+`flymake-run-in-place' is set to.
+
+When editing a remote file via Tramp, this flag also has the side-effect of
+determining whether the syntax check is run in the same place as the original
+file (and thus on the remote machine), or in the same place as
+`temporary-file-directory' (usually the local machine)."
+    :type `(choice
+            (const :tag "Yes" t)
+            (const :tag "No" nil)
+            (const :tag "Default" default))
+    :link '(url-link :tag "Drupal Coder Sniffer" 
"https://drupal.org/project/coder";)
+    :group 'drupal))
+
 (defun drupal/flymake-phpcs-enable ()
   "Enable drupal-mode support for flymake-phpcs."(interactive)
   (when (and (apply 'derived-mode-p (append drupal-php-modes drupal-css-modes 
drupal-js-modes drupal-info-modes))
@@ -41,6 +64,11 @@
     ;; supported above.
     (set (make-local-variable 'flymake-phpcs-standard) drupal/phpcs-standard)
 
+    ;; Set whether flymake runs in place.
+    (when (and (boundp 'drupal/flymake-run-in-place)
+               (not (eq drupal/flymake-run-in-place 'default)))
+      (set (make-local-variable 'flymake-run-in-place) 
drupal/flymake-run-in-place))
+
     ;; Flymake-phpcs will also highlight trailing whitespace as an
     ;; error so no need to highlight it twice.
     (drupal/phpcs-dont-show-trailing-whitespace)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]