Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 415 lines (352 sloc) 15.015 kb
3d768cc @thierryvolpiatto * helm-config.el: Move regexp and occur code to helm-regexp.el.
thierryvolpiatto authored
1 ;;; helm-regexp.el --- In buffer regexp searching and replacement for helm.
2
3 ;; Copyright (C) 2012 Thierry Volpiatto <thierry.volpiatto@gmail.com>
4
5 ;; This program is free software; you can redistribute it and/or modify
6 ;; it under the terms of the GNU General Public License as published by
7 ;; the Free Software Foundation, either version 3 of the License, or
8 ;; (at your option) any later version.
9
10 ;; This program is distributed in the hope that it will be useful,
11 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ;; GNU General Public License for more details.
14
15 ;; You should have received a copy of the GNU General Public License
16 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 ;;; Code:
19
20 (require 'cl)
21 (require 'helm)
ba17f09 @thierryvolpiatto Move all defcustoms and faces in their respectives groups and files.
thierryvolpiatto authored
22 (require 'helm-utils)
23
24
25 (defgroup helm-regexp nil
26 "Regexp related Applications and libraries for Helm."
27 :group 'helm)
28
29 (defcustom helm-c-browse-code-regexp-lisp
30 "^ *\(def\\(un\\|subst\\|macro\\|face\\|alias\\|advice\\|struct\\|\
31 type\\|theme\\|var\\|group\\|custom\\|const\\|method\\|class\\)"
32 "Regexp used to parse lisp buffer when browsing code."
33 :type 'string
34 :group 'helm-regexp)
35
36 (defcustom helm-c-browse-code-regexp-python
37 "\\<def\\>\\|\\<class\\>"
38 "Regexp used to parse python buffer when browsing code."
39 :type 'string
40 :group 'helm-regexp)
41
42 (defcustom helm-c-browse-code-regexp-alist
43 `((lisp-interaction-mode . ,helm-c-browse-code-regexp-lisp)
44 (emacs-lisp-mode . ,helm-c-browse-code-regexp-lisp)
45 (lisp-mode . ,helm-c-browse-code-regexp-lisp)
46 (python-mode . ,helm-c-browse-code-regexp-python))
47 "Alist to store regexps for browsing code corresponding \
48 to a specific `major-mode'."
d079fc3 @thierryvolpiatto Issue #95 Fix defcustoms in various places.
thierryvolpiatto authored
49 :type '(alist :key-type symbol :value-type regexp)
ba17f09 @thierryvolpiatto Move all defcustoms and faces in their respectives groups and files.
thierryvolpiatto authored
50 :group 'helm-regexp)
c3fb0f0 @thierryvolpiatto * helm-grep.el (helm-c-goto-next-or-prec-file): always use helm-c-grep-s...
thierryvolpiatto authored
51
6e49004 @thierryvolpiatto * helm-regexp.el (helm-moccur-always-search-in-current): Default to nil.
thierryvolpiatto authored
52 (defcustom helm-moccur-always-search-in-current nil
c3fb0f0 @thierryvolpiatto * helm-grep.el (helm-c-goto-next-or-prec-file): always use helm-c-grep-s...
thierryvolpiatto authored
53 "Helm multi occur always search in current buffer when non--nil."
54 :group 'helm-regexp
55 :type 'boolean)
56
75e2a0e @thierryvolpiatto * helm-regexp.el (helm-occur-init-source): new
thierryvolpiatto authored
57 (defcustom helm-m-occur-idle-delay 0.3
fb3195d @thierryvolpiatto * helm.el (helm-update): Allow giving an in-source value to delayed attr...
thierryvolpiatto authored
58 "Delay before updating display in `helm-c-source-moccur'.
75e2a0e @thierryvolpiatto * helm-regexp.el (helm-occur-init-source): new
thierryvolpiatto authored
59 It is similar to `helm-idle-delay' but local to `helm-c-source-moccur'.
60 This setting apply also to `helm-c-source-occur'."
fb3195d @thierryvolpiatto * helm.el (helm-update): Allow giving an in-source value to delayed attr...
thierryvolpiatto authored
61 :group 'helm-regexp
62 :type 'float)
63
9f15d07 @thierryvolpiatto Add transformer function to multi occur.
thierryvolpiatto authored
64
65 (defface helm-moccur-buffer
66 '((t (:foreground "DarkTurquoise" :underline t)))
67 "Face used to highlight moccur buffer names."
68 :group 'helm-regexp)
ba17f09 @thierryvolpiatto Move all defcustoms and faces in their respectives groups and files.
thierryvolpiatto authored
69
70
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
71 (defvar helm-c-moccur-map
72 (let ((map (make-sparse-keymap)))
73 (set-keymap-parent map helm-map)
74 (define-key map (kbd "M-<down>") 'helm-c-goto-next-file)
75 (define-key map (kbd "M-<up>") 'helm-c-goto-precedent-file)
76 (define-key map (kbd "C-w") 'helm-yank-text-at-point)
b3194af @thierryvolpiatto Add help for moccur.
thierryvolpiatto authored
77 (define-key map (kbd "C-c ?") 'helm-moccur-help)
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
78 (delq nil map))
79 "Keymap used in Moccur source.")
e893ce3 @thierryvolpiatto * helm-regexp.el: Now Occur inherit source from multi-occur.
thierryvolpiatto authored
80
9f15d07 @thierryvolpiatto Add transformer function to multi occur.
thierryvolpiatto authored
81
3d768cc @thierryvolpiatto * helm-config.el: Move regexp and occur code to helm-regexp.el.
thierryvolpiatto authored
82 (defvar helm-build-regexp-history nil)
83 (defun helm-c-query-replace-regexp (candidate)
84 "Query replace regexp from `helm-regexp'.
85 With a prefix arg replace only matches surrounded by word boundaries,
86 i.e Don't replace inside a word, regexp is surrounded with \\bregexp\\b."
87 (let ((regexp (funcall (helm-attr 'regexp))))
88 (apply 'query-replace-regexp
89 (helm-c-query-replace-args regexp))))
90
91 (defun helm-c-kill-regexp-as-sexp (candidate)
92 "Kill regexp in a format usable in lisp code."
93 (helm-c-regexp-kill-new
94 (prin1-to-string (funcall (helm-attr 'regexp)))))
95
96 (defun helm-c-kill-regexp (candidate)
97 "Kill regexp as it is in `helm-pattern'."
98 (helm-c-regexp-kill-new (funcall (helm-attr 'regexp))))
99
100 (defun helm-c-query-replace-args (regexp)
101 "create arguments of `query-replace-regexp' action in `helm-regexp'."
102 (let ((region-only (helm-region-active-p)))
103 (list
104 regexp
105 (query-replace-read-to regexp
106 (format "Query replace %sregexp %s"
107 (if helm-current-prefix-arg "word " "")
108 (if region-only "in region " ""))
109 t)
110 helm-current-prefix-arg
111 (when region-only (region-beginning))
112 (when region-only (region-end)))))
113
114 (defvar helm-c-source-regexp
115 '((name . "Regexp Builder")
116 (init . (lambda ()
117 (helm-candidate-buffer helm-current-buffer)))
118 (candidates-in-buffer)
119 (get-line . helm-c-regexp-get-line)
120 (persistent-action . helm-c-regexp-persistent-action)
121 (persistent-help . "Show this line")
122 (multiline)
123 (delayed)
124 (requires-pattern . 2)
125 (mode-line . "Press TAB to select action.")
126 (regexp . (lambda () helm-input))
127 (action . (("Kill Regexp as sexp" . helm-c-kill-regexp-as-sexp)
128 ("Query Replace Regexp (C-u Not inside word.)"
129 . helm-c-query-replace-regexp)
130 ("Kill Regexp" . helm-c-kill-regexp)))))
131
132 (defun helm-c-regexp-get-line (s e)
133 (propertize
134 (apply 'concat
135 ;; Line contents
136 (format "%5d: %s" (line-number-at-pos (1- s)) (buffer-substring s e))
137 ;; subexps
138 (loop for i from 0 to (1- (/ (length (match-data)) 2))
139 collect (format "\n %s'%s'"
140 (if (zerop i) "Group 0: " (format "Group %d: " i))
141 (match-string i))))
142 ;; match beginning
143 ;; KLUDGE: point of helm-candidate-buffer is +1 than that of helm-current-buffer.
144 ;; It is implementation problem of candidates-in-buffer.
145 'helm-realvalue
146 (1- s)))
147
148 (defun helm-c-regexp-persistent-action (pt)
149 (helm-goto-char pt)
150 (helm-persistent-highlight-point))
151
152 (defun helm-c-regexp-kill-new (input)
153 (kill-new input)
154 (message "Killed: %s" input))
155
156 (defun helm-quote-whitespace (candidate)
157 "Quote whitespace, if some, in string CANDIDATE."
158 (replace-regexp-in-string " " "\\\\ " candidate))
159
e893ce3 @thierryvolpiatto * helm-regexp.el: Now Occur inherit source from multi-occur.
thierryvolpiatto authored
160
3d768cc @thierryvolpiatto * helm-config.el: Move regexp and occur code to helm-regexp.el.
thierryvolpiatto authored
161 ;;; Occur
162 ;;
163 ;;
e893ce3 @thierryvolpiatto * helm-regexp.el: Now Occur inherit source from multi-occur.
thierryvolpiatto authored
164 (defvar helm-c-source-occur nil)
75e2a0e @thierryvolpiatto * helm-regexp.el (helm-occur-init-source): new
thierryvolpiatto authored
165 (defun helm-occur-init-source ()
166 (unless helm-c-source-occur
167 (setq helm-c-source-occur (copy-alist helm-c-source-moccur))))
3d768cc @thierryvolpiatto * helm-config.el: Move regexp and occur code to helm-regexp.el.
thierryvolpiatto authored
168
f5d0706 @thierryvolpiatto * helm-config.el: Move browse-code to helm-regexp.el
thierryvolpiatto authored
169
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
170 ;;; Multi occur
171 ;;
172 ;;
173 (defun helm-m-occur-init (buffers)
c3fb0f0 @thierryvolpiatto * helm-grep.el (helm-c-goto-next-or-prec-file): always use helm-c-grep-s...
thierryvolpiatto authored
174 "Create the initial helm multi occur buffer with BUFFERS list."
175 (when helm-moccur-always-search-in-current
176 (setq buffers (cons helm-current-buffer
177 (remove helm-current-buffer buffers))))
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
178 (helm-init-candidates-in-buffer
c23a0af @thierryvolpiatto * helm.el (helm-init-candidates-in-buffer): Allow a symbol for BUFFER ar...
thierryvolpiatto authored
179 'global
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
180 (loop for buf in buffers
181 for bufstr = (with-current-buffer buf (buffer-string))
182 do (add-text-properties
183 0 (length bufstr)
184 `(buffer-name ,(buffer-name (get-buffer buf)))
185 bufstr)
186 concat bufstr)))
187
aaa5027 @thierryvolpiatto * helm-regexp.el (helm-m-occur-get-line): Don't recompute point-at-bol.
thierryvolpiatto authored
188 (defun helm-m-occur-get-line (beg end)
9f15d07 @thierryvolpiatto Add transformer function to multi occur.
thierryvolpiatto authored
189 "Format line for `helm-c-source-moccur'."
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
190 (format "%s:%d:%s"
aaa5027 @thierryvolpiatto * helm-regexp.el (helm-m-occur-get-line): Don't recompute point-at-bol.
thierryvolpiatto authored
191 (get-text-property beg 'buffer-name)
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
192 (save-restriction
9f15d07 @thierryvolpiatto Add transformer function to multi occur.
thierryvolpiatto authored
193 (narrow-to-region (previous-single-property-change
194 (point) 'buffer-name)
195 (next-single-property-change
196 (point) 'buffer-name))
aaa5027 @thierryvolpiatto * helm-regexp.el (helm-m-occur-get-line): Don't recompute point-at-bol.
thierryvolpiatto authored
197 (line-number-at-pos beg))
198 (buffer-substring beg end)))
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
199
200 (defun* helm-m-occur-action (candidate
201 &optional (method (quote buffer)))
9f15d07 @thierryvolpiatto Add transformer function to multi occur.
thierryvolpiatto authored
202 "Jump to CANDIDATE with METHOD.
203 arg METHOD can be one of buffer, buffer-other-window, buffer-other-frame."
c3fb0f0 @thierryvolpiatto * helm-grep.el (helm-c-goto-next-or-prec-file): always use helm-c-grep-s...
thierryvolpiatto authored
204 (require 'helm-grep)
205 (let* ((split (helm-c-grep-split-line candidate))
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
206 (buf (car split))
207 (lineno (string-to-number (nth 1 split))))
208 (case method
209 (buffer (switch-to-buffer buf))
210 (buffer-other-window (switch-to-buffer-other-window buf))
211 (buffer-other-frame (switch-to-buffer-other-frame buf)))
212 (helm-goto-line lineno)))
213
214 (defun helm-m-occur-goto-line (candidate)
9f15d07 @thierryvolpiatto Add transformer function to multi occur.
thierryvolpiatto authored
215 "From multi occur, switch to buffer and go to nth 1 CANDIDATE line."
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
216 (helm-m-occur-action candidate))
217
218 (defvar helm-c-source-moccur
219 `((name . "Moccur")
220 (init . (lambda ()
2019cde @thierryvolpiatto * helm-regexp.el (helm-c-source-moccur): Require grep at init for keymap...
thierryvolpiatto authored
221 (require 'helm-grep)
517b729 @thierryvolpiatto * helm-regexp.el (helm-c-source-moccur): Update delayed attr when modify...
thierryvolpiatto authored
222 (helm-m-occur-init buffers)
223 (helm-attrset 'delayed helm-m-occur-idle-delay)))
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
224 (candidates-in-buffer)
9f15d07 @thierryvolpiatto Add transformer function to multi occur.
thierryvolpiatto authored
225 (filtered-candidate-transformer . helm-m-occur-transformer)
226 (nohighlight)
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
227 (get-line . helm-m-occur-get-line)
bec9d22 @thierryvolpiatto Revert changes for migemo, add migemo attr to multi-occur.
thierryvolpiatto authored
228 (migemo)
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
229 (action . (("Go to Line" . helm-m-occur-goto-line)))
34b84d3 @thierryvolpiatto * helm-regexp.el (helm-c-source-moccur): Add persistent action.
thierryvolpiatto authored
230 (persistent-action . (lambda (candidate)
231 (helm-m-occur-goto-line candidate)
232 (helm-match-line-color-current-line)))
233 (persistent-help . "Go to line")
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
234 (recenter)
235 (candidate-number-limit . 9999)
b3194af @thierryvolpiatto Add help for moccur.
thierryvolpiatto authored
236 (mode-line . helm-moccur-mode-line)
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
237 (keymap . ,helm-c-moccur-map)
5d07ff9 @thierryvolpiatto * helm-regexp.el: Add history to multi occur.
thierryvolpiatto authored
238 (history . ,'helm-c-grep-history)
fb3195d @thierryvolpiatto * helm.el (helm-update): Allow giving an in-source value to delayed attr...
thierryvolpiatto authored
239 (requires-pattern . 3)
240 (delayed . ,helm-m-occur-idle-delay))
9f15d07 @thierryvolpiatto Add transformer function to multi occur.
thierryvolpiatto authored
241 "Helm source for multi occur.")
242
243 (defun helm-m-occur-transformer (candidates source)
244 "Transformer function for `helm-c-source-moccur'."
245 (require 'helm-grep)
246 (loop for i in candidates
c3fb0f0 @thierryvolpiatto * helm-grep.el (helm-c-goto-next-or-prec-file): always use helm-c-grep-s...
thierryvolpiatto authored
247 for split = (helm-c-grep-split-line i)
9f15d07 @thierryvolpiatto Add transformer function to multi occur.
thierryvolpiatto authored
248 for buf = (car split)
249 for lineno = (nth 1 split)
250 for str = (nth 2 split)
52f4fff @thierryvolpiatto * helm-regexp.el (helm-m-occur-transformer): Add an help-echo.
thierryvolpiatto authored
251 collect (cons (concat (propertize
252 buf
253 'face 'helm-moccur-buffer
254 'help-echo (buffer-file-name
255 (get-buffer buf))
256 'buffer-name buf)
9f15d07 @thierryvolpiatto Add transformer function to multi occur.
thierryvolpiatto authored
257 ":"
258 (propertize lineno 'face 'helm-grep-lineno)
259 ":"
260 (helm-c-grep-highlight-match str))
261 i)))
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
262
39c674b @thierryvolpiatto * helm-buffers.el (helm-multi-occur-as-action): Issue #103 Use @ input a...
thierryvolpiatto authored
263 (defun helm-multi-occur-1 (buffers &optional input)
9f15d07 @thierryvolpiatto Add transformer function to multi occur.
thierryvolpiatto authored
264 "Main function to call `helm-c-source-moccur' with BUFFERS list."
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
265 (declare (special buffers))
f16ddf3 @thierryvolpiatto * helm-regexp.el (helm-multi-occur-1): Unbind match plugin here.
thierryvolpiatto authored
266 (let ((helm-compile-source-functions
267 ;; rule out helm-match-plugin because the input is one regexp.
268 (delq 'helm-compile-source--match-plugin
269 (copy-sequence helm-compile-source-functions))))
270 (helm :sources 'helm-c-source-moccur
271 :buffer "*helm multi occur*"
39c674b @thierryvolpiatto * helm-buffers.el (helm-multi-occur-as-action): Issue #103 Use @ input a...
thierryvolpiatto authored
272 :history 'helm-c-grep-history
273 :input input)))
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
274
275
f5d0706 @thierryvolpiatto * helm-config.el: Move browse-code to helm-regexp.el
thierryvolpiatto authored
276 ;;; Helm browse code.
277 (defun helm-c-browse-code-get-line (beg end)
278 "Select line if it match the regexp corresponding to current `major-mode'.
279 Line is parsed for BEG position to END position."
280 (let ((str-line (buffer-substring beg end))
281 (regexp (assoc-default major-mode
282 helm-c-browse-code-regexp-alist))
283 (num-line (if (string= helm-pattern "") beg (1- beg))))
284 (when (and regexp (string-match regexp str-line))
285 (format "%4d:%s" (line-number-at-pos num-line) str-line))))
286
287 (defvar helm-c-source-browse-code
288 '((name . "Browse code")
289 (init . (lambda ()
290 (helm-candidate-buffer helm-current-buffer)
291 (with-helm-current-buffer
292 (jit-lock-fontify-now))))
293 (candidate-number-limit . 9999)
294 (candidates-in-buffer)
295 (get-line . helm-c-browse-code-get-line)
296 (type . line)
297 (recenter)))
298
0ea6be6 @thierryvolpiatto * helm-regexp.el (helm-c-display-to-real-numbered-line): Renamed from he...
thierryvolpiatto authored
299 (defun helm-c-display-to-real-numbered-line (candidate)
300 "This is used to display a line in occur style in helm sources.
301 e.g \" 12:some_text\".
302 It is used with type attribute 'line'."
303 (if (string-match "^ *\\([0-9]+\\):\\(.*\\)$" candidate)
304 (list (string-to-number (match-string 1 candidate))
305 (match-string 2 candidate))
306 (error "Line number not found")))
307
7974fc5 @thierryvolpiatto Create autoload system in helm-config.
thierryvolpiatto authored
308 ;;; Type attributes
309 ;;
310 ;;
311 (define-helm-type-attribute 'line
0ea6be6 @thierryvolpiatto * helm-regexp.el (helm-c-display-to-real-numbered-line): Renamed from he...
thierryvolpiatto authored
312 '((display-to-real . helm-c-display-to-real-numbered-line)
7974fc5 @thierryvolpiatto Create autoload system in helm-config.
thierryvolpiatto authored
313 (action ("Go to Line" . helm-c-action-line-goto)))
314 "LINENO:CONTENT string, eg. \" 16:foo\".
315
316 Optional `target-file' attribute is a name of target file.
317
318 Optional `before-jump-hook' attribute is a function with no
319 arguments which is called before jumping to position.
320
321 Optional `after-jump-hook' attribute is a function with no
322 arguments which is called after jumping to position.
323
324 If `adjust' attribute is specified, searches the line whose
325 content is CONTENT near the LINENO.
326
327 If `recenter' attribute is specified, the line is displayed at
328 the center of window, otherwise at the top of window.")
329
330 (define-helm-type-attribute 'file-line
331 `((filtered-candidate-transformer helm-c-filtered-candidate-transformer-file-line)
332 (multiline)
333 (action ("Go to" . helm-c-action-file-line-goto)))
334 "FILENAME:LINENO:CONTENT string, eg. \"~/.emacs:16:;; comment\".
335
336 Optional `default-directory' attribute is a default-directory
337 FILENAME is interpreted.
338
339 Optional `before-jump-hook' attribute is a function with no
340 arguments which is called before jumping to position.
341
342 Optional `after-jump-hook' attribute is a function with no
343 arguments which is called after jumping to position.
344
345 If `adjust' attribute is specified, searches the line whose
346 content is CONTENT near the LINENO.
347
348 If `recenter' attribute is specified, the line is displayed at
349 the center of window, otherwise at the top of window.")
350
f97a20c @thierryvolpiatto * helm-config.el: Move *find-files and related to helm-files.el
thierryvolpiatto authored
351 ;;;###autoload
352 (defun helm-regexp ()
353 "Preconfigured helm to build regexps.
354 `query-replace-regexp' can be run from there against found regexp."
355 (interactive)
356 (save-restriction
357 (let ((helm-compile-source-functions
358 ;; rule out helm-match-plugin because the input is one regexp.
359 (delq 'helm-compile-source--match-plugin
360 (copy-sequence helm-compile-source-functions))))
361 (when (and (helm-region-active-p)
362 ;; Don't narrow to region if buffer is already narrowed.
363 (not (helm-current-buffer-narrowed-p)))
364 (narrow-to-region (region-beginning) (region-end)))
365 (helm :sources helm-c-source-regexp
366 :buffer "*helm regexp*"
367 :prompt "Regexp: "
368 :history 'helm-build-regexp-history))))
369
e21f4c8 @thierryvolpiatto * helm-config.el: Move lisp completion code to helm-elisp.el
thierryvolpiatto authored
370 ;;;###autoload
371 (defun helm-occur ()
e893ce3 @thierryvolpiatto * helm-regexp.el: Now Occur inherit source from multi-occur.
thierryvolpiatto authored
372 "Preconfigured helm for Occur."
e21f4c8 @thierryvolpiatto * helm-config.el: Move lisp completion code to helm-elisp.el
thierryvolpiatto authored
373 (interactive)
e893ce3 @thierryvolpiatto * helm-regexp.el: Now Occur inherit source from multi-occur.
thierryvolpiatto authored
374 (declare (special buffers))
375 (let ((buffers (list (buffer-name (current-buffer))))
376 (helm-compile-source-functions
e21f4c8 @thierryvolpiatto * helm-config.el: Move lisp completion code to helm-elisp.el
thierryvolpiatto authored
377 ;; rule out helm-match-plugin because the input is one regexp.
378 (delq 'helm-compile-source--match-plugin
379 (copy-sequence helm-compile-source-functions))))
75e2a0e @thierryvolpiatto * helm-regexp.el (helm-occur-init-source): new
thierryvolpiatto authored
380 (helm-occur-init-source)
e893ce3 @thierryvolpiatto * helm-regexp.el: Now Occur inherit source from multi-occur.
thierryvolpiatto authored
381 (helm-attrset 'name "Occur" helm-c-source-occur)
e21f4c8 @thierryvolpiatto * helm-config.el: Move lisp completion code to helm-elisp.el
thierryvolpiatto authored
382 (helm :sources 'helm-c-source-occur
e893ce3 @thierryvolpiatto * helm-regexp.el: Now Occur inherit source from multi-occur.
thierryvolpiatto authored
383 :buffer "*helm occur*"
e21f4c8 @thierryvolpiatto * helm-config.el: Move lisp completion code to helm-elisp.el
thierryvolpiatto authored
384 :history 'helm-c-grep-history)))
385
f5d0706 @thierryvolpiatto * helm-config.el: Move browse-code to helm-regexp.el
thierryvolpiatto authored
386 ;;;###autoload
eddcd47 helm-multi-occur process interactive args in interactive form
Le Wang authored
387 (defun helm-multi-occur (buffers)
388 "Preconfigured helm for multi occur.
389
390 BUFFERS is a list of buffers to search through."
391 (interactive (list (helm-comp-read
392 "Buffers: " (helm-c-buffer-list)
393 :marked-candidates t)))
f16ddf3 @thierryvolpiatto * helm-regexp.el (helm-multi-occur-1): Unbind match plugin here.
thierryvolpiatto authored
394 (helm-multi-occur-1 buffers))
7288a9a @thierryvolpiatto Introduce multi occur.
thierryvolpiatto authored
395
396 ;;;###autoload
f5d0706 @thierryvolpiatto * helm-config.el: Move browse-code to helm-regexp.el
thierryvolpiatto authored
397 (defun helm-browse-code ()
398 "Preconfigured helm to browse code."
399 (interactive)
400 (helm :sources 'helm-c-source-browse-code
401 :buffer "*helm browse code*"
402 :default (thing-at-point 'symbol)))
403
404
3d768cc @thierryvolpiatto * helm-config.el: Move regexp and occur code to helm-regexp.el.
thierryvolpiatto authored
405 (provide 'helm-regexp)
406
37b4201 @thierryvolpiatto Fix dependencies and autoloads. Reorder.
thierryvolpiatto authored
407 ;; Local Variables:
a7ee65b @thierryvolpiatto Disable compile warnings and add new keyword to helm.
thierryvolpiatto authored
408 ;; byte-compile-warnings: (not cl-functions obsolete)
37b4201 @thierryvolpiatto Fix dependencies and autoloads. Reorder.
thierryvolpiatto authored
409 ;; coding: utf-8
410 ;; indent-tabs-mode: nil
411 ;; byte-compile-dynamic: t
412 ;; End:
413
3d768cc @thierryvolpiatto * helm-config.el: Move regexp and occur code to helm-regexp.el.
thierryvolpiatto authored
414 ;;; helm-regexp.el ends here
Something went wrong with that request. Please try again.