summaryrefslogtreecommitdiff
path: root/helm-dabbrev.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-08-26 04:48:01 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-08-26 04:48:01 +0200
commit358328e5f0d8be60b791cdd1480e61ba4747f458 (patch)
tree1062bcaeea5f1d7013fcd36ea7f032fae323690e /helm-dabbrev.el
parenta11ce55dd4e2faf3ee66ebd731670d15cb0a1bd8 (diff)
Rename helm--dabbrev--search (fix typo) and add docstring
* helm-dabbrev.el (helm-dabbrev--collect): Do it. (helm-dabbrev--search): Do it.
Diffstat (limited to 'helm-dabbrev.el')
-rw-r--r--helm-dabbrev.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/helm-dabbrev.el b/helm-dabbrev.el
index 19a5481b..dc1c525e 100644
--- a/helm-dabbrev.el
+++ b/helm-dabbrev.el
@@ -160,7 +160,7 @@ but the initial search for all candidates in buffer(s)."
(let* ((pbeg (match-beginning 0))
(replace-regexp (concat "\\(" helm-dabbrev-separator-regexp
"\\)\\'"))
- (match-word (helm--dabbrev--search
+ (match-word (helm-dabbrev--search
pattern pbeg replace-regexp)))
(unless (member match-word result)
(push match-word result)))))))
@@ -190,7 +190,14 @@ but the initial search for all candidates in buffer(s)."
when (> (length result) limit) return (nreverse result)
finally return (nreverse result))))
-(defun helm--dabbrev--search (pattern beg sep-regexp)
+(defun helm-dabbrev--search (pattern beg sep-regexp)
+ "Search word or symbol at point matching PATTERN.
+Argument BEG is corresponding to the previous match-beginning search.
+The search starts at (1- BEG) with a regexp starting with
+`helm-dabbrev-separator-regexp' followed by PATTERN followed by a
+regexp matching syntactically any word or symbol.
+The possible false positives matching SEP-REGEXP at end are finally
+removed."
(let ((eol (point-at-eol)))
(save-excursion
(goto-char (1- beg))