branch: elpa/drupal-mode
commit 08498d39fad61ebef8adddedf3c535bded026b57
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>

    Don't lookup documentation if no symbol-at-point.
---
 drupal-mode.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drupal-mode.el b/drupal-mode.el
index ed9ac15514..c2dd23603e 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -193,9 +193,10 @@ 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-spec drupal-search-url `((?v . ,(drupal-major-version 
drupal-version))
-                                    (?s . ,(symbol-at-point))))))
+  (when (symbol-at-point)
+    (browse-url
+     (format-spec drupal-search-url `((?v . ,(drupal-major-version 
drupal-version))
+                                     (?s . ,(symbol-at-point)))))))
 
 
 

Reply via email to