# HG changeset patch # User Lute Kamstra # Date 1118148904 0 # Node ID 4fd618421f81ab695e0edd7866cba9d43c43a8fd # Parent 478f79c08a6e36a0f343bca5d5827630131ea280 (org-run-mode-hooks): New function. (org-agenda-mode): Use it. diff -r 478f79c08a6e -r 4fd618421f81 lisp/textmodes/org.el --- a/lisp/textmodes/org.el Tue Jun 07 10:52:08 2005 +0000 +++ b/lisp/textmodes/org.el Tue Jun 07 12:55:04 2005 +0000 @@ -154,8 +154,6 @@ (require 'outline) (require 'time-date) (require 'easymenu) -(or (fboundp 'run-mode-hooks) - (defalias 'run-mode-hooks 'run-hooks)) ;;; Customization variables @@ -384,6 +382,12 @@ If the file does not specify a category, then file's base name is used instead.") +(defun org-run-mode-hooks (&rest hooks) + "Call `run-mode-hooks' if it is available; otherwise call `run-hooks'." + (if (fboundp 'run-mode-hooks) + (apply 'run-mode-hooks hooks) + (apply 'run-hooks hooks))) + (defun org-set-regexps-and-options () "Precompute regular expressions for current buffer." (when (eq major-mode 'org-mode) @@ -3118,7 +3122,7 @@ "--") (mapcar 'org-file-menu-entry org-agenda-files))) (org-agenda-set-mode-name) - (run-mode-hooks 'org-agenda-mode-hook)) + (org-run-mode-hooks 'org-agenda-mode-hook)) (define-key org-agenda-mode-map [(tab)] 'org-agenda-goto) (define-key org-agenda-mode-map [(return)] 'org-agenda-switch-to)