summaryrefslogtreecommitdiff
path: root/lisp/proced.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/proced.el')
-rw-r--r--lisp/proced.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/proced.el b/lisp/proced.el
index b3c8e2cb698..5f35fa34a07 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -1348,7 +1348,7 @@ Prefix ARG controls sort order, see `proced-sort-interactive'."
(defun proced-format-time (time)
"Format time interval TIME."
- (let* ((ftime (float-time time))
+ (let* ((ftime (encode-time time 'integer))
(days (truncate ftime 86400))
(ftime (mod ftime 86400))
(hours (truncate ftime 3600))
@@ -1367,12 +1367,12 @@ Prefix ARG controls sort order, see `proced-sort-interactive'."
The return string is always 6 characters wide."
(let ((d-start (decode-time start))
(d-current (decode-time)))
- (cond ( ;; process started in previous years
- (< (nth 5 d-start) (nth 5 d-current))
+ (cond (;; process started in previous years
+ (< (decoded-time-year d-start) (decoded-time-year d-current))
(format-time-string " %Y" start))
;; process started today
- ((and (= (nth 3 d-start) (nth 3 d-current))
- (= (nth 4 d-start) (nth 4 d-current)))
+ ((and (= (decoded-time-day d-start) (decoded-time-day d-current))
+ (= (decoded-time-month d-start) (decoded-time-month d-current)))
(format-time-string " %H:%M" start))
(t ;; process started this year
(format-time-string "%b %e" start)))))
@@ -1744,9 +1744,10 @@ The value returned is the value of the last form in BODY."
(save-window-excursion
;; Analogous to `dired-pop-to-buffer'
;; Don't split window horizontally. (Bug#1806)
- (let (split-width-threshold)
- (pop-to-buffer (current-buffer)))
- (fit-window-to-buffer (get-buffer-window) nil 1)
+ (display-buffer (current-buffer)
+ '(display-buffer-in-direction
+ (direction . bottom)
+ (window-height . fit-window-to-buffer)))
,@body))))
(defun proced-send-signal (&optional signal process-alist)