[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/drupal-mode bcde7079ab 021/308: Moved etags support to its
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/drupal-mode bcde7079ab 021/308: Moved etags support to its own file. |
Date: |
Tue, 25 Jan 2022 10:59:03 -0500 (EST) |
branch: elpa/drupal-mode
commit bcde7079abe4ec77c4ff5c9fbfe5a3a6b95e884a
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>
Moved etags support to its own file.
---
Makefile | 2 +-
drupal-mode.el | 8 +++-----
drupal/etags.el | 21 +++++++++++++++++++++
3 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 518fa7e3d5..ad7f74d156 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ README: README.md
pandoc -t plain -o $@ $^
# create a tar ball in package.el format for uploading to
http://marmalade-repo.org
-elpa-package: README drupal-mode.el drupal-mode-pkg.el drupal-mode.info dir
+elpa-package: README drupal-mode.el drupal-mode-pkg.el drupal-mode.info dir
drupal/*.el
tar -c -s "@^@drupal-mode-${VERSION}/@" -f drupal-mode-${VERSION}.tar $^
elpa-install: elpa-package
diff --git a/drupal-mode.el b/drupal-mode.el
index d2bed5fedd..b52037e1a3 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -139,11 +139,6 @@ According to http://drupal.org/coding-standards#indenting."
(c-add-language 'drupal-mode 'c-mode)
(c-set-style "drupal"))
- ;; setup TAGS file for etags if it exists in DRUPAL_ROOT
- (when (and (boundp 'drupal-root)
- (file-exists-p (concat drupal-root "TAGS")))
- (setq tags-file-name (concat drupal-root "TAGS")))
-
;; handle line ending and trailing whitespace
(add-hook 'before-save-hook 'drupal-convert-line-ending)
(add-hook 'before-save-hook 'drupal-delete-trailing-whitespace))
@@ -309,6 +304,9 @@ mode-hook, i.e.
(add-to-list 'auto-mode-alist
'("\\.\\(module\\|test\\|install\\|theme\\|tpl\\.php\\)$" . php-mode))
(add-to-list 'auto-mode-alist '("\\.info$" . conf-windows-mode)))
+;; Load support for various Emacs features if necessary.
+(eval-after-load 'etags '(require 'drupal/etags))
+
(provide 'drupal-mode)
diff --git a/drupal/etags.el b/drupal/etags.el
new file mode 100644
index 0000000000..cb8d06f068
--- /dev/null
+++ b/drupal/etags.el
@@ -0,0 +1,21 @@
+;;; drupal/etags.el --- Drupal-mode support for etags
+
+;;; Commentary:
+
+;; Enable drupal-mode support for etags.
+
+;;; Code:
+
+(defun drupal/etags-enable ()
+ "Setup TAGS file for etags if it exists in DRUPAL_ROOT."
+ (when (and (boundp 'drupal-root)
+ (file-exists-p (concat drupal-root "TAGS")))
+ (setq tags-file-name (concat drupal-root "TAGS"))))
+
+(add-hook 'drupal-mode-hook 'drupal/etags-enable)
+
+
+
+(provide 'drupal/etags)
+
+;;; drupal/etags.el ends here
- [nongnu] branch elpa/drupal-mode created (now 17927723ad), ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 90446f5bd8 003/308: Merge branch 'release/0.1.0', ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 07eaf83729 015/308: New var drupal-root. Use it for `tags-file-name'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 50fb7ad1f9 007/308: Add api.drupalcontrib.org for doc search., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 571f94535f 011/308: Added 'elpa-install' target., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 3f20a5b31b 008/308: Improve drupal-style indentation for comments., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 00fa57745f 005/308: Cleanup., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode b7f50ec381 012/308: Detecting version shouldn't fail on non-files., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode bcde7079ab 021/308: Moved etags support to its own file.,
ELPA Syncer <=
- [nongnu] elpa/drupal-mode c1385212f4 018/308: Add basic drush support., ELPA Syncer, 2022/01/25
- [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