]> code.delx.au - gnu-emacs/blobdiff - lisp/proced.el
Merge from origin/emacs-24
[gnu-emacs] / lisp / proced.el
index be6cae2ef0827a9ec81e08b70889a5a67bdb85a5..69355ab044aae5082597cf5e94421dd2e2bf993b 100644 (file)
@@ -1,6 +1,6 @@
 ;;; proced.el --- operate on system processes like dired
 
-;; Copyright (C) 2008-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2015 Free Software Foundation, Inc.
 
 ;; Author: Roland Winkler <winkler@gnu.org>
 ;; Keywords: Processes, Unix
@@ -49,8 +49,6 @@
 
 ;;; Code:
 
-(require 'time-date)                 ; for `with-decoded-time-value'
-
 (defgroup proced nil
   "Proced mode."
   :group 'processes
@@ -68,6 +66,7 @@ the external command (usually \"kill\")."
 (defcustom proced-renice-command "renice"
   "Name of renice command."
   :group 'proced
+  :version "24.3"
   :type '(string :tag "command"))
 
 (defcustom proced-signal-list
@@ -1185,17 +1184,8 @@ Return nil otherwise."
 (defun proced-time-lessp (t1 t2)
   "Return t if time value T1 is less than time value T2.
 Return `equal' if T1 equals T2.  Return nil otherwise."
-  (with-decoded-time-value ((high1 low1 micro1 pico1 type1 t1)
-                           (high2 low2 micro2 pico2 type2 t2))
-    (cond ((< high1 high2))
-          ((< high2 high1) nil)
-          ((< low1 low2))
-          ((< low2 low1) nil)
-          ((< micro1 micro2))
-          ((< micro2 micro1) nil)
-         ((< pico1 pico2))
-         ((< pico2 pico1) nil)
-          (t 'equal))))
+  (or (time-less-p t1 t2)
+      (if (not (time-less-p t2 t1)) 'equal)))
 
 ;;; Sorting
 
@@ -1784,7 +1774,7 @@ supported but discouraged.  It will be removed in a future version of Emacs."
              process-alist))))
 
   (unless (and signal process-alist)
-    ;; Discouraged usge (supported for backward compatibility):
+    ;; Discouraged usage (supported for backward compatibility):
     ;; The new calling sequence separates more cleanly between the parts
     ;; of the code required for interactive and noninteractive calls so that
     ;; the command can be used more flexibly in noninteractive ways, too.