[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/drupal-mode cda13dfb21 063/308: Added better bootstrapping
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/drupal-mode cda13dfb21 063/308: Added better bootstrapping of Drupal mode. |
Date: |
Tue, 25 Jan 2022 10:59:29 -0500 (EST) |
branch: elpa/drupal-mode
commit cda13dfb21d577c8f4bcbe445e256dd3ed434c79
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>
Added better bootstrapping of Drupal mode.
Drupal mode will now try to bootstrap itself in all major modes listed
in `drupal-php-modes', `drupal-css-modes', `drupal-js-modes' and the
new `drupal-info-modes'.
---
drupal-mode.el | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index 8aa33e93af..997e5e76e7 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -130,21 +130,30 @@ Include path to the executable if it is not in your
$PATH."
:link '(variable-link drupal-drush-program)
:group 'drupal-drush)
+;;;###autoload
(defcustom drupal-php-modes (list 'php-mode)
"Major modes to consider PHP in Drupal mode."
:type '(repeat symbol)
:group 'drupal)
+;;;###autoload
(defcustom drupal-css-modes (list 'css-mode)
"Major modes to consider CSS in Drupal mode."
:type '(repeat symbol)
:group 'drupal)
+;;;###autoload
(defcustom drupal-js-modes (list 'javascript-mode 'js-mode 'js2-mode)
"Major modes to consider JavaScript in Drupal mode."
:type '(repeat symbol)
:group 'drupal)
+;;;###autoload
+(defcustom drupal-info-modes (list 'conf-windows-mode)
+ "Major modes to consider info files in Drupal mode."
+ :type '(repeat symbol)
+ :group 'drupal)
+
(defvar drupal-version nil "Drupal version as auto detected.")
@@ -472,11 +481,8 @@ is a mode supported by `drupal-mode' (currently only
`php-mode').
The function is suitable for adding to the supported major modes
-mode-hook, i.e.
-
-(eval-after-load 'php-mode
- '(add-hook 'php-mode-hook 'drupal-mode-bootstrap))"
- (when (apply 'derived-mode-p drupal-php-modes)
+mode-hook."
+ (when (apply 'derived-mode-p (append drupal-php-modes drupal-css-modes
drupal-js-modes drupal-info-modes))
(drupal-detect-drupal-version)
(when drupal-version
(drupal-mode 1))
@@ -484,8 +490,10 @@ mode-hook, i.e.
(drupal-drush-mode 1))))
;;;###autoload
-(eval-after-load 'php-mode
- '(add-hook 'php-mode-hook #'drupal-mode-bootstrap))
+(dolist (mode (append drupal-php-modes drupal-css-modes drupal-js-modes
drupal-info-modes))
+ (when (intern (concat (symbol-name mode) "-hook"))
+ (message "Adding Drupal bootstrap to %s." (concat (symbol-name mode)
"-hook") )
+ (add-hook (intern (concat (symbol-name mode) "-hook"))
#'drupal-mode-bootstrap)))
;;;###autoload
(progn
- [nongnu] elpa/drupal-mode db24ec6bf9 023/308: Added gtags support to drupal-mode., (continued)
- [nongnu] elpa/drupal-mode db24ec6bf9 023/308: Added gtags support to drupal-mode., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 8828357fe8 031/308: Stripped section heading lines in plain ascii., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 35c9e17240 037/308: Rewrote Makefile., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 85dabbf20a 030/308: Refactored a lot of code., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 74fe12bd47 033/308: Bumped version to 0.2.0., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode f95aa10028 038/308: Optimized variable expansion in Makefile., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode f04ae2825d 034/308: Merge branch 'release/0.2.0', ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode c8832210b3 032/308: Documentation was rewritten and extended., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode dec5279338 041/308: Removed generated file drupal-mode.info., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode c68f560494 075/308: Fixed regexp for extracting function arguments., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode cda13dfb21 063/308: Added better bootstrapping of Drupal mode.,
ELPA Syncer <=
- [nongnu] elpa/drupal-mode 55a523b65f 046/308: No need to restart check since flymake-phpcs 1.0.4, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode f02cb3d8eb 044/308: Drupal version also outside full projects., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode d9a34a4a5f 065/308: Enabled `gtags-mode` if GTAGS is in use., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode f491ac72b9 081/308: Redefined key bindings., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 8e19894d55 051/308: `drupal-insert-hook' got completing-read support., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode af2b2c5a76 118/308: Changed `replace-regexp-in-string` to `subst-char-in-string`., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 243db30a93 004/308: Compiled elisp should not be committed., ELPA Syncer, 2022/01/25
- [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