]> code.delx.au - gnu-emacs/commitdiff
(org-run-mode-hooks): New function.
authorLute Kamstra <lute@gnu.org>
Tue, 7 Jun 2005 12:56:00 +0000 (12:56 +0000)
committerLute Kamstra <lute@gnu.org>
Tue, 7 Jun 2005 12:56:00 +0000 (12:56 +0000)
(org-agenda-mode): Use it.

lisp/ChangeLog
lisp/textmodes/org.el

index 120457322ef9313dc5eee09f7d2e332a0fb17dd8..368d5139978747f9b2fff59369d6a9d33efedc49 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-07  Lute Kamstra  <lute@gnu.org>
+
+       * textmodes/org.el (org-run-mode-hooks): New function.
+       (org-agenda-mode): Use it.
+
 2005-06-07  David McCabe  <davemccabe@gmail.com>  (tiny change)
 
        * emacs-lisp/lisp-mode.el (defstruct): Set 'doc-string-elt property.
index bbc59768aaf1cd2eb503bd824483dcf8cb0f074e..d13a7514c16a7b27fed863af5aac3c09848be232 100644 (file)
 (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)