diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-08-05 19:03:08 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-08-05 19:03:08 +0200 |
commit | 3aacecb5a3fae211cbe8b71a02097ef4920c6a5e (patch) | |
tree | 105532bf79a6b7645a1601f49dd08fc8a8eaa990 | |
parent | More static-if (diff) | |
download | ebuild-mode-3aacecb5a3fae211cbe8b71a02097ef4920c6a5e.tar.gz ebuild-mode-3aacecb5a3fae211cbe8b71a02097ef4920c6a5e.tar.bz2 ebuild-mode-3aacecb5a3fae211cbe8b71a02097ef4920c6a5e.zip |
Update keybindings for ebuild-mode
* ebuild-mode.el (ebuild-mode-map): Keybindings now use C-c C-e
as their prefix.
* ebuild-mode.texi (ebuild-mode): Document the new keybindings.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ebuild-mode.el | 19 | ||||
-rw-r--r-- | ebuild-mode.texi | 52 |
3 files changed, 40 insertions, 35 deletions
@@ -1,5 +1,9 @@ 2024-08-05 Ulrich Müller <ulm@gentoo.org> + * ebuild-mode.el (ebuild-mode-map): Keybindings now use C-c C-e + as their prefix. + * ebuild-mode.texi (ebuild-mode): Document the new keybindings. + * ebuild-mode.el (ebuild-mode, ebuild-run-command) (ebuild-mode-get-completion-function, ebuild-mode-run-pkgdev) (ebuild-mode-run-pkgcheck, ebuild-repo-mode, find-file-hook): diff --git a/ebuild-mode.el b/ebuild-mode.el index 70e79c4..fc2e5a7 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -906,15 +906,16 @@ in a Gentoo profile." ;;; Keybindings. -;; sh-mode already uses the following C-c C-<letter> keys: cfilorstuwx -(define-key ebuild-mode-map "\C-c\C-e" #'ebuild-run-command) -(define-key ebuild-mode-map "\C-c\C-p" #'ebuild-mode-run-pkgdev) -(define-key ebuild-mode-map "\C-c\C-q" #'ebuild-mode-run-pkgcheck) -(define-key ebuild-mode-map "\C-c\C-d" #'ebuild-mode-find-workdir) -(define-key ebuild-mode-map "\C-c\C-k" #'ebuild-mode-keyword) -(define-key ebuild-mode-map "\C-c\C-y" #'ebuild-mode-ekeyword) -(define-key ebuild-mode-map "\C-c\C-b" #'ebuild-mode-all-keywords-unstable) -(define-key ebuild-mode-map "\C-c\C-n" #'ebuild-mode-insert-skeleton) +(dolist (k '(("\C-c\C-e\C-e" ebuild-run-command) + ("\C-c\C-e\C-p" ebuild-mode-run-pkgdev) + ("\C-c\C-e\C-c" ebuild-mode-run-pkgcheck) + ("\C-c\C-e\C-w" ebuild-mode-find-workdir) + ("\C-c\C-e\C-k" ebuild-mode-keyword) + ("\C-c\C-e\C-y" ebuild-mode-ekeyword) + ("\C-c\C-e\C-u" ebuild-mode-all-keywords-unstable) + ("\C-c\C-e\C-n" ebuild-mode-insert-skeleton))) + (apply #'define-key ebuild-mode-map k)) + (define-key ebuild-repo-mode-map "\C-c-" #'ebuild-mode-insert-tag-line) ;; Menu support for both Emacs and XEmacs. diff --git a/ebuild-mode.texi b/ebuild-mode.texi index 8f001c8..8246aa9 100644 --- a/ebuild-mode.texi +++ b/ebuild-mode.texi @@ -93,8 +93,8 @@ interfacing with Emacs. @section Writing a new ebuild Starting a completely new ebuild from scratch is best done by inserting an ebuild skeleton. The command @code{ebuild-mode-skeleton} does this -for you and can be called via @kbd{C-c C-n}. You are prompted for the -always needed information, while having the possibility to give more +for you and can be called via @kbd{C-c C-e C-n}. You are prompted for +the always needed information, while having the possibility to give more than one item (in LICENSE for example) and choose via tab completion from the possible choices. Giving an empty input on items, that are not mandatory, will remove it from the buffer. After that adding custom @@ -111,8 +111,8 @@ ekeyword syntax. @end enumerate The first command is called @code{ebuild-mode-keyword} (bound to -@kbd{C-c C-k}) and initially asks for the action to take which is one -out of +@kbd{C-c C-e C-k}) and initially asks for the action to take which is +one out of @table @code @item drop Remove the architecture entirely. @@ -129,8 +129,8 @@ After choosing the action the architectures to handle need to be chosen. Tab completion is available for all possible architectures. Using the ekeyword syntax for the @code{ebuild-mode-ekeyword} command -(@kbd{C-c C-y} as keybinding) is equal what you can pass as argument to -said utility from the @code{app-portage/gentoolkit-dev} package: +(@kbd{C-c C-e C-y} as keybinding) is equal what you can pass as argument +to said utility from the @code{app-portage/gentoolkit-dev} package: @table @code @item ^<arch> Remove the architecture entirely. @@ -146,51 +146,51 @@ It is possible to use @code{all} instead of an individual architecture which works on all currently available architectures for the ebuild. Handy for version/revision bumps is to mark all architectures from a -copied stable ebuild as testing. The keybinding @kbd{C-c C-b} calling -the @code{ebuild-mode-all-keywords-unstable} command can be used for -this task. +copied stable ebuild as testing. The keybinding @kbd{C-c C-e C-u} +calling the @code{ebuild-mode-all-keywords-unstable} command can be used +for this task. @section Testing and interfacing with Portage Apart from the normal external program calls via @kbd{M-!}, ebuild-mode provides a direct interface to the ebuild utility found in the Portage -program suite. @kbd{C-c C-e} calls @code{ebuild-run-command} which asks -for one of the possible actions as argument. See the man page of ebuild -what actions are provided. +program suite. @kbd{C-c C-e C-e} calls @code{ebuild-run-command} which +asks for one of the possible actions as argument. See the man page of +ebuild what actions are provided. -The command @code{ebuild-mode-find-workdir} (bound to @kbd{C-c C-d}) +The command @code{ebuild-mode-find-workdir} (bound to @kbd{C-c C-e C-w}) allows to visit the working directory (@code{$@{WORKDIR@}}) that belongs to the ebuild in the current buffer. With a prefix argument, the directory will be visited in another window. @section Running @command{pkgdev} and @command{pkgcheck} -@kbd{C-c C-p} calls the command @code{ebuild-mode-run-pkgdev} command, -which can be used to run @command{pkgdev} tools. Minibuffer completion -for subcommands is supported. +@kbd{C-c C-e C-p} calls the command @code{ebuild-mode-run-pkgdev} +command, which can be used to run @command{pkgdev} tools. Minibuffer +completion for subcommands is supported. -Similarly, @kbd{C-c C-q} (mnemonic: ``q'' for quality assurance) calls -@code{ebuild-mode-run-pkgcheck} which runs @command{pkgcheck}. +Similarly, @kbd{C-c C-e C-c} calls @code{ebuild-mode-run-pkgcheck} +which runs @command{pkgcheck}. @section Keybindings @table @kbd -@item C-c C-n +@item C-c C-e C-n Insert a skeleton ebuild contents, with prompts for desired eclass inclusions, licenses and USE flags. -@item C-c C-k +@item C-c C-e C-k Keywording is done via prompts that narrows down your choices which architectures to mark as testing, dropped among other things. -@item C-c C-y +@item C-c C-e C-y Generate architecture keywords with the syntax from the ekeyword tool. -@item C-c C-b +@item C-c C-e C-u Mark all architectures as testing. Handy for version/revision bumps. -@item C-c C-e +@item C-c C-e C-e Run Portage's ebuild command, you are prompted for the phase you want. -@item C-c C-d +@item C-c C-e C-w Visit the working directory that belongs to the ebuild. -@item C-c C-p +@item C-c C-e C-p Run a @command{pkgdev} command. -@item C-c C-q +@item C-c C-e C-c Run a @command{pkgcheck} command. @end table |