Skip to content

Commit

Permalink
Use buffer-substring-no-properties in helm-moccur (emacs-helm#1815)
Browse files Browse the repository at this point in the history
to make faster initialisation of the candidate buffer.

* helm-regexp.el (helm-moccur-init):        Do it.
(helm-moccur-mode--revert-buffer-function): Do it.
  • Loading branch information
Thierry Volpiatto committed Jul 12, 2017
1 parent 685a49f commit 7614ade
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions helm-regexp.el
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ i.e Don't replace inside a word, regexp is surrounded with \\bregexp\\b."
(concat (if (memql (char-after (point-min))
'(? ?\t ?\n))
"" " ")
(buffer-string)))
(buffer-substring-no-properties
(point-min) (point-max))))
do (add-text-properties
0 (length bufstr)
`(buffer-name ,(buffer-name (get-buffer buf)))
Expand Down Expand Up @@ -561,7 +562,8 @@ Special commands:
(cl-loop for buf in buflst
for bufstr = (or (and (buffer-live-p (get-buffer buf))
(with-current-buffer buf
(buffer-string)))
(buffer-substring-no-properties
(point-min) (point-max))))
"")
unless (string= bufstr "")
do (add-text-properties
Expand Down

0 comments on commit 7614ade

Please sign in to comment.