branch: externals/el-job commit 4bc8a81fd9e6348f5761239ed0b089c4e42d7e73 Author: Martin Edström <meedstro...@gmail.com> Commit: Martin Edström <meedstro...@gmail.com>
Lint --- .github/workflows/test.yml | 6 +++--- el-job.el | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8b17f552a..36be642a81 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,9 +51,9 @@ jobs: - uses: actions/checkout@v2 - # - name: Install Ispell - # run: | - # sudo apt-get install ispell + - name: Install Ispell + run: | + sudo apt-get install ispell - name: Initialize sandbox run: | diff --git a/el-job.el b/el-job.el index 0a5be2e8e3..d29725d317 100644 --- a/el-job.el +++ b/el-job.el @@ -46,6 +46,7 @@ (require 'cl-lib) (require 'el-job-child) +(declare-function subr-native-comp-unit "data.c") (defvar el-job-major-version 2 "Number incremented for breaking changes.") @@ -269,7 +270,7 @@ See subroutine `el-job-child--zip' for details." ;;; Main logic -(defvar el-jobs (make-hash-table :test #'eq) +(defvar el-job--all-jobs (make-hash-table :test #'eq) "Table of all el-job objects.") (defmacro el-job--with (job slots &rest body) @@ -409,8 +410,8 @@ For debugging, see these commands: (unless (proper-list-p load-features) (error "Argument LOAD-FEATURES must be a list")) (unless id (error "Argument ID now mandatory")) - (let ((job (or (gethash id el-jobs) - (puthash id (el-job--make :id id) el-jobs))) + (let ((job (or (gethash id el-job--all-jobs) + (puthash id (el-job--make :id id) el-job--all-jobs))) (do-respawn nil) (do-exec nil)) (el-job--with job ( .queued-inputs .busy .ready .n-cores-to-use @@ -683,8 +684,8 @@ same ID still has the benchmarks table and possibly queued input." Tip: alternatively, you can preserve the process buffers for inspection. Use \\[el-job-cycle-debug-level] and they are not killed from then on." (interactive) - (let* ((id (intern (completing-read "Get info on job: " el-jobs))) - (job (gethash id el-jobs)) + (let* ((id (intern (completing-read "Get info on job: " el-job--all-jobs))) + (job (gethash id el-job--all-jobs)) (print-function (if (y-or-n-p "Print with `cl-prin1' (pretty but may be slow)?") (if (y-or-n-p "Print with `pp' (even prettier)?") @@ -704,12 +705,12 @@ for which order the fields come in. For example, the first field is ID, second is CALLBACK etc."))))) (defun el-job-kill-all () - "Kill all el-jobs ever registered and forget metadata." + "Kill all el-job--all-jobs ever registered and forget metadata." (interactive) (maphash (lambda (id job) (el-job--disable job) - (remhash id el-jobs)) - el-jobs)) + (remhash id el-job--all-jobs)) + el-job--all-jobs)) (defun el-job-await (id max-secs &optional message) "Block until all processes for job ID finished, then return t. @@ -731,7 +732,7 @@ Meanwhile, ensure string MESSAGE is visible in the minibuffer." (defun el-job-is-busy (id) "Return list of busy processes for job ID, if any. Safely return nil otherwise, whether or not ID is known." - (let ((job (gethash id el-jobs))) + (let ((job (gethash id el-job--all-jobs))) (and job (el-job:busy job)))) (provide 'el-job)