aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLute Kamstra <[email protected]>2005-06-07 12:56:00 +0000
committerLute Kamstra <[email protected]>2005-06-07 12:56:00 +0000
commit6d64c19123a4facc0e1189fe14b2ba330f7992f7 (patch)
treeeef63c6b94225ad111a9051822e9ed570def2fb2
parent590bc48b85b79f29dde2d9e0a0881e2fd8e77529 (diff)
(org-run-mode-hooks): New function.
(org-agenda-mode): Use it.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/textmodes/org.el10
2 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 120457322e..368d513997 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-07 Lute Kamstra <[email protected]>
+
+ * textmodes/org.el (org-run-mode-hooks): New function.
+ (org-agenda-mode): Use it.
+
2005-06-07 David McCabe <[email protected]> (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 bbc59768aa..d13a7514c1 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)