diff Misc/python-mode.el @ 23323:af499b50a094 legacy-trunk

Watch out for older XEmacsen for which requiring info-look doesn't define info-lookup-maybe-add-help.
author Barry Warsaw <barry@python.org>
date Tue, 30 Apr 2002 18:58:52 +0000
parents 00f66360be19
children c375c5b26631
line wrap: on
line diff
--- a/Misc/python-mode.el	Tue Apr 30 16:25:37 2002 +0000
+++ b/Misc/python-mode.el	Tue Apr 30 18:58:52 2002 +0000
@@ -3123,14 +3123,17 @@
 local bindings to py-newline-and-indent."))
 
 (require 'info-look)
-(info-lookup-maybe-add-help
- :mode 'python-mode
- :regexp "[a-zA-Z0-9_]+"
- :doc-spec '(("(python-lib)Module Index")
-	     ("(python-lib)Class-Exception-Object Index")
-	     ("(python-lib)Function-Method-Variable Index")
-	     ("(python-lib)Miscellaneous Index")))
-
+;; The info-look package does not always provide this function (it
+;; appears this is the case with XEmacs 21.1)
+(when (fboundp 'info-lookup-maybe-add-help)
+  (info-lookup-maybe-add-help
+   :mode 'python-mode
+   :regexp "[a-zA-Z0-9_]+"
+   :doc-spec '(("(python-lib)Module Index")
+	       ("(python-lib)Class-Exception-Object Index")
+	       ("(python-lib)Function-Method-Variable Index")
+	       ("(python-lib)Miscellaneous Index")))
+  )
 
 
 ;; Helper functions