diff options
| author | Juanma Barranquero | 2008-03-11 10:23:09 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-03-11 10:23:09 +0000 |
| commit | 20f28123b3375e4fcf844ba284705304f2072d41 (patch) | |
| tree | 4a49a4b609ab1bfb21ac329fffd2ee1d62f2bb45 | |
| parent | ca34d75a59d42b2a9f11a2f6b754ef21005fbdfd (diff) | |
| download | emacs-20f28123b3375e4fcf844ba284705304f2072d41.tar.gz emacs-20f28123b3375e4fcf844ba284705304f2072d41.zip | |
(iwconfig-program-options): Doc fix.
(net-utils-run-program, run-network-program): Define as functions.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/net/net-utils.el | 45 |
2 files changed, 29 insertions, 28 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0cb5ab22f3b..9748486900a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-03-11 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * net/net-utils.el (iwconfig-program-options): Doc fix. | ||
| 4 | (net-utils-run-program, run-network-program): Define as functions. | ||
| 5 | |||
| 1 | 2008-03-11 Dan Nicolaescu <dann@ics.uci.edu> | 6 | 2008-03-11 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 7 | ||
| 3 | * emacs-lisp/lisp-mode.el (lisp-interaction-mode-map): Fix typo. | 8 | * emacs-lisp/lisp-mode.el (lisp-interaction-mode-map): Fix typo. |
| @@ -17,7 +22,8 @@ | |||
| 17 | 22 | ||
| 18 | * Makefile.in (bootstrap-prepare): Don't chmod cal-loaddefs.el. | 23 | * Makefile.in (bootstrap-prepare): Don't chmod cal-loaddefs.el. |
| 19 | 24 | ||
| 20 | * emacs-lisp/autoload.el (autoload-find-destination): Don't force raw-text. | 25 | * emacs-lisp/autoload.el (autoload-find-destination): |
| 26 | Don't force raw-text. | ||
| 21 | 27 | ||
| 22 | * calendar/calendar.el ("cal-loaddefs"): Load, rather than require. | 28 | * calendar/calendar.el ("cal-loaddefs"): Load, rather than require. |
| 23 | * calendar/cal-loaddefs.el: Don't version control. | 29 | * calendar/cal-loaddefs.el: Don't version control. |
| @@ -64,8 +70,8 @@ | |||
| 64 | 2008-03-10 Juanma Barranquero <lekktu@gmail.com> | 70 | 2008-03-10 Juanma Barranquero <lekktu@gmail.com> |
| 65 | 71 | ||
| 66 | * iswitchb.el (iswitchb-use-faces): Doc fix. | 72 | * iswitchb.el (iswitchb-use-faces): Doc fix. |
| 67 | (iswitchb-buffer-ignore, iswitchb-read-buffer): Fix typos in | 73 | (iswitchb-buffer-ignore, iswitchb-read-buffer): |
| 68 | docstrings. | 74 | Fix typos in docstrings. |
| 69 | 75 | ||
| 70 | 2008-03-10 Dan Nicolaescu <dann@ics.uci.edu> | 76 | 2008-03-10 Dan Nicolaescu <dann@ics.uci.edu> |
| 71 | 77 | ||
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." | |||
| 116 | :version "23.1") | 116 | :version "23.1") |
| 117 | 117 | ||
| 118 | (defcustom iwconfig-program-options nil | 118 | (defcustom iwconfig-program-options nil |
| 119 | "Options for `iwconfig-program'." | 119 | "Options for the iwconfig program." |
| 120 | :group 'net-utils | 120 | :group 'net-utils |
| 121 | :type '(repeat string) | 121 | :type '(repeat string) |
| 122 | :version "23.1") | 122 | :version "23.1") |
| @@ -312,17 +312,17 @@ This variable is only used if the variable | |||
| 312 | (if moving (goto-char (process-mark process)))) | 312 | (if moving (goto-char (process-mark process)))) |
| 313 | (set-buffer old-buffer)))) | 313 | (set-buffer old-buffer)))) |
| 314 | 314 | ||
| 315 | (defmacro net-utils-run-program (name header program &rest args) | 315 | (defun net-utils-run-program (name header program args) |
| 316 | "Run a network information program." | 316 | "Run a network information program." |
| 317 | ` (let ((buf (get-buffer-create (concat "*" ,name "*")))) | 317 | (let ((buf (get-buffer-create (concat "*" name "*")))) |
| 318 | (set-buffer buf) | 318 | (set-buffer buf) |
| 319 | (erase-buffer) | 319 | (erase-buffer) |
| 320 | (insert ,header "\n") | 320 | (insert header "\n") |
| 321 | (set-process-filter | 321 | (set-process-filter |
| 322 | (apply 'start-process ,name buf ,program ,@args) | 322 | (apply 'start-process name buf program args) |
| 323 | 'net-utils-remove-ctrl-m-filter) | 323 | 'net-utils-remove-ctrl-m-filter) |
| 324 | (display-buffer buf) | 324 | (display-buffer buf) |
| 325 | buf)) | 325 | buf)) |
| 326 | 326 | ||
| 327 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 327 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 328 | ;; Wrappers for external network programs | 328 | ;; Wrappers for external network programs |
| @@ -616,27 +616,22 @@ If your system's ping continues until interrupted, you can try setting | |||
| 616 | "Alist of services and associated TCP port numbers. | 616 | "Alist of services and associated TCP port numbers. |
| 617 | This list is not complete.") | 617 | This list is not complete.") |
| 618 | 618 | ||
| 619 | ;; Workhorse macro | 619 | ;; Workhorse routine |
| 620 | (defmacro run-network-program (process-name host port | 620 | (defun run-network-program (process-name host port &optional initial-string) |
| 621 | &optional initial-string) | 621 | (let ((tcp-connection) |
| 622 | `(let ((tcp-connection) | 622 | (buf)) |
| 623 | (buf)) | 623 | (setq buf (get-buffer-create (concat "*" process-name "*"))) |
| 624 | (setq buf (get-buffer-create (concat "*" ,process-name "*"))) | ||
| 625 | (set-buffer buf) | 624 | (set-buffer buf) |
| 626 | (or | 625 | (or |
| 627 | (setq tcp-connection | 626 | (setq tcp-connection |
| 628 | (open-network-stream | 627 | (open-network-stream process-name buf host port)) |
| 629 | ,process-name | 628 | (error "Could not open connection to %s" host)) |
| 630 | buf | ||
| 631 | ,host | ||
| 632 | ,port)) | ||
| 633 | (error "Could not open connection to %s" ,host)) | ||
| 634 | (erase-buffer) | 629 | (erase-buffer) |
| 635 | (set-marker (process-mark tcp-connection) (point-min)) | 630 | (set-marker (process-mark tcp-connection) (point-min)) |
| 636 | (set-process-filter tcp-connection 'net-utils-remove-ctrl-m-filter) | 631 | (set-process-filter tcp-connection 'net-utils-remove-ctrl-m-filter) |
| 637 | (and ,initial-string | 632 | (and initial-string |
| 638 | (process-send-string tcp-connection | 633 | (process-send-string tcp-connection |
| 639 | (concat ,initial-string "\r\n"))) | 634 | (concat initial-string "\r\n"))) |
| 640 | (display-buffer buf))) | 635 | (display-buffer buf))) |
| 641 | 636 | ||
| 642 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 637 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |