Browse files

* helm.el (helm-init-candidates-in-buffer): Allow a symbol for BUFFER…

… arg.
  • Loading branch information...
1 parent 750af58 commit c23a0afeca00f06eac6d3d3b20d5e97ae4c1baf4 @thierryvolpiatto thierryvolpiatto committed Aug 17, 2012
Showing with 9 additions and 3 deletions.
  1. +1 −1 helm-regexp.el
  2. +8 −2 helm.el
2 helm-regexp.el
@@ -208,7 +208,7 @@ i.e Don't replace inside a word, regexp is surrounded with \\bregexp\\b."
(defun helm-m-occur-init (buffers)
"Create the initial helm multi occur buffer."
- "*hmoccur*"
+ 'global
(loop for buf in buffers
for bufstr = (with-current-buffer buf (buffer-string))
do (add-text-properties
10 helm.el
@@ -2931,8 +2931,14 @@ Acceptable values of CREATE-OR-BUFFER:
(defun helm-init-candidates-in-buffer (buffer data)
"Register BUFFER with DATA for an helm candidates-in-buffer session.
-DATA can be a list or a plain string."
- (let ((buf (helm-candidate-buffer (get-buffer-create buffer))))
+arg BUFFER can be a string, a buffer object (bufferp), or a symbol,
+in this case 'global arg is passed to `helm-candidate-buffer'.
+arg DATA can be either a list or a plain string."
+ (let ((buf (helm-candidate-buffer
+ (if (or (stringp buffer)
+ (bufferp buffer))
+ (get-buffer-create buffer)
+ 'global))))
(with-current-buffer buf
(if (listp data)

0 comments on commit c23a0af

Please sign in to comment.