branch: elpa/drupal-mode
commit 21a3c7544d2c85f903beebe2306abe56fe6e1570
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>
Drupal menu adjusted.
* Added link to GitHub page.
* Search documentation only enabled in php-mode.
---
drupal-mode.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index 96af6da75a..662f09b1a5 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -253,6 +253,12 @@ of the project)."
(cons "Drupal" (make-sparse-keymap "Drupal")))
;; Define specific subcommands in this menu.
+(define-key drupal-mode-map
+ [menu-bar drupal github]
+ '("Drupal Mode on GitHub" . (lambda () (interactive) (browse-url
"https://github.com/arnested/drupal-mode"))))
+(define-key drupal-mode-map
+ [menu-bar drupal separator]
+ '("--"))
(define-key drupal-mode-map
[menu-bar drupal customize]
'("Customize Drupal Mode" . (lambda () (interactive) (customize-group
'drupal))))
@@ -261,7 +267,8 @@ of the project)."
'("Drupal Mode manual" . drupal-mode-manual))
(define-key drupal-mode-map
[menu-bar drupal search-documentation]
- '("Search documentation" . drupal-search-documentation))
+ '(menu-item "Search documentation" drupal-search-documentation
+ :enable (eq major-mode 'php-mode)))
(define-key drupal-mode-map
[menu-bar drupal cache-clear]
'(menu-item "Clear all caches" drupal-drush-cache-clear