Check for define-obsolete-function-alias before using it.

This is for Emacs 21 compatibility.
This commit is contained in:
Carsten Dominik 2008-04-05 18:49:26 +02:00
parent 2f02a50fcc
commit 2537ddc2f7
1 changed files with 6 additions and 5 deletions

View File

@ -4799,11 +4799,12 @@ even level numbers will become the next higher odd number."
((< change 0) (max 1 (1+ (* 2 (/ (+ level (* 2 change)) 2)))))) ((< change 0) (max 1 (1+ (* 2 (/ (+ level (* 2 change)) 2))))))
(max 1 (+ level change)))) (max 1 (+ level change))))
(if (or (featurep 'xemacs) (< emacs-major-version 23)) (if (boundp 'define-obsolete-function-alias)
(if (or (featurep 'xemacs) (< emacs-major-version 23))
(define-obsolete-function-alias 'org-get-legal-level (define-obsolete-function-alias 'org-get-legal-level
'org-get-valid-level) 'org-get-valid-level)
(define-obsolete-function-alias 'org-get-legal-level (define-obsolete-function-alias 'org-get-legal-level
'org-get-valid-level "23.1")) 'org-get-valid-level "23.1")))
(defun org-promote () (defun org-promote ()
"Promote the current heading higher up the tree. "Promote the current heading higher up the tree.