summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-02-08 10:47:07 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2013-02-08 10:47:07 -0500
commit1a60168030ae1f7ddc9c004a19d73758b97bc029 (patch)
tree91e7b532c6a21f72ef4bd2ae814c1ebbf3a81448 /lisp
parent276a61a690dce8e4d1ecd5da1a964792c6e5754e (diff)
downloademacs-1a60168030ae1f7ddc9c004a19d73758b97bc029.tar.gz
* lisp/eshell/esh-proc.el (eshell/kill): Fix last change.
* lisp/eshell/em-ls.el (eshell-ls-dir): Fix use of CL in last change.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/eshell/em-ls.el11
-rw-r--r--lisp/eshell/esh-proc.el53
3 files changed, 35 insertions, 34 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9bcb53cd066..59b0ca370c4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * eshell/esh-proc.el (eshell/kill): Fix last change.
+ * eshell/em-ls.el (eshell-ls-dir): Fix use of CL in last change.
+
2013-02-08 Aidan Gauland <aidalgol@no8wireless.co.nz>
* eshell/esh-proc.el (eshell/kill): Rewrite.
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index eb24d8da0b6..73ed617b871 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -26,9 +26,8 @@
;;; Code:
-(eval-when-compile
- (require 'cl-lib)
- (require 'eshell))
+(eval-when-compile (require 'eshell))
+(require 'cl-lib)
(require 'esh-util)
(require 'esh-opt)
@@ -564,11 +563,9 @@ relative to that directory."
(when (and show-almost-all
(not show-all))
(setq entries
- (remove-if
+ (cl-remove-if
(lambda (entry)
- (let ((filename (caar entry)))
- (or (string= filename ".")
- (string= filename ".."))))
+ (member (caar entry) '("." "..")))
entries)))
(when (and (not show-all)
eshell-ls-exclude-regexp)
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 81ca2182488..aa630dc87aa 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -170,33 +170,32 @@ Usage: kill [-<signal>] <pid>|<process> ...
Accepts PIDs and process objects."
;; If the first argument starts with a dash, treat it as the signal
;; specifier.
-(let ((signum 'SIGINT))
- (let ((arg (car args))
- (case-fold-search nil))
- (when (stringp arg)
- (cond
- ((string-match "^-[[:digit:]]+$" arg)
- (setq signum (abs (string-to-number arg)))
- ((or (string-match "^-[[:upper:]]+$" arg)
- (string-match "^-[[:lower:]]+$" arg))
- (setq signum (abs (string-to-number arg))))))
- (setq args (cdr args))))
- (while args
- (let ((arg (if (eshell-processp (car args))
- (process-id (car args))
- (car args))))
- (when arg
- (cond
- ((null arg)
- (error "kill: null pid. Process may actually be a network connection."))
- ((not (numberp arg))
- (error "kill: invalid argument type: %s" (type-of arg)))
- ((and (numberp arg)
- (<= arg 0))
- (error "kill: bad pid: %d" arg))
- (t
- (signal-process arg signum)))))
- (setq args (cdr args))))
+ (let ((signum 'SIGINT))
+ (let ((arg (car args))
+ (case-fold-search nil))
+ (when (stringp arg)
+ (cond
+ ((string-match "\\`-[[:digit:]]+\\'" arg)
+ (setq signum (abs (string-to-number arg))))
+ ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg)
+ (setq signum (abs (string-to-number arg)))))
+ (setq args (cdr args))))
+ (while args
+ (let ((arg (if (eshell-processp (car args))
+ (process-id (car args))
+ (car args))))
+ (when arg
+ (cond
+ ((null arg)
+ (error "kill: null pid. Process may actually be a network connection."))
+ ((not (numberp arg))
+ (error "kill: invalid argument type: %s" (type-of arg)))
+ ((and (numberp arg)
+ (<= arg 0))
+ (error "kill: bad pid: %d" arg))
+ (t
+ (signal-process arg signum)))))
+ (setq args (cdr args))))
nil)
(defun eshell-read-process-name (prompt)