diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index c6d40b6..0a4693f 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -87,7 +87,9 @@ These options can be used to limit how many ICMP packets are emitted."
(defcustom ifconfig-program
(if (eq system-type 'windows-nt)
"ipconfig"
- "ifconfig")
+ (if (executable-find "ifconfig")
+ "ifconfig"
+ "ip"))
"Program to print network configuration information."
:group 'net-utils
:type 'string)
@@ -97,8 +99,10 @@ These options can be used to limit how many ICMP packets are emitted."
(defcustom ifconfig-program-options
(list
- (if (eq system-type 'windows-nt)
- "/all" "-a"))
+ (cond ((eq system-type 'windows-nt) "/all")
+ ((and (executable-find "ip")
+ (not (executable-find "ifconfig"))) "addr")
+ (t "-a")))
"Options for the ifconfig program."
:group 'net-utils
:type '(repeat string))
--
2.5.0
------------------ 原始邮件 ------------------
发件人: "Glenn Morris";<rgm@gnu.org>;
发送时间: 2015年12月4日(星期五) 下午4:03
收件人: "lux"<lx@shellcodes.org>;
抄送: "22091"<22091@debbugs.gnu.org>;
主题: bug#22091: [PATCH 1/2] * lisp/env.el: Add (whereis-command)
lu4nx wrote:
> +(defun whereis-command (command)
> + (let ((paths (split-string (getenv "PATH") ":")))
> + (remove-if-not
> + (lambda (path)
> + (file-exists-p (format "%s/%s" path command)))
> + paths)))
You use a CL function without requiring CL.
But 'executable-find' already exists anyway, so this isn't needed.
Also, you sent 4 or 5 identical copies of each of your mails in rapid
succession (filtered out by list moderation). Please fix your mailer.