Mercurial > emacs
comparison lisp/net/net-utils.el @ 41257:0605a90581d4
(network-connection-service-abbrev-alist): New variable.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 19 Nov 2001 06:24:36 +0000 |
parents | b174db545cfd |
children | c5ddbcd62234 |
comparison
equal
deleted
inserted
replaced
41256:4a78098c3bd7 | 41257:0605a90581d4 |
---|---|
622 (cons 'irc 194) | 622 (cons 'irc 194) |
623 (cons 'https 443) | 623 (cons 'https 443) |
624 (cons 'rlogin 513) | 624 (cons 'rlogin 513) |
625 ) | 625 ) |
626 "Alist of services and associated TCP port numbers. | 626 "Alist of services and associated TCP port numbers. |
627 This list in not complete.") | 627 This list is not complete.") |
628 | |
629 (defvar network-connection-service-abbrev-alist nil | |
630 "Alist of (SERVICE . ABBREVTABLE) for various network services. | |
631 SERVICE can be either a symbol or a number appearing in | |
632 `network-connection-service-alist'. ABBREVTABLE is the abbrev table | |
633 to use in buffers that talk to that network service.") | |
628 | 634 |
629 ;; Workhorse macro | 635 ;; Workhorse macro |
630 (defmacro run-network-program (process-name host port | 636 (defmacro run-network-program (process-name host port |
631 &optional initial-string) | 637 &optional initial-string) |
632 `(let ((tcp-connection) | 638 `(let ((tcp-connection) |
802 | 808 |
803 (defun network-connection-mode-setup (host service) | 809 (defun network-connection-mode-setup (host service) |
804 (let ((network-abbrev-table | 810 (let ((network-abbrev-table |
805 (or | 811 (or |
806 (assoc service network-connection-service-abbrev-alist) | 812 (assoc service network-connection-service-abbrev-alist) |
807 (and (rassoc service network-connection-service-alist) | 813 (and (rassoc service network-connection-service-alist) |
808 (assoc | 814 (assoc |
809 (elt (rassoc service network-connection-service-alist) 0) | 815 (elt (rassoc service network-connection-service-alist) 0) |
810 network-connection-service-abbrev-alist))))) | 816 network-connection-service-abbrev-alist))))) |
811 (make-local-variable 'network-connection-host) | 817 (make-local-variable 'network-connection-host) |
812 (setq network-connection-host host) | 818 (setq network-connection-host host) |
813 (make-local-variable 'network-connection-service) | 819 (make-local-variable 'network-connection-service) |
814 (setq network-connection-service service) | 820 (setq network-connection-service service) |
815 (and network-abbrev-table | 821 (and network-abbrev-table |