X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/09d9db2c4921cb2eb0974892164dd03d6bffdd80..7cef3569a3d872ea5be07a529b68910bf1d8b790:/lisp/eshell/esh-util.el diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 424d246a2b..8218e91ddc 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -1,6 +1,6 @@ ;;; esh-util.el --- general utilities -;; Copyright (C) 1999-2011 Free Software Foundation, Inc. +;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; Author: John Wiegley @@ -81,7 +81,7 @@ Setting this to nil is offered as an aid to debugging only." Numeric form is tested using the regular expression `eshell-number-regexp'. -NOTE: If you find that numeric conversions are intefering with the +NOTE: If you find that numeric conversions are interfering with the specification of filenames (for example, in calling `find-file', or some other Lisp function that deals with files, not numbers), add the following in your .emacs file: @@ -140,14 +140,13 @@ function `string-to-number'." (defmacro eshell-condition-case (tag form &rest handlers) "If `eshell-handle-errors' is non-nil, this is `condition-case'. Otherwise, evaluates FORM with no error handling." + (declare (indent 2)) (if eshell-handle-errors `(condition-case ,tag ,form ,@handlers) form)) -(put 'eshell-condition-case 'lisp-indent-function 2) - (defun eshell-find-delimiter (open close &optional bound reverse-p backslash-p) "From point, find the CLOSE delimiter corresponding to OPEN. @@ -275,14 +274,14 @@ Prepend remote identification of `default-directory', if any." text)) (defmacro eshell-for (for-var for-list &rest forms) - "Iterate through a list" + "Iterate through a list." + (declare (indent 2)) `(let ((list-iter ,for-list)) (while list-iter (let ((,for-var (car list-iter))) ,@forms) (setq list-iter (cdr list-iter))))) -(put 'eshell-for 'lisp-indent-function 2) (make-obsolete 'eshell-for 'dolist "24.1") @@ -484,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)