summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2022-11-28 19:55:52 +0100
committerUlrich Müller <ulm@gentoo.org>2022-11-29 20:32:38 +0100
commit9c342d8e365e32afe035f92d9010b0ba97d00012 (patch)
treebe9e65cdd076e1a21e4d8671577c7c07d4e379b0
parentNew variable for additional subprocess environment (diff)
downloadebuild-mode-9c342d8e365e32afe035f92d9010b0ba97d00012.tar.gz
ebuild-mode-9c342d8e365e32afe035f92d9010b0ba97d00012.tar.bz2
ebuild-mode-9c342d8e365e32afe035f92d9010b0ba97d00012.zip
Provide own history lists for ebuild-run-command and friends
* ebuild-mode.el (ebuild-mode-ebuild-history) (ebuild-mode-pkgdev-history, ebuild-mode-pkgcheck-history): New variables. (ebuild-run-command, ebuild-mode-run-pkgdev) (ebuild-mode-run-pkgcheck): Use them. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--ChangeLog6
-rw-r--r--ebuild-mode.el13
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a941f7..5d5edf6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2022-11-28 Ulrich Müller <ulm@gentoo.org>
+ * ebuild-mode.el (ebuild-mode-ebuild-history)
+ (ebuild-mode-pkgdev-history, ebuild-mode-pkgcheck-history):
+ New variables.
+ (ebuild-run-command, ebuild-mode-run-pkgdev)
+ (ebuild-mode-run-pkgcheck): Use them.
+
* ebuild-mode.el (ebuild-mode-process-environment): New custom
variable. Bug 882055.
(ebuild-run-command, ebuild-mode-run-pkgdev)
diff --git a/ebuild-mode.el b/ebuild-mode.el
index 5eb40a5..6bd2c80 100644
--- a/ebuild-mode.el
+++ b/ebuild-mode.el
@@ -403,6 +403,10 @@ of the elements."
;;; Run ebuild command.
+(defvar ebuild-mode-ebuild-history nil)
+(defvar ebuild-mode-pkgdev-history nil)
+(defvar ebuild-mode-pkgcheck-history nil)
+
(defvar ebuild-log-buffer-mode nil
"Major mode for the log buffer of `ebuild-run-command'.
If nil, `compilation-mode' will be used.")
@@ -412,7 +416,8 @@ If nil, `compilation-mode' will be used.")
(interactive
(list
(completing-read "Run ebuild command(s): "
- 'ebuild-mode-ebuild-cmd-complete)))
+ 'ebuild-mode-ebuild-cmd-complete
+ nil nil nil 'ebuild-mode-ebuild-history)))
(or buffer-file-name
(error "No file for this buffer"))
(let* ((file (file-relative-name buffer-file-name))
@@ -484,7 +489,8 @@ Like `compile', but with autocompletion for pkgdev."
(interactive
(list (completing-read "Run pkgdev command: "
'ebuild-mode-command-complete
- nil nil "pkgdev ")))
+ nil nil "pkgdev "
+ 'ebuild-mode-pkgdev-history)))
(let ((process-environment (append ebuild-mode-process-environment
process-environment))
(compilation-buffer-name-function (lambda (mode) "*pkgdev*")))
@@ -496,7 +502,8 @@ Like `compile', but with autocompletion for pkgcheck."
(interactive
(list (completing-read "Run pkgcheck command: "
'ebuild-mode-command-complete
- nil nil "pkgcheck ")))
+ nil nil "pkgcheck "
+ 'ebuild-mode-pkgcheck-history)))
(let ((process-environment (append ebuild-mode-process-environment
process-environment))
(compilation-buffer-name-function (lambda (mode) "*pkgcheck*")))