Mercurial > emacs
changeset 63110:4fd618421f81
(org-run-mode-hooks): New function.
(org-agenda-mode): Use it.
author | Lute Kamstra <lute@gnu.org> |
---|---|
date | Tue, 07 Jun 2005 12:55:04 +0000 |
parents | 478f79c08a6e |
children | 26cd7a1d555a |
files | lisp/textmodes/org.el |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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)