[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/drupal-mode 319acd5761 240/308: Moved eldoc stuff to separ
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/drupal-mode 319acd5761 240/308: Moved eldoc stuff to separate file. |
Date: |
Tue, 25 Jan 2022 10:59:51 -0500 (EST) |
branch: elpa/drupal-mode
commit 319acd576147144985dbb38d5a5747703c60d2eb
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>
Moved eldoc stuff to separate file.
---
drupal-mode.el | 9 +--------
drupal/eldoc.el | 47 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 8 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index ca94c1d8c4..3efde98b9b 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -302,14 +302,6 @@ function arguments.")
;; Stuff special for php-mode buffers.
(when (apply 'derived-mode-p drupal-php-modes)
- ;; Show function arguments from GNU GLOBAL for function at point
- ;; after a short delay of idle time.
- (when (and drupal-get-function-args
- (fboundp 'eldoc-mode))
- (set (make-local-variable 'eldoc-documentation-function)
- #'drupal-eldoc-documentation-function)
- (eldoc-mode 1))
-
;; Set correct comment style for inline comments.
(setq comment-start "//")
(setq comment-padding " ")
@@ -877,6 +869,7 @@ mode-hook."
;; Load support for various Emacs features if necessary.
(eval-after-load 'autoinsert '(require 'drupal/autoinsert))
+(eval-after-load 'eldoc '(require 'drupal/eldoc))
(eval-after-load 'etags '(require 'drupal/etags))
(eval-after-load 'gtags '(require 'drupal/gtags))
(eval-after-load 'ggtags '(require 'drupal/ggtags))
diff --git a/drupal/eldoc.el b/drupal/eldoc.el
new file mode 100644
index 0000000000..ed0f4e7b5a
--- /dev/null
+++ b/drupal/eldoc.el
@@ -0,0 +1,47 @@
+;;; drupal/eldoc.el --- Drupal-mode support for eldoc.el
+
+;; Copyright (C) 2015 Arne Jørgensen
+
+;; Author: Arne Jørgensen <arne@arnested.dk>
+
+;; This file is part of Drupal mode.
+
+;; Drupal mode is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published
+;; by the Free Software Foundation, either version 3 of the License,
+;; or (at your option) any later version.
+
+;; Drupal mode is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with Drupal mode. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Enable drupal-mode support for eldoc.
+
+;;; Code:
+
+(defun drupal/eldoc-enable ()
+ "Enable eldoc in PHP files."
+ (when (apply 'derived-mode-p drupal-php-modes)
+ ;; Show function arguments from GNU GLOBAL for function at point
+ ;; after a short delay of idle time.
+ (when (fboundp 'eldoc-mode)
+ (set (make-local-variable 'eldoc-documentation-function)
+ #'drupal-eldoc-documentation-function)
+ (eldoc-mode 1))))
+
+(add-hook 'drupal-mode-hook #'drupal/eldoc-enable)
+
+(when drupal-mode
+ (drupal/eldoc-enable))
+
+
+
+(provide 'drupal/eldoc)
+
+;;; drupal/eldoc.el ends here
- [nongnu] elpa/drupal-mode bef3447608 198/308: Add menu items for function & hook templates, (continued)
- [nongnu] elpa/drupal-mode bef3447608 198/308: Add menu items for function & hook templates, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 7b2c43bd41 200/308: Merge pull request #44 from joddie/ggtags, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 0cca19ed14 205/308: Misc documentation cleanup., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode f205ee475e 213/308: drupal-detect-drupal-version: Allow tabs in .info, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode e6f955e367 218/308: Removed api.drupalize.me., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode e803c00379 220/308: Only use our phpcs special checker on non PHP-files., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 9a6d3623b9 237/308: User error if the hook is already inserted elsewhere., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode d9e2137a54 229/308: Use `auto-revert-mode` and auto-load., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode accf63bac1 234/308: Made blacklist a configurable regexp., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 945ddcca95 239/308: Implemented async cache clear., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 319acd5761 240/308: Moved eldoc stuff to separate file.,
ELPA Syncer <=
- [nongnu] elpa/drupal-mode d09cdf8781 236/308: User error if the hook is already inserted in the file., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 4bd52836b3 238/308: Inherit drupal-style from php style., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 2e51a209df 223/308: Properly concat phpcs option in newer flycheck., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 914d2df539 222/308: Fixed URL of Drupalcontrib.org API., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 5ad113d48f 255/308: Add `drupal-drush-sql-cli` command, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode b62d89c177 251/308: Fix up for latest flycheck., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode c2d7bc42e3 252/308: Merge pull request #63 from arnested/feature/flycheck-update, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 59bbaaf4f1 249/308: Merge branch 'release/0.6.1' into develop, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 0cd2412756 257/308: Avoid "no tags containing" error in hook skeleton, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 36ea4003da 259/308: Merge pull request #65 from joddie/feature/sql-cli, ELPA Syncer, 2022/01/25