emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master b8d4242e8bd 1/2: New user option 'shell-command-guess-functio


From: Arash Esbati
Subject: Re: master b8d4242e8bd 1/2: New user option 'shell-command-guess-functions' (bug#18132)
Date: Wed, 29 Nov 2023 20:14:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Juri Linkov <juri@jurta.org> writes:

> branch: master
> commit b8d4242e8bdbdb6ca364bf0760e50689f6a6e118
> Author: Juri Linkov <juri@linkov.net>
> Commit: Juri Linkov <juri@linkov.net>
> [...]
> diff --git a/lisp/simple.el b/lisp/simple.el
> index 02c68912dba..35bce6ab4b8 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -4273,19 +4273,17 @@ This buffer is used when `shell-command' or 
> `shell-command-on-region'
>  is run interactively.  A value of nil means that output to stderr and
>  stdout will be intermixed in the output stream.")
>  
> -(declare-function mailcap-file-default-commands "mailcap" (files))
>  (declare-function dired-get-filename "dired" (&optional localp 
> no-error-if-not-filep))
>  
>  (defun minibuffer-default-add-shell-commands ()
>    "Return a list of all commands associated with the current file.
> -This function is used to add all related commands retrieved by `mailcap'
> -to the end of the list of defaults just after the default value."
> -  (interactive)
> +This function is used to add all related commands retrieved by
> +`shell-command-guess' to the end of the list of defaults just
> +after the default value."
>    (let* ((filename (if (listp minibuffer-default)
>                      (car minibuffer-default)
>                    minibuffer-default))
> -      (commands (and filename (require 'mailcap nil t)
> -                     (mailcap-file-default-commands (list filename)))))
> +      (commands (and filename (shell-command-guess (list filename)))))
>      (setq commands (mapcar (lambda (command)
>                            (concat command " " filename))
>                          commands))

This give me:

  ELC+ELN  ../lisp/simple.elc
In end of data:
simple.el:4286:35: Warning: the function ‘shell-command-guess’ is not
known to be defined.

Maybe you want to declare that function?  This is with Emacs 30
(a811846879) on macOS.

Best, Arash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]