Skip to content

Commit 3ef9402

Browse files
committed
Add doc-strings for many commands
1 parent 87a568b commit 3ef9402

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

emir.el

+45
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ repository specified by variable `epkg-repository'."
160160

161161
;;;###autoload
162162
(defun emir-import-emacs-packages ()
163+
"Import built-in packages."
163164
(interactive)
164165
(let ((alist (emir--builtin-packages-alist)))
165166
(emir-with-emacs-worktree
@@ -206,6 +207,8 @@ repository specified by variable `epkg-repository'."
206207

207208
;;;###autoload
208209
(defun emir-import-ewiki-packages (&optional drew-only)
210+
"Import packages from the Emacswiki
211+
With a prefix argument, only import Drew's packages."
209212
(interactive "P")
210213
(with-emir-repository 'epkg-wiki-package
211214
(magit-git "checkout" "master")
@@ -229,6 +232,7 @@ repository specified by variable `epkg-repository'."
229232

230233
;;;###autoload
231234
(defun emir-import-ewiki-package (name)
235+
"Import the package named NAME from the Emacswiki."
232236
(interactive (list (read-string "Package: ")))
233237
(with-emir-repository 'epkg-wiki-package
234238
(magit-process-buffer)
@@ -242,6 +246,8 @@ repository specified by variable `epkg-repository'."
242246

243247
;;;###autoload
244248
(defun emir-add-package (name url class &rest plist)
249+
"Mirror the package named NAME from URL using CLASS
250+
Keys in PLIST must be supported by the CLASS constructor."
245251
(interactive
246252
(let* ((url (emir-read-url "Add package from url"))
247253
(class (emir--read-class url))
@@ -266,11 +272,15 @@ repository specified by variable `epkg-repository'."
266272

267273
;;;###autoload
268274
(defun emir-add-nongnu-elpa-packages (&optional dry-run)
275+
"Mirror new packages from NonGNU ELPA.
276+
With a prefix argument, only show which packages would be added."
269277
(interactive "P")
270278
(emir--add-elpa-packages 'nongnu dry-run))
271279

272280
;;;###autoload
273281
(defun emir-add-gnu-elpa-packages (&optional dry-run)
282+
"Mirror new packages from GNU ELPA.
283+
With a prefix argument, only show which packages would be added."
274284
(interactive "P")
275285
(emir--add-elpa-packages 'gnu dry-run))
276286

@@ -309,6 +319,8 @@ repository specified by variable `epkg-repository'."
309319

310320
;;;###autoload
311321
(defun emir-add-melpa-packages (&optional dry-run interactive)
322+
"Mirror new packages from Melpa.
323+
With a prefix argument, only show which packages would be added."
312324
(interactive (list current-prefix-arg t))
313325
(pcase-dolist
314326
(`(,name ,url ,class ,branch)
@@ -345,6 +357,8 @@ repository specified by variable `epkg-repository'."
345357

346358
;;;###autoload
347359
(defun emir-update-package (name &optional interactive)
360+
"Update the package named NAME.
361+
With a prefix argument, update even if there are no new commits."
348362
(interactive (list (epkg-read-package "Update package: ")
349363
(prefix-numeric-value current-prefix-arg)))
350364
(setq emir--force-push nil)
@@ -373,6 +387,7 @@ repository specified by variable `epkg-repository'."
373387

374388
;;;###autoload
375389
(defun emir-update-github-packages ()
390+
"Update all mirrored packages that are distributed on Github."
376391
(interactive)
377392
(let ((start (current-time)))
378393
(emir-gh-foreach-query
@@ -423,18 +438,30 @@ repository specified by variable `epkg-repository'."
423438

424439
;;;###autoload
425440
(defun emir-update-wiki-packages (&optional from recreate)
441+
"Update all mirrored packages that are distributed on the Emacswiki.
442+
With a prefix argument, read a package, and only update that and later
443+
packages in alphabetic order. If optional RECREATE is non-nil, update
444+
each package, regardless of whether any new commits were fetched."
426445
(interactive (list (and current-prefix-arg
427446
(epkg-read-package "Limit to packages after: "))))
428447
(emir--update-packages [wiki] from recreate))
429448

430449
;;;###autoload
431450
(defun emir-update-slow-packages (&optional from recreate)
451+
"Update mirrored packages that are expensive to update.
452+
With a prefix argument, read a package, and only update that and later
453+
packages in alphabetic order. If optional RECREATE is non-nil, update
454+
each package, regardless of whether any new commits were fetched."
432455
(interactive (list (and current-prefix-arg
433456
(epkg-read-package "Limit to packages after: "))))
434457
(emir--update-packages [subtree] from recreate))
435458

436459
;;;###autoload
437460
(defun emir-update-other-packages (&optional from recreate)
461+
"Update mirrored packages that are not updated by another update command.
462+
With a prefix argument, read a package, and only update that and later
463+
packages in alphabetic order. If optional RECREATE is non-nil, update
464+
each package, regardless of whether any new commits were fetched."
438465
(interactive (list (and current-prefix-arg
439466
(epkg-read-package "Limit to packages after: "))))
440467
(emir--update-packages [mirrored* !github* !wiki !subtree*]
@@ -496,13 +523,18 @@ repository specified by variable `epkg-repository'."
496523

497524
;;;###autoload
498525
(defun emir-regenerate-metadata (&optional from)
526+
"Re-generate metadata for all mirrored packages.
527+
With a prefix argument, read a package, and only update that and later
528+
packages in alphabetic order."
499529
(interactive (list (and current-prefix-arg
500530
(epkg-read-package "Limit to packages after: "))))
501531
(emir-with-emacs-worktree
502532
(emir--update-packages nil from "Regenerate metadata")))
503533

504534
;;;###autoload
505535
(defun emir-update-licenses (&optional all)
536+
"Update license information for packages with problematic licenses.
537+
With a prefix argument, update license information for all packages."
506538
(interactive "P")
507539
(dolist (pkg (epkgs))
508540
(with-slots (name) pkg
@@ -522,6 +554,7 @@ repository specified by variable `epkg-repository'."
522554

523555
;;;###autoload
524556
(defun emir-join-provided (name feature reason)
557+
"Declare that the package NAME provides FEATURE because of REASON."
525558
(interactive
526559
(let* ((name (epkg-read-package "Package: "))
527560
(pkg (epkg name))
@@ -542,6 +575,7 @@ repository specified by variable `epkg-repository'."
542575

543576
;;;###autoload
544577
(defun emir-drop-provided (name feature reason)
578+
"Declare that the package NAME does not provide FEATURE because of REASON."
545579
(interactive
546580
(let* ((name (epkg-read-package "Package: "))
547581
(pkg (epkg name))
@@ -561,6 +595,7 @@ repository specified by variable `epkg-repository'."
561595

562596
;;;###autoload
563597
(defun emir-drop-required (name feature reason)
598+
"Declare that the package NAME does not require FEATURE because of REASON."
564599
(interactive
565600
(let* ((name (epkg-read-package "Package: "))
566601
(pkg (epkg name))
@@ -582,6 +617,7 @@ repository specified by variable `epkg-repository'."
582617

583618
;;;###autoload
584619
(defun emir-shelve-package (name &optional melpa-msg)
620+
"Shelve the package named NAME."
585621
(interactive (list (epkg-read-package "Shelve package: " nil [mirrored*])))
586622
(let ((pkg (epkg name)))
587623
(with-demoted-errors "Error: %S"
@@ -622,6 +658,7 @@ repository specified by variable `epkg-repository'."
622658

623659
;;;###autoload
624660
(defun emir-shelve-archived-github-packages ()
661+
"Shelve packages hosted on Github which have been archived by upstream."
625662
(interactive)
626663
(dolist (name (epkgs 'name [github*]))
627664
(let ((pkg (epkg name)))
@@ -640,6 +677,7 @@ repository specified by variable `epkg-repository'."
640677

641678
;;;###autoload
642679
(defun emir-remove-package (name)
680+
"Remove the package named NAME."
643681
(interactive
644682
(let ((name (epkg-read-package "Remove package: ")))
645683
(unless (y-or-n-p (format "Really REMOVE (not shelve) %s?" name))
@@ -706,6 +744,7 @@ repository specified by variable `epkg-repository'."
706744
;;;; Migrate
707745

708746
(defun emir-migrate-package (name url class)
747+
"Change the upstream repository from which to get the package named NAME."
709748
(interactive
710749
(let* ((name (epkg-read-package "Migrate package: "))
711750
(melpa-url (nth 4 (assoc name (emir-melpa--migrated-packages))))
@@ -753,6 +792,11 @@ repository specified by variable `epkg-repository'."
753792
;;;; Stage
754793

755794
(defun emir-stage (&optional name dump sort)
795+
"Stage changes in the Epkg repository.
796+
If optional NAME is non-nil, stage the module of the package by that
797+
name. If optional DUMP is non-nil (which interactively it is, then
798+
dump the Epkg database. If optional SORT is non-nil, then sort the
799+
\".gitmodules\" file."
756800
(interactive (list nil t t))
757801
(with-emir-repository t
758802
(when name
@@ -770,6 +814,7 @@ repository specified by variable `epkg-repository'."
770814
"ewiki" "gnu-elpa" "nongnu-elpa" "melpa")))
771815

772816
(defun emir-dump-database ()
817+
"Dump the Epkg database as SQL statements to a file."
773818
(interactive)
774819
(emacsql-sqlite-dump-database (oref (epkg-db) connection)))
775820

0 commit comments

Comments
 (0)