summaryrefslogtreecommitdiff
path: root/lisp/proced.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-12-01 20:15:52 +0200
committerEli Zaretskii <eliz@gnu.org>2022-12-01 20:15:52 +0200
commit9c58ea37afc044a49fdd59fb4d1b8b6dd2d49ca9 (patch)
treea590b1156e35f51a158fd515f5bb96ec7dee64e9 /lisp/proced.el
parent0c1495574a14b9131a0c0a8ef126976393a00e3d (diff)
downloademacs-9c58ea37afc044a49fdd59fb4d1b8b6dd2d49ca9.tar.gz
; Fix last change in proced.el
* lisp/proced.el (proced-low-memory-usage-threshold) (proced-medium-memory-usage-threshold, proced-run-status-code) (proced-interruptible-sleep-status-code) (proced-uninterruptible-sleep-status-code, proced-executable): Fix doc strings. (proced-format-time): Simplify the format, to avoid bogus warnings from the byte-compiler. * etc/NEWS: Move Proced entries to one place and fix their wording.
Diffstat (limited to 'lisp/proced.el')
-rw-r--r--lisp/proced.el91
1 files changed, 55 insertions, 36 deletions
diff --git a/lisp/proced.el b/lisp/proced.el
index f91d3d2f223..c7419288edf 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -114,38 +114,55 @@ the external command (usually \"kill\")."
(defcustom proced-grammar-alist
'( ;; attributes defined in `process-attributes'
(euid "EUID" "%d" right proced-< nil (euid pid) (nil t nil))
- (user "User" proced-format-user left proced-string-lessp nil (user pid) (nil t nil))
+ (user "User" proced-format-user left proced-string-lessp nil
+ (user pid) (nil t nil))
(egid "EGID" "%d" right proced-< nil (egid euid pid) (nil t nil))
- (group "Group" nil left proced-string-lessp nil (group user pid) (nil t nil))
+ (group "Group" nil left proced-string-lessp nil (group user pid)
+ (nil t nil))
(comm "Command" nil left proced-string-lessp nil (comm pid) (nil t nil))
- (state "Stat" proced-format-state left proced-string-lessp nil (state pid) (nil t nil))
+ (state "Stat" proced-format-state left proced-string-lessp nil
+ (state pid) (nil t nil))
(ppid "PPID" proced-format-ppid right proced-< nil (ppid pid)
- ((lambda (ppid) (proced-filter-parents proced-process-alist ppid))
- "refine to process parents"))
- (pgrp "PGrp" proced-format-pgrp right proced-< nil (pgrp euid pid) (nil t nil))
- (sess "Sess" proced-format-sess right proced-< nil (sess pid) (nil t nil))
- (ttname "TTY" proced-format-ttname left proced-string-lessp nil (ttname pid) (nil t nil))
+ ((lambda (ppid)
+ (proced-filter-parents proced-process-alist ppid))
+ "refine to process parents"))
+ (pgrp "PGrp" proced-format-pgrp right proced-< nil (pgrp euid pid)
+ (nil t nil))
+ (sess "Sess" proced-format-sess right proced-< nil (sess pid)
+ (nil t nil))
+ (ttname "TTY" proced-format-ttname left proced-string-lessp nil
+ (ttname pid) (nil t nil))
(tpgid "TPGID" "%d" right proced-< nil (tpgid pid) (nil t nil))
(minflt "MinFlt" "%d" right proced-< nil (minflt pid) (nil t t))
(majflt "MajFlt" "%d" right proced-< nil (majflt pid) (nil t t))
(cminflt "CMinFlt" "%d" right proced-< nil (cminflt pid) (nil t t))
(cmajflt "CMajFlt" "%d" right proced-< nil (cmajflt pid) (nil t t))
- (utime "UTime" proced-format-time right proced-time-lessp t (utime pid) (nil t t))
- (stime "STime" proced-format-time right proced-time-lessp t (stime pid) (nil t t))
- (time "Time" proced-format-time right proced-time-lessp t (time pid) (nil t t))
- (cutime "CUTime" proced-format-time right proced-time-lessp t (cutime pid) (nil t t))
- (cstime "CSTime" proced-format-time right proced-time-lessp t (cstime pid) (nil t t))
- (ctime "CTime" proced-format-time right proced-time-lessp t (ctime pid) (nil t t))
+ (utime "UTime" proced-format-time right proced-time-lessp t (utime pid)
+ (nil t t))
+ (stime "STime" proced-format-time right proced-time-lessp t (stime pid)
+ (nil t t))
+ (time "Time" proced-format-time right proced-time-lessp t (time pid)
+ (nil t t))
+ (cutime "CUTime" proced-format-time right proced-time-lessp t (cutime pid)
+ (nil t t))
+ (cstime "CSTime" proced-format-time right proced-time-lessp t (cstime pid)
+ (nil t t))
+ (ctime "CTime" proced-format-time right proced-time-lessp t (ctime pid)
+ (nil t t))
(pri "Pr" "%d" right proced-< t (pri pid) (nil t t))
(nice "Ni" "%3d" 3 proced-< t (nice pid) (t t nil))
(thcount "THCount" "%d" right proced-< t (thcount pid) (nil t t))
- (start "Start" proced-format-start 6 proced-time-lessp nil (start pid) (t t nil))
- (vsize "VSize" proced-format-memory right proced-< t (vsize pid) (nil t t))
+ (start "Start" proced-format-start 6 proced-time-lessp nil (start pid)
+ (t t nil))
+ (vsize "VSize" proced-format-memory right proced-< t (vsize pid)
+ (nil t t))
(rss "RSS" proced-format-rss right proced-< t (rss pid) (nil t t))
- (etime "ETime" proced-format-time right proced-time-lessp t (etime pid) (nil t t))
+ (etime "ETime" proced-format-time right proced-time-lessp t (etime pid)
+ (nil t t))
(pcpu "%CPU" proced-format-cpu right proced-< t (pcpu pid) (nil t t))
(pmem "%Mem" proced-format-mem right proced-< t (pmem pid) (nil t t))
- (args "Args" proced-format-args left proced-string-lessp nil (args pid) (nil t nil))
+ (args "Args" proced-format-args left proced-string-lessp nil
+ (args pid) (nil t nil))
;;
;; attributes defined by proced (see `proced-process-attributes')
(pid "PID" proced-format-pid right proced-< nil (pid)
@@ -373,23 +390,23 @@ May be used to revert the process listing."
:version "29.1")
(defcustom proced-low-memory-usage-threshold 0.1
- "The upper bound for low memory usage, relative to total memory.
+ "The upper bound for low relative memory usage display in Proced.
-When `proced-enable-color-flag' is non-nil, RSS values denoting a proportion
-of memory lower than this value will be displayed using the
-`proced-memory-low-usage' face."
+When `proced-enable-color-flag' is non-nil, RSS values denoting a
+proportion of memory, relative to total memory, that is lower
+than this value will be displayed using the `proced-memory-low-usage' face."
:type 'float
:version "29.1")
(defcustom proced-medium-memory-usage-threshold 0.5
- "The upper bound for medium memory usage, relative to total memory.
-
-When `proced-enable-color-flag' is non-nil, RSS values denoting a proportion
-of memory less than this value, but greater than
-`proced-low-memory-usage-threshold', will be displayed using the
-`proced-memory-medium-usage' face. RSS values denoting a greater proportion
-than this value will be displayed using the `proced-memory-high-usage'
-face."
+ "The upper bound for medium relative memory usage display in Proced.
+
+When `proced-enable-color-flag' is non-nil, RSS values denoting a
+proportion of memory, relative to total memory, that is less than
+this value, but greater than `proced-low-memory-usage-threshold',
+will be displayed using the `proced-memory-medium-usage' face.
+RSS values denoting a greater proportion than this value will be
+displayed using the `proced-memory-high-usage' face."
:type 'float
:version "29.1")
@@ -431,19 +448,19 @@ It is a list of lists (KEY PREDICATE REVERSE).")
(defface proced-run-status-code
'((t (:foreground "green")))
- "Face used in Proced buffers for the running or runnable status code character \"R\"."
+ "Face used in Proced buffers for running or runnable status code character \"R\"."
:version "29.1")
(defface proced-interruptible-sleep-status-code
'((((class color) (min-colors 88)) (:foreground "DimGrey"))
(t (:italic t)))
- "Face used in Proced buffers for the interruptible sleep status code character \"S\"."
+ "Face used in Proced buffers for interruptible sleep status code character \"S\"."
:version "29.1")
(defface proced-uninterruptible-sleep-status-code
'((((class color)) (:foreground "red"))
(t (:bold t)))
- "Face used in Proced buffers for the uninterruptible sleep status code character \"D\"."
+ "Face used in Proced buffers for uninterruptible sleep status code character \"D\"."
:version "29.1")
(defface proced-executable
@@ -451,7 +468,9 @@ It is a list of lists (KEY PREDICATE REVERSE).")
(((class color) (background dark)) (:foreground "cyan"))
(((class color) (background light)) (:foreground "blue"))
(t (:bold t)))
- "Face used in Proced buffers for executables (first word in the args process attribute)."
+ "Face used in Proced buffers for executable names.
+The first word in the process arguments attribute is assumed to
+be the executable that runs in the process."
:version "29.1")
(defface proced-memory-high-usage
@@ -1529,9 +1548,9 @@ Prefix ARG controls sort order, see `proced-sort-interactive'."
(propertize ":" 'font-lock-face 'proced-time-colon)
":")))
(cond ((< 0 days)
- (format "%d-%02d%3$s%02d%3$s%02d" days hours colon minutes seconds))
+ (format "%d-%02d%s%02d%s%02d" days hours colon minutes colon seconds))
((< 0 hours)
- (format "%02d%2$s%02d%2$s%02d" hours colon minutes seconds))
+ (format "%02d%s%02d%s%02d" hours colon minutes colon seconds))
(t
(format "%02d%s%02d" minutes colon seconds)))))