[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/drupal-mode 5c53b742fb 087/308: Improved buffer-file-name
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/drupal-mode 5c53b742fb 087/308: Improved buffer-file-name fallbacks. |
Date: |
Tue, 25 Jan 2022 10:59:32 -0500 (EST) |
branch: elpa/drupal-mode
commit 5c53b742fb17fd4fdafc03c881965b46e04fcd44
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>
Improved buffer-file-name fallbacks.
---
drupal-mode.el | 6 +++---
drupal/flymake-phpcs.el | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index 82e5258ada..edbf9c693a 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -478,7 +478,7 @@ the location of DRUPAL_ROOT."
(when (or (not drupal-version)
(not drupal-rootdir))
(dolist (file '("modules/system/system.module" "includes/bootstrap.inc"
"core/includes/bootstrap.inc"))
- (let ((here (or buffer-file-name dired-directory)))
+ (let ((here (or buffer-file-name default-directory)))
(when here
(let ((dir (locate-dominating-file here file)))
(when dir
@@ -492,7 +492,7 @@ the location of DRUPAL_ROOT."
(dir-locals-set-directory-class dir 'drupal-site)))
(setq drupal-version (match-string-no-properties 2))))))))
(hack-local-variables))
- (let ((module (drupal-locate-dominating-module buffer-file-name t))
+ (let ((module (drupal-locate-dominating-module (or buffer-file-name
default-directory) t))
(version drupal-version)
(module-name nil)
(module-version nil)
@@ -608,7 +608,7 @@ mode-hook."
(drupal-detect-drupal-version)
(when drupal-version
(drupal-mode 1))
- (when (string-match "drush" buffer-file-name)
+ (when (string-match "drush" (or buffer-file-name default-directory))
(drupal-drush-mode 1))))
;;;###autoload
diff --git a/drupal/flymake-phpcs.el b/drupal/flymake-phpcs.el
index 93ba660885..ead33ab7db 100644
--- a/drupal/flymake-phpcs.el
+++ b/drupal/flymake-phpcs.el
@@ -69,7 +69,7 @@ so no need to highlight it twice."
;; flymake-phpcs initialize.
(make-local-variable 'flymake-allowed-file-name-masks)
(add-to-list 'flymake-allowed-file-name-masks
- `(,(concat "\\." (file-name-extension (buffer-file-name))
"\\'") flymake-phpcs-init))
+ `(,(concat "\\." (file-name-extension (or buffer-file-name
(buffer-name))) "\\'") flymake-phpcs-init))
(flymake-mode 1)))
(add-hook 'drupal-mode-hook #'drupal/flymake-phpcs-enable)
- [nongnu] elpa/drupal-mode 21a3c7544d 049/308: Drupal menu adjusted., (continued)
- [nongnu] elpa/drupal-mode 21a3c7544d 049/308: Drupal menu adjusted., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode d3b4c6f1e7 112/308: Added variable for GNU GLOBAL`global' command., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode f150913830 050/308: Added skeletons for functions and hooks., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 6a7322f581 052/308: Optimized for byte-compile by using #' shorthand., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode d0031d4c1f 056/308: Added/adjusted COPYING information., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode b4496a561f 047/308: Revert parts of 55a523b65fe53ca06f429cffd91ead6ff76667d2, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode b34cc6fb8f 042/308: Ensured flymake-phpcs is run in php-mode buffers., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 88d744068c 073/308: Fixed regexp., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode d23d66e624 083/308: Support `php-extras-eldoc-documentation-function'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode d73965852e 085/308: Fixed flaw in `drupal-major-version'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 5c53b742fb 087/308: Improved buffer-file-name fallbacks.,
ELPA Syncer <=
- [nongnu] elpa/drupal-mode e65bf476cd 090/308: Fixed module version for Drupal core modules., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 0ef0569693 088/308: Fixed keyboard shortcuts in documentation., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 767d490751 094/308: Removed `web-mode' from `auto-mode-alist'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 469ff86a3e 120/308: Changed `css-indent-offset' to `css-indent-level'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 6022df5bd8 126/308: Merge remote-tracking branch 'origin/pr/34' into develop., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode a5243b655e 140/308: No need for #., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 4ee1668794 108/308: Added `web-mode.el' as a PHP file mode., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode f57430af6f 142/308: Really no need to check for existence of phpcs command., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 6a75362ee1 014/308: docfix, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode e3bfd959f3 006/308: Use `info' instead of `info-display-manual'., ELPA Syncer, 2022/01/25