From 7c691f32f78303750d29972a29dcc6754fae257a Mon Sep 17 00:00:00 2001 From: Nicolas Richard Date: Fri, 3 Apr 2015 12:28:40 +0200 Subject: [PATCH] pcmpl-ssh-known-hosts: Use `char-before' instead of `looking-back'. Fixes: debbugs:17284 * lisp/pcmpl-unix.el (pcmpl-ssh-known-hosts): Use `char-before' instead of `looking-back'. --- lisp/ChangeLog | 5 +++++ lisp/pcmpl-unix.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b004a2bba96..7a4293b16ef 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-04-03 Nicolas Richard + + * pcmpl-unix.el (pcmpl-ssh-known-hosts): Use `char-before' instead + of `looking-back' (bug#17284). + 2015-04-03 Dmitry Gutov * progmodes/js.el (js-indent-line): Do nothing when bol is inside diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el index 3598cd64b46..7be57e9c93a 100644 --- a/lisp/pcmpl-unix.el +++ b/lisp/pcmpl-unix.el @@ -157,7 +157,7 @@ documentation), this function returns nil." (while (re-search-forward (concat "^ *" host-re) nil t) (add-to-list 'ssh-hosts-list (concat (match-string 1) (match-string 2))) - (while (and (looking-back ",") + (while (and (eq (char-before) ?,) (re-search-forward host-re (line-end-position) t)) (add-to-list 'ssh-hosts-list (concat (match-string 1) (match-string 2))))) -- 2.39.5