@@ -144,31 +144,32 @@ http://www.gnu.org/licenses/ for details.")
144144  (set  (make-local-variable  'imenu-syntax-alist )
145145       '((" +-*/.<>=?!$%_&~^:"   .  " w"  ))))
146146
147- (require  'helm )
148- 
149- (defun  helm-racket-apropos-init  ()
150-   (with-current-buffer  (helm-candidate-buffer 'global )
151-     (dolist  (elem (racket--eval/sexpr " ,apropos"  ))
152-       (insert  (car  elem) " \n "  ))))
153- 
154- (defun  helm-racket-apropos-match-part  (candidate )
155-   candidate)
156- 
157- (defun  helm-racket-apropos-action  (candidate )
158-   (racket--do-describe candidate t ))
159- 
160- (defvar  helm-source-racket-apropos 
161-   '((name .  " Search throught racket defining symbol"  )
162-     (init .  helm-racket-apropos-init)
163-     (candidates-in-buffer)
164-     (get-line .  buffer-substring)
165-     (match-part .  helm-racket-apropos-match-part)
166-     (action .  helm-racket-apropos-action)))
167- 
168- (defun  helm-racket-apropos  ()
169-   " Equivalent of helm-apropos but for the racket installed documentation" 
170-   (interactive )
171-   (helm :sources  'helm-source-racket-apropos  :buffer  " *helm racket apropos*"  ))
147+ (when  (fboundp  'helm )
148+   (require  'helm )
149+ 
150+   (defun  racket-helm-apropos-init  ()
151+     (with-current-buffer  (helm-candidate-buffer 'global )
152+       (dolist  (elem (racket--eval/sexpr " ,apropos"  ))
153+ 	(insert  (car  elem) " \n "  ))))
154+ 
155+   (defun  racket-helm-apropos-match-part  (candidate )
156+     candidate)
157+ 
158+   (defun  racket-helm-apropos-action  (candidate )
159+     (racket--do-describe candidate t ))
160+ 
161+   (defvar  helm-source-racket-apropos 
162+     '((name .  " Search throught racket defining symbol"  )
163+       (init .  racket-helm-apropos-init)
164+       (candidates-in-buffer)
165+       (get-line .  buffer-substring)
166+       (match-part .  racket-helm-apropos-match-part)
167+       (action .  racket-helm-apropos-action)))
168+ 
169+   (defun  racket-helm-apropos  ()
170+     " Equivalent of helm-apropos but for the racket installed documentation" 
171+     (interactive )
172+     (helm :sources  'helm-source-racket-apropos  :buffer  " *helm racket apropos*"  )))
172173
173174;;;### autoload 
174175(define-derived-mode  racket-mode prog-mode
0 commit comments