diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gentoo-syntax.el | 16 |
2 files changed, 10 insertions, 13 deletions
@@ -1,3 +1,10 @@ +2008-10-19 Ulrich Mueller <ulm@gentoo.org> + + * gentoo-syntax.el (ebuild-mode, eselect-mode): Remove explicit + "run-hooks", since major mode hooks are already implicitely called + and would therefore run twice. + (ebuild-mode-hook, eselect-mode-hook): Don't define. + 2008-10-15 Ulrich Mueller <ulm@gentoo.org> * gentoo-syntax.el (ebuild-mode-action-alist): New variable. diff --git a/gentoo-syntax.el b/gentoo-syntax.el index 2911dc4..a30b076 100644 --- a/gentoo-syntax.el +++ b/gentoo-syntax.el @@ -84,12 +84,6 @@ A formfeed is not considered whitespace by this function." (delete-region (match-beginning 0) (point)) (indent-to end-col))))))) -(defvar ebuild-mode-hook nil - "List of functions to call when entering ebuild-mode.") - -(defvar eselect-mode-hook nil - "List of functions to call when entering eselect-mode.") - ;;;###autoload (define-derived-mode ebuild-mode shell-script-mode "Ebuild" "Major mode for Portage .ebuild and .eclass files." @@ -99,12 +93,10 @@ A formfeed is not considered whitespace by this function." (add-hook 'write-contents-hooks 'delete-trailing-whitespace t t) (add-hook 'write-contents-hooks 'ebuild-mode-tabify t t) (sh-set-shell "bash") - (setq tab-width 4) - (setq indent-tabs-mode t) (and (boundp 'ebuild-mode-menu) (easy-menu-add ebuild-mode-menu)) ; needed for XEmacs - ;; run user-defined hooks - (run-hooks 'ebuild-mode-hook)) + (setq tab-width 4) + (setq indent-tabs-mode t)) ;;;###autoload (define-derived-mode eselect-mode shell-script-mode "Eselect" @@ -115,9 +107,7 @@ A formfeed is not considered whitespace by this function." (add-hook 'write-contents-hooks 'ebuild-mode-tabify t t) (sh-set-shell "bash") (setq tab-width 4) - (setq indent-tabs-mode t) - ;; run user-defined hooks - (run-hooks 'eselect-mode-hook)) + (setq indent-tabs-mode t)) ;;; Run ebuild command. |