[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/drupal-mode 00aae1e5e8 070/308: Added support for `web-mod
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/drupal-mode 00aae1e5e8 070/308: Added support for `web-mode'. |
Date: |
Tue, 25 Jan 2022 10:59:30 -0500 (EST) |
branch: elpa/drupal-mode
commit 00aae1e5e88776455c7cf9f3c855d03e9f4b412e
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>
Added support for `web-mode'.
If `web-mode' (http://fxbois.free.fr/lisp/web-mode.html) is
(auto)loaded support it as one of `drupal-php-modes'.
Use `web-mode' for .tpl.php files.
Make sure `drupal-mode' on PHP files only uses cc-mode stuff in major
modes derived from `c-mode' (`php-mode' is derived; `web-mode' is
not).
---
drupal-mode.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index d076b0ba09..2f070f0208 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -131,7 +131,7 @@ Include path to the executable if it is not in your $PATH."
:group 'drupal-drush)
;;;###autoload
-(defcustom drupal-php-modes (list 'php-mode)
+(defcustom drupal-php-modes (list 'php-mode 'web-mode)
"Major modes to consider PHP in Drupal mode."
:type '(repeat symbol)
:group 'drupal)
@@ -218,8 +218,9 @@ Include path to the executable if it is not in your $PATH."
;; Stuff special for php-mode buffers.
(when (apply 'derived-mode-p drupal-php-modes)
- (c-add-language 'drupal-mode 'c-mode)
- (c-set-style "drupal")))
+ (when (derived-mode-p 'c-mode)
+ (c-add-language 'drupal-mode 'c-mode)
+ (c-set-style "drupal"))))
;;;###autoload
(define-minor-mode drupal-drush-mode
@@ -564,8 +565,11 @@ mode-hook."
;;;###autoload
(progn
- (add-to-list 'auto-mode-alist
'("\\.\\(module\\|test\\|install\\|theme\\|tpl\\.php\\)$" . php-mode))
- (add-to-list 'auto-mode-alist '("\\.info$" . conf-windows-mode)))
+ (add-to-list 'auto-mode-alist
'("\\.\\(module\\|test\\|install\\|theme\\)\\'" . php-mode))
+ (add-to-list 'auto-mode-alist '("\\.info\\'" . conf-windows-mode))
+ (when (fboundp 'web-mode)
+ (require 'php-mode)
+ (add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))))
;; Load support for various Emacs features if necessary.
- [nongnu] elpa/drupal-mode 9c618f003c 026/308: Set `ispell-local-dictionary' to `american'., (continued)
- [nongnu] elpa/drupal-mode 9c618f003c 026/308: Set `ispell-local-dictionary' to `american'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode abc074346f 035/308: Merge branch 'release/0.2.0' into develop, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode a0ef7e7fce 039/308: Fixed package name in install target., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 661e6bba48 040/308: Changed info about flymake-phpcs., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode ebb3c56e25 068/308: Discovers more module info and added module menu., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 587e0eb2ec 060/308: Added completion based on gtags., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode e96a1f70f4 066/308: Added support for "Drush utilities for Emacs users"., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 5386751a5d 069/308: Fixed module version in module menu., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 8fc32e7641 053/308: Made `drupal-detect-drupal-version' more reliable., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode ce7e9d2bf3 043/308: Various cleanup., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 00aae1e5e8 070/308: Added support for `web-mode'.,
ELPA Syncer <=
- [nongnu] elpa/drupal-mode 48a90d94ed 061/308: Fixed spelling., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode b8863a5c82 054/308: Added first take on automated tests., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 8599809578 058/308: Flymake-phpcs also highlights trailing whitespace., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode aa87684203 048/308: Added `require' for supported libraries., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 897fbfb4a5 082/308: Added small optimization for byte compiler., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode a53c312da1 089/308: Improved info file auto-insert skeleton., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 42fc725add 092/308: Hardened match for code sniffer standard., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 4688c8f0cb 101/308: Fixed use of `called-interactively-p'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 7866012679 103/308: Fixed link to other drupal-modes at Gitub, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 8951d9a7e8 105/308: Extended documentation of `drupal/flymake-phpcs-standard'., ELPA Syncer, 2022/01/25