From: Juanma Barranquero Date: Tue, 11 Mar 2008 10:23:09 +0000 (+0000) Subject: (iwconfig-program-options): Doc fix. X-Git-Tag: emacs-pretest-23.0.90~7281 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=20f28123b3375e4fcf844ba284705304f2072d41;p=emacs.git (iwconfig-program-options): Doc fix. (net-utils-run-program, run-network-program): Define as functions. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0cb5ab22f3b..9748486900a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-03-11 Juanma Barranquero + + * net/net-utils.el (iwconfig-program-options): Doc fix. + (net-utils-run-program, run-network-program): Define as functions. + 2008-03-11 Dan Nicolaescu * emacs-lisp/lisp-mode.el (lisp-interaction-mode-map): Fix typo. @@ -17,7 +22,8 @@ * Makefile.in (bootstrap-prepare): Don't chmod cal-loaddefs.el. - * emacs-lisp/autoload.el (autoload-find-destination): Don't force raw-text. + * emacs-lisp/autoload.el (autoload-find-destination): + Don't force raw-text. * calendar/calendar.el ("cal-loaddefs"): Load, rather than require. * calendar/cal-loaddefs.el: Don't version control. @@ -64,8 +70,8 @@ 2008-03-10 Juanma Barranquero * iswitchb.el (iswitchb-use-faces): Doc fix. - (iswitchb-buffer-ignore, iswitchb-read-buffer): Fix typos in - docstrings. + (iswitchb-buffer-ignore, iswitchb-read-buffer): + Fix typos in docstrings. 2008-03-10 Dan Nicolaescu diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el index 910dd322b6f..a34fe0815c3 100644 --- a/lisp/net/net-utils.el +++ b/lisp/net/net-utils.el @@ -116,7 +116,7 @@ These options can be used to limit how many ICMP packets are emitted." :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,17 +312,17 @@ This variable is only used if the variable (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 "*")))) - (set-buffer buf) - (erase-buffer) - (insert ,header "\n") - (set-process-filter - (apply 'start-process ,name buf ,program ,@args) - 'net-utils-remove-ctrl-m-filter) - (display-buffer buf) - buf)) + (let ((buf (get-buffer-create (concat "*" name "*")))) + (set-buffer buf) + (erase-buffer) + (insert header "\n") + (set-process-filter + (apply 'start-process name buf program args) + 'net-utils-remove-ctrl-m-filter) + (display-buffer buf) + buf)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Wrappers for external network programs @@ -616,27 +616,22 @@ If your system's ping continues until interrupted, you can try setting "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) - (buf)) - (setq buf (get-buffer-create (concat "*" ,process-name "*"))) +;; 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 "*"))) (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))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;