From 81e3b4fbdbea188315265fcf8e7e9d24dfe11fdc Mon Sep 17 00:00:00 2001 From: Thierry Volpiatto Date: Mon, 11 May 2015 07:39:30 +0200 Subject: [PATCH] Fix limit of looking-back to 1 before point. * helm-elisp.el: Do it. * helm-eshell.el: Do it. * helm-eval.el: Do it. --- helm-elisp.el | 4 ++-- helm-eshell.el | 4 ++-- helm-eval.el | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helm-elisp.el b/helm-elisp.el index 7961be710..8bef99c0b 100644 --- a/helm-elisp.el +++ b/helm-elisp.el @@ -356,7 +356,7 @@ If SYM is not documented, return \"Not documented\"." (end-of-line) (search-backward tap (point-at-bol) t) (setq beg (point)) - (looking-back "[^'`( ]" 1))) + (looking-back "[^'`( ]" (1- (point))))) (expand-file-name (substring-no-properties tap)))) (end (point)) @@ -390,7 +390,7 @@ Filename completion happen if string start after or between a double quote." (if (and tap (save-excursion (end-of-line) (search-backward tap (point-at-bol) t) - (looking-back "[^'`( ]" 1))) + (looking-back "[^'`( ]" (1- (point))))) (helm-complete-file-name-at-point) (helm-lisp-completion-at-point)))) diff --git a/helm-eshell.el b/helm-eshell.el index 7b164a0b3..2b0deed93 100644 --- a/helm-eshell.el +++ b/helm-eshell.el @@ -178,7 +178,7 @@ The function that call this should set `helm-ec-target' to thing at point." (args (catch 'eshell-incomplete (eshell-parse-arguments beg end))) (target - (or (and (looking-back " " 1) " ") + (or (and (looking-back " " (1- (point))) " ") (buffer-substring-no-properties (save-excursion (eshell-backward-argument 1) (point)) @@ -232,7 +232,7 @@ The function that call this should set `helm-ec-target' to thing at point." :resume 'noresume :input input)) (when (and flag-empty - (looking-back " " 1)) + (looking-back " " (1- (point)))) (delete-char -1))))) (provide 'helm-eshell) diff --git a/helm-eval.el b/helm-eval.el index 183c570ba..1c61107c8 100644 --- a/helm-eval.el +++ b/helm-eval.el @@ -118,7 +118,7 @@ Should take one arg: the string to display." (when (member buf helm-eldoc-active-minibuffers-list) (with-current-buffer buf (let* ((sym (save-excursion - (unless (looking-back ")\\|\"" 1) + (unless (looking-back ")\\|\"" (1- (point))) (forward-char -1)) (eldoc-current-symbol))) (info-fn (eldoc-fnsym-in-current-sexp))