From: Lute Kamstra Date: Tue, 7 Jun 2005 12:56:00 +0000 (+0000) Subject: (org-run-mode-hooks): New function. X-Git-Tag: emacs-pretest-22.0.90~9222 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6d64c19123a4facc0e1189fe14b2ba330f7992f7;p=emacs.git (org-run-mode-hooks): New function. (org-agenda-mode): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 120457322ef..368d5139978 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-07 Lute Kamstra + + * textmodes/org.el (org-run-mode-hooks): New function. + (org-agenda-mode): Use it. + 2005-06-07 David McCabe (tiny change) * emacs-lisp/lisp-mode.el (defstruct): Set 'doc-string-elt property. diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index bbc59768aaf..d13a7514c16 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -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 @@ or contain a special line 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 @@ The following commands are available: "--") (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)