summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el19
1 files changed, 11 insertions, 8 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 9e78579..b242f3b 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -3123,14 +3123,17 @@ to newline-and-indent in the global keymap, and shadows them with
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