[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/drupal-mode 808d1f1768 080/308: Use `eldoc-mode' for funct
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/drupal-mode 808d1f1768 080/308: Use `eldoc-mode' for function argument tips. |
Date: |
Tue, 25 Jan 2022 10:59:31 -0500 (EST) |
branch: elpa/drupal-mode
commit 808d1f17682fccb807385d1485e0c5a6af0b9f37
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>
Use `eldoc-mode' for function argument tips.
---
drupal-mode.el | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index 4c60128b86..87e3fdec6f 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -6,7 +6,7 @@
;; URL: https://github.com/arnested/drupal-mode
;; Created: January 17, 2012
;; Version: 0.2.0
-;; Package-Requires: ((php-mode "1.5.0") (pos-tip "0.4.5"))
+;; Package-Requires: ((php-mode "1.5.0"))
;; Keywords: programming, php, drupal
;; This file is part of Drupal mode.
@@ -35,7 +35,6 @@
(require 'php-mode)
(require 'format-spec)
-(autoload 'pos-tip-show "pos-tip")
@@ -131,11 +130,6 @@ Include path to the executable if it is not in your $PATH."
:link '(variable-link drupal-drush-program)
:group 'drupal-drush)
-(defcustom drupal-show-function-arguments-tooltip-delay 5
- "Show function arguments tooltip after a delay (seconds)."
- :type '(integer)
- :group 'drupal)
-
;;;###autoload
(defcustom drupal-php-modes (list 'php-mode 'web-mode)
"Major modes to consider PHP in Drupal mode."
@@ -244,8 +238,11 @@ function arguments.")
(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 drupal-get-function-args
- (run-with-idle-timer drupal-show-function-arguments-tooltip-delay t
'drupal-get-function-args-at-point))
+ (when (and drupal-get-function-args
+ (fboundp 'eldoc-mode))
+ (set (make-local-variable 'eldoc-documentation-function)
+ 'drupal-eldoc-documentation-function)
+ (eldoc-mode 1))
;; Setup cc-mode style stuff.
(when (derived-mode-p 'c-mode)
@@ -455,16 +452,13 @@ instead."
(search-forward-regexp (concat symbol "(\\(.*\\))") nil t)
(match-string-no-properties 1))))
-(defun drupal-get-function-args-at-point ()
+(defun drupal-eldoc-documentation-function ()
"Show function arguments for function at point."
- (interactive)
(when drupal-get-function-args
(let* ((symbol (php-get-pattern))
- (args (funcall drupal-get-function-args symbol)))
+ (args (when symbol (funcall drupal-get-function-args symbol))))
(when args
- (if (window-system)
- (pos-tip-show (format "%s(%s)" symbol args))
- (message "%s" (format "%s(%s)" symbol args)))))))
+ (message "%s: (%s)" symbol args)))))
- [nongnu] elpa/drupal-mode cf0364cbaf 248/308: Merge branch 'release/0.6.1', (continued)
- [nongnu] elpa/drupal-mode cf0364cbaf 248/308: Merge branch 'release/0.6.1', ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode d9745316b3 261/308: Merge pull request #62 from arnested/feature/helm-gtags-compatibility, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 0a23dc084a 266/308: Add autoinsert template for .api.php files, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 947b893b37 274/308: Handle case where `c-default-style` is a string, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode f93cdfe1b2 278/308: Use proper indent for continuation lines, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 9d793aa112 286/308: Add support for gxref/xref, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode dc82e5430c 295/308: Handle .info.yml files, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode a1c77dca8b 300/308: Prefer HTTPS URLs wherever we can, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 83ee02f80a 024/308: Renamed `drupal-root' to `drupal-rootdir'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 4ef339db0a 045/308: Don't locate standard for each buffer., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 808d1f1768 080/308: Use `eldoc-mode' for function argument tips.,
ELPA Syncer <=
- [nongnu] elpa/drupal-mode ca7773df72 102/308: Added `drupal-mode-beginning-of-line' for .info files., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode f17e7088ca 107/308: Provide Drupal projects as webjump sites., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 043644e85d 109/308: Set correct comment style for inline comments., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode dfd4582048 115/308: Fixed argument insert in `drupal-insert-hook'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode dcea92f3a9 117/308: Added autoinsert skeleton for .test files., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 6dd8edc402 121/308: Eliminated compiler warnings., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 16632d6cf7 133/308: Fixed drush version detection for Drush 7., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 58fb25a914 138/308: Added .cask to .gitignore., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode d04b119de7 141/308: Properly add our checkers to flycheck-checkers instead of enforcing it., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 5eb72aba82 162/308: Merge branch 'release/0.3.1' into develop, ELPA Syncer, 2022/01/25