[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41890: 28.0.50; [PATCH]: Add bindings for project.el
From: |
Basil L. Contovounesios |
Subject: |
bug#41890: 28.0.50; [PATCH]: Add bindings for project.el |
Date: |
Thu, 18 Jun 2020 18:22:33 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Just some minor nits from me.
> From: Philip K <philip@warpmail.net>
> Date: Thu, 18 Jun 2020 16:06:19 +0200
> Subject: [PATCH] Use same keys in project-switch-project as in
> project-prefix-map
>
> * project.el (project-switch-commands): Convert to user option and
> change structure.
> (project-switch-use-entire-map): Add new option.
> (project--keymap-prompt): Adapt to change in project-switch-commands
Nit: Missing full stop.
> (project-switch-project): Use project-prefix-map instead of
> project-switch-commands to query valid commands.
> ---
> lisp/progmodes/project.el | 63 +++++++++++++++++++++++++--------------
> 1 file changed, 41 insertions(+), 22 deletions(-)
>
> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index e24d81c1b4..33946f78a8 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -900,27 +900,46 @@ project-prompt-project-dir
> ;;; Project switching
>
> ;;;###autoload
> -(defvar project-switch-commands
> - '((?f "Find file" project-find-file)
> - (?g "Find regexp" project-find-regexp)
> - (?d "Dired" project-dired)
> - (?v "VC-Dir" project-vc-dir)
> - (?e "Eshell" project-eshell))
> - "Alist mapping keys to project switching menu entries.
> +(defcustom project-switch-commands
> + '((project-find-file . "Find file")
> + (project-find-regexp . "Find regexp")
> + (project-dired . "Dired")
> + (project-vc-dir . "VC-Dir")
> + (project-shell . "Shell")
> + (project-eshell . "Eshell"))
> + "Alist mapping commands to descriptions.
> Used by `project-switch-project' to construct a dispatch menu of
> commands available upon \"switching\" to another project.
>
> -Each element looks like (KEY LABEL COMMAND), where COMMAND is the
> -command to run when KEY is pressed. LABEL is used to distinguish
> -the choice in the dispatch menu.")
> +Each element looks like (COMMAND LABEL), where COMMAND should be
^^^^^^^^^^^^^^^
(COMMAND . LABEL)
> +bound in `project-prefix-map'. LABEL is used to distinguish the
> +choice in the dispatch menu."
> + :type '(alist :key-type function
> + :value-type string)
> + :options (mapcan (lambda (ent)
> + (and (commandp (cdr ent))
> + (list (cdr ent))))
> + (cdr project-prefix-map))
> + :version "28.1")
> +
> +(defcustom project-switch-use-entire-map t
> + "Make `project-switch-project' use entire `project-prefix-map'.
> +If nil, `project-switch-project' will only recognize commands
> +listed in `project-switch-commands', and signal an error when
> +others are invoked. Otherwise, all keys in
> +`project-switch-commands', are legal even if they aren't listed
^^^
Nit: Unnecessary comma.
> +in the minibuffer."
> + :type 'bool
> + :version "28.1")
Thanks,
--
Basil
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, (continued)
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Michael Albinus, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Stefan Monnier, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Eli Zaretskii, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Dmitry Gutov, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Eli Zaretskii, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Dmitry Gutov, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Eli Zaretskii, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Dmitry Gutov, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Eli Zaretskii, 2020/06/19
Message not available
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Philip K., 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el,
Basil L. Contovounesios <=
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Philip K., 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Juri Linkov, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Dmitry Gutov, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Juri Linkov, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Dmitry Gutov, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Simen Heggestøyl, 2020/06/19
Message not availablebug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Simen Heggestøyl, 2020/06/19
bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Philip K., 2020/06/19
bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Simen Heggestøyl, 2020/06/19
bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Dmitry Gutov, 2020/06/19