Handle comments in eshell-read-hosts-file (tiny change)
* lisp/eshell/esh-util.el (eshell-read-hosts-file): Skip comment lines. Fixes: debbugs:10549
This commit is contained in:
parent
f088cb8b2f
commit
802a2ae21f
2 changed files with 6 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2012-01-23 Mike Lamb <mrlamb@gmail.com> (tiny change)
|
||||
|
||||
* eshell/esh-util.el (eshell-read-hosts-file):
|
||||
Skip comment lines. (Bug#10549)
|
||||
|
||||
2012-01-23 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* subr.el (display-delayed-warnings): Doc fix.
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ list."
|
|||
(insert-file-contents eshell-hosts-file)
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward
|
||||
"^\\(\\S-+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t)
|
||||
"^\\([^#[:space:]]+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t)
|
||||
(if (match-string 1)
|
||||
(add-to-list 'hosts (match-string 1)))
|
||||
(if (match-string 2)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue