emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/net/net-utils.el,v


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/net/net-utils.el,v
Date: Tue, 11 Mar 2008 10:21:42 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juanma Barranquero <lektu>      08/03/11 10:21:41

Index: net-utils.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/net-utils.el,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- net-utils.el        1 Mar 2008 01:28:31 -0000       1.32
+++ net-utils.el        11 Mar 2008 10:21:41 -0000      1.33
@@ -116,7 +116,7 @@
   :version "23.1")
 
 (defcustom iwconfig-program-options nil
- "Options for `iwconfig-program'."
+ "Options for the iwconfig program."
  :group 'net-utils
  :type '(repeat string)
  :version "23.1")
@@ -312,14 +312,14 @@
          (if moving (goto-char (process-mark process))))
       (set-buffer old-buffer))))
 
-(defmacro net-utils-run-program (name header program &rest args)
+(defun net-utils-run-program (name header program args)
   "Run a network information program."
-  ` (let ((buf (get-buffer-create (concat "*" ,name "*")))) 
+  (let ((buf (get-buffer-create (concat "*" name "*"))))
       (set-buffer buf)
       (erase-buffer)
-      (insert ,header "\n")
+    (insert header "\n")
       (set-process-filter
-       (apply 'start-process ,name buf ,program ,@args)
+     (apply 'start-process name buf program args)
        'net-utils-remove-ctrl-m-filter)
       (display-buffer buf)
       buf))
@@ -616,27 +616,22 @@
   "Alist of services and associated TCP port numbers.
 This list is not complete.")
 
-;; Workhorse macro
-(defmacro run-network-program (process-name host port
-                                           &optional initial-string)
-  `(let ((tcp-connection)
+;; Workhorse routine
+(defun run-network-program (process-name host port &optional initial-string)
+  (let ((tcp-connection)
         (buf))
-    (setq buf (get-buffer-create (concat "*" ,process-name "*")))
+    (setq buf (get-buffer-create (concat "*" process-name "*")))
     (set-buffer buf)
     (or
      (setq tcp-connection
-          (open-network-stream
-           ,process-name
-           buf
-           ,host
-           ,port))
-     (error "Could not open connection to %s" ,host))
+          (open-network-stream process-name buf host port))
+     (error "Could not open connection to %s" host))
     (erase-buffer)
     (set-marker (process-mark tcp-connection) (point-min))
     (set-process-filter tcp-connection 'net-utils-remove-ctrl-m-filter)
-    (and ,initial-string
+    (and initial-string
         (process-send-string tcp-connection
-                             (concat ,initial-string "\r\n")))
+                             (concat initial-string "\r\n")))
     (display-buffer buf)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




reply via email to

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