[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Follow up on adding iwconfig to net-utils.el
From: |
Yoni Rabkin |
Subject: |
Follow up on adding iwconfig to net-utils.el |
Date: |
Fri, 22 Feb 2008 11:34:48 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) |
Hello, I am using GNU Emacs 23.0.60.2 (i686-pc-linux-gnu, X toolkit,
Xaw3d scroll bars) of 2008-02-22
Two weeks ago, I asked about including in net-utils.el a command which
will call the external program "iwconfig". I think that this makes sense
as "iwconfig" is the wireless networking counterpart to "ifconfig",
which is already provided by net-utils.el. I don't recall anyone saying
yes or no to the idea, so I'm presenting it again now.
For those with Web access, the thread is:
http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg00515.html
P.S. I'm using two weeks as my minimum-time-before-bugging-emacs-devel
interval because I understand that it is the etiquette on
emacs-devel for low priority requests. Feel free to correct me if
I'm wrong.
Index: net-utils.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/net-utils.el,v
retrieving revision 1.27
diff -u -r1.27 net-utils.el
--- net-utils.el 8 Jan 2008 20:45:56 -0000 1.27
+++ net-utils.el 22 Feb 2008 09:13:35 -0000
@@ -109,6 +109,23 @@
:group 'net-utils
:type '(repeat string))
+(defcustom iwconfig-program
+ (if (eq system-type 'gnu/linux)
+ "iwconfig"
+ "")
+ "Program to print wireless network configuration information."
+ :group 'wireless
+ :type 'string)
+
+;; In order to make iwconfig display diagnostic information on
+;; GNU/Linux, you pass it no command-line options, but this should
+;; still be here for the sake of portability.
+(defcustom iwconfig-program-options
+ nil
+ "Options for iwconfig-program."
+ :group 'wireless
+ :type '(repeat string))
+
(defcustom netstat-program "netstat"
"Program to print network statistics."
:group 'net-utils
@@ -366,6 +383,16 @@
(defalias 'ifconfig 'ipconfig)
;;;###autoload
+(defun iwconfig ()
+ "Run iwconfig program."
+ (interactive)
+ (net-utils-run-program
+ "iwconfig"
+ (concat "** Iwconfig ** " iwconfig-program " ** ")
+ iwconfig-program
+ iwconfig-program-options))
+
+;;;###autoload
(defun netstat ()
"Run netstat program."
(interactive)
--
"Cut your own wood and it will warm you twice"
- Follow up on adding iwconfig to net-utils.el,
Yoni Rabkin <=