summaryrefslogtreecommitdiff
path: root/helm-dabbrev.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2018-07-25 12:36:10 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2018-07-25 12:36:10 +0200
commit1239e8062ac0848e819306379761b4642ee6a733 (patch)
tree1d8543e1cb18011e7c0055662233a36c02aa1a30 /helm-dabbrev.el
parenteb33702194e5cd87ffe71f18b34bbab1b6301151 (diff)
Fix helm-dabbrev with single candidate
* helm-dabbrev.el (helm-dabbrev): Do it.
Diffstat (limited to 'helm-dabbrev.el')
-rw-r--r--helm-dabbrev.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/helm-dabbrev.el b/helm-dabbrev.el
index 53444706..c46f8a51 100644
--- a/helm-dabbrev.el
+++ b/helm-dabbrev.el
@@ -253,7 +253,7 @@ removed."
beg end candidate))))
;;;###autoload
-(defun helm-dabbrev ()
+(cl-defun helm-dabbrev ()
"Preconfigured helm for dynamic abbreviations."
(interactive)
(let ((dabbrev (helm-thing-before-point nil helm-dabbrev-separator-regexp))
@@ -337,6 +337,9 @@ removed."
(when (and (fboundp 'thread-join)
(thread-alive-p helm-dabbrev--current-thread))
(thread-join helm-dabbrev--current-thread))
+ (when (and (null cycling-disabled-p) only-one)
+ (cl-return-from helm-dabbrev
+ (message "[Helm-dabbrev: No expansion found]")))
(with-helm-show-completion (car limits) (cdr limits)
(unwind-protect
(helm :sources (helm-build-in-buffer-source "Dabbrev Expand"