Function: proced-marked-processes
proced-marked-processes is a byte-compiled function defined in
proced.el.gz.
Signature
(proced-marked-processes)
Documentation
Return marked processes as alist of PIDs.
If no process is marked return alist with the PID of the process point is on. The cdrs of the alist are the text strings displayed by Proced for these processes. They are used for error messages.
Source Code
;; Defined in /usr/src/emacs/lisp/proced.el.gz
(defun proced-marked-processes ()
"Return marked processes as alist of PIDs.
If no process is marked return alist with the PID of the process point is on.
The cdrs of the alist are the text strings displayed by Proced for these
processes. They are used for error messages."
(let ((regexp (proced-marker-regexp))
process-alist)
;; collect marked processes
(save-excursion
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(push (cons (proced-pid-at-point)
;; How much info should we collect here?
(buffer-substring-no-properties
(+ 2 (line-beginning-position))
(line-end-position)))
process-alist)))
(if process-alist
(nreverse process-alist)
;; take current process
(let ((pid (proced-pid-at-point)))
(if pid
(list (cons pid
(buffer-substring-no-properties
(+ 2 (line-beginning-position))
(line-end-position)))))))))