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