@@ -138,13 +138,14 @@ http://www.gnu.org/licenses/ for details.")
138138 (set (make-local-variable 'imenu-syntax-alist )
139139 '((" +-*/.<>=?!$%_&~^:" . " w" ))))
140140
141- (when (fboundp 'helm )
142- (require 'helm )
143141
144- (defun racket-helm-apropos-init ()
145- (with-current-buffer (helm-candidate-buffer 'global )
146- (dolist (elem (racket--eval/sexpr " ,apropos" ))
147- (insert (car elem) " \n " ))))
142+ (when (require 'helm nil 't )
143+
144+ (when (fboundp 'helm-candidate-buffer )
145+ (defun racket-helm-apropos-init ()
146+ (with-current-buffer (helm-candidate-buffer 'global )
147+ (dolist (elem (racket--eval/sexpr " ,apropos" ))
148+ (insert (car elem) " \n " )))))
148149
149150 (defun racket-helm-apropos-match-part (candidate )
150151 candidate)
@@ -160,10 +161,11 @@ http://www.gnu.org/licenses/ for details.")
160161 (match-part . racket-helm-apropos-match-part)
161162 (action . racket-helm-apropos-action)))
162163
163- (defun racket-helm-apropos ()
164- " Equivalent of helm-apropos but for the racket installed documentation"
165- (interactive )
166- (helm :sources 'helm-source-racket-apropos :buffer " *helm racket apropos*" )))
164+ (when (fboundp 'helm )
165+ (defun racket-helm-apropos ()
166+ " Equivalent of helm-apropos but for the racket installed documentation"
167+ (interactive )
168+ (helm :sources 'helm-source-racket-apropos :buffer " *helm racket apropos*" ))))
167169
168170;;;### autoload
169171(define-derived-mode racket-mode prog-mode
0 commit comments