[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/drupal-mode 50fb7ad1f9 007/308: Add api.drupalcontrib.org
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/drupal-mode 50fb7ad1f9 007/308: Add api.drupalcontrib.org for doc search. |
Date: |
Tue, 25 Jan 2022 10:59:02 -0500 (EST) |
branch: elpa/drupal-mode
commit 50fb7ad1f9e6639ff52d9c6b8fcb03c2aeee9da2
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>
Add api.drupalcontrib.org for doc search.
Closes #1.
---
drupal-mode.el | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index 56c06d9d3a..f1bd7ce162 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -34,6 +34,7 @@
;;; Code:
(require 'php-mode)
+(require 'format-spec)
@@ -65,11 +66,14 @@ According to http://drupal.org/coding-standards#indenting."
(const :tag "Never" nil))
:group 'drupal)
-;;
-(defcustom drupal-search-url "http://api.drupal.org/api/search/%s/%s"
+;; Where to lookup symbols
+(defcustom drupal-search-url "http://api.drupal.org/api/search/%v/%s"
"The URL to search the Drupal API.
-First parameter is the Drupal version. Second parameter is the search term."
- :type 'string
+%v is the Drupal major version.
+%s is the search term."
+ :type '(choice (const :tag "Drupal.org"
"http://api.drupal.org/api/search/%v/%s")
+ (const :tag "DrupalContrib.org"
"http://api.drupalcontrib.org/api/search/%v/%s")
+ (string :tag "Other"
"http://example.com/search?q=%s&version=%v"))
:group 'drupal)
(defvar drupal-version nil "Drupal version as auto detected.")
@@ -173,7 +177,9 @@ should save your files with unix style end of line."
(defun drupal-search-documentation ()
"Search Drupal documentation for symbol at point."
(interactive)
- (browse-url(format drupal-search-url (drupal-major-version drupal-version)
(symbol-at-point))))
+ (browse-url
+ (format-spec drupal-search-url `((?v . ,(drupal-major-version
drupal-version))
+ (?s . ,(symbol-at-point))))))
- [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 <=
- [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, 2022/01/25
- [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