aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Lamb2012-01-23 00:12:10 -0800
committerGlenn Morris2012-01-23 00:12:10 -0800
commit802a2ae21ff07fa801aa8de843a9b9d496fb459a (patch)
treeed7a4036c0e132b7c1e63212062a77c593ab0a05
parentf088cb8b2feeea6989e1491029096e0c35577f06 (diff)
downloademacs-802a2ae21ff07fa801aa8de843a9b9d496fb459a.tar.gz
emacs-802a2ae21ff07fa801aa8de843a9b9d496fb459a.zip
Handle comments in eshell-read-hosts-file (tiny change)
* lisp/eshell/esh-util.el (eshell-read-hosts-file): Skip comment lines. Fixes: debbugs:10549
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/eshell/esh-util.el2
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 96c18714709..297043fa12b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-01-23 Mike Lamb <mrlamb@gmail.com> (tiny change)
2
3 * eshell/esh-util.el (eshell-read-hosts-file):
4 Skip comment lines. (Bug#10549)
5
12012-01-23 Juanma Barranquero <lekktu@gmail.com> 62012-01-23 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * subr.el (display-delayed-warnings): Doc fix. 8 * subr.el (display-delayed-warnings): Doc fix.
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index f111fd91230..8218e91ddc7 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -483,7 +483,7 @@ list."
483 (insert-file-contents eshell-hosts-file) 483 (insert-file-contents eshell-hosts-file)
484 (goto-char (point-min)) 484 (goto-char (point-min))
485 (while (re-search-forward 485 (while (re-search-forward
486 "^\\(\\S-+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t) 486 "^\\([^#[:space:]]+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t)
487 (if (match-string 1) 487 (if (match-string 1)
488 (add-to-list 'hosts (match-string 1))) 488 (add-to-list 'hosts (match-string 1)))
489 (if (match-string 2) 489 (if (match-string 2)