From: Nicolas Richard Date: Fri, 3 Apr 2015 10:28:40 +0000 (+0200) Subject: pcmpl-ssh-known-hosts: Use `char-before' instead of `looking-back'. X-Git-Tag: emacs-25.0.90~2564^2~15 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7c691f32f78303750d29972a29dcc6754fae257a;p=emacs.git 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'. --- 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)))))