456 |
(set |
(set |
457 |
(make-local-variable 'font-lock-defaults) |
(make-local-variable 'font-lock-defaults) |
458 |
'((nslookup-font-lock-keywords))) |
'((nslookup-font-lock-keywords))) |
|
(setq local-abbrev-table nslookup-mode-abbrev-table) |
|
|
(abbrev-mode t) |
|
459 |
(setq comint-prompt-regexp nslookup-prompt-regexp) |
(setq comint-prompt-regexp nslookup-prompt-regexp) |
460 |
(setq comint-input-autoexpand t) |
(setq comint-input-autoexpand t) |
461 |
) |
) |
462 |
|
|
463 |
(define-key nslookup-mode-map "\t" 'comint-dynamic-complete) |
(define-key nslookup-mode-map "\t" 'comint-dynamic-complete) |
464 |
|
|
|
(define-abbrev nslookup-mode-abbrev-table "e" "exit") |
|
|
(define-abbrev nslookup-mode-abbrev-table "f" "finger") |
|
|
(define-abbrev nslookup-mode-abbrev-table "h" "help") |
|
|
(define-abbrev nslookup-mode-abbrev-table "lse" "lserver") |
|
|
(define-abbrev nslookup-mode-abbrev-table "q" "exit") |
|
|
(define-abbrev nslookup-mode-abbrev-table "r" "root") |
|
|
(define-abbrev nslookup-mode-abbrev-table "s" "set") |
|
|
(define-abbrev nslookup-mode-abbrev-table "se" "server") |
|
|
(define-abbrev nslookup-mode-abbrev-table "v" "viewer") |
|
|
|
|
465 |
;;;###autoload |
;;;###autoload |
466 |
(defun dig (host) |
(defun dig (host) |
467 |
"Run dig program." |
"Run dig program." |
514 |
(default-value 'comint-output-filter-functions)) |
(default-value 'comint-output-filter-functions)) |
515 |
(add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt |
(add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt |
516 |
nil t)) |
nil t)) |
|
(setq local-abbrev-table ftp-mode-abbrev-table) |
|
|
(abbrev-mode t) |
|
517 |
) |
) |
518 |
|
|
|
(define-abbrev ftp-mode-abbrev-table "q" "quit") |
|
|
(define-abbrev ftp-mode-abbrev-table "g" "get") |
|
|
(define-abbrev ftp-mode-abbrev-table "p" "prompt") |
|
|
(define-abbrev ftp-mode-abbrev-table "anon" "anonymous") |
|
|
|
|
519 |
;; Occasionally useful |
;; Occasionally useful |
520 |
(define-key ftp-mode-map "\t" 'comint-dynamic-complete) |
(define-key ftp-mode-map "\t" 'comint-dynamic-complete) |
521 |
|
|
566 |
(default-value 'comint-output-filter-functions)) |
(default-value 'comint-output-filter-functions)) |
567 |
(add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt |
(add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt |
568 |
nil t)) |
nil t)) |
|
(setq local-abbrev-table smbclient-mode-abbrev-table) |
|
|
(abbrev-mode t) |
|
569 |
) |
) |
570 |
|
|
|
(define-abbrev smbclient-mode-abbrev-table "q" "quit") |
|
|
|
|
571 |
|
|
572 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
573 |
;; Network Connections |
;; Network Connections |
603 |
"Alist of services and associated TCP port numbers. |
"Alist of services and associated TCP port numbers. |
604 |
This list is not complete.") |
This list is not complete.") |
605 |
|
|
|
(defvar network-connection-service-abbrev-alist nil |
|
|
"Alist of (SERVICE . ABBREVTABLE) for various network services. |
|
|
SERVICE can be either a symbol or a number appearing in |
|
|
`network-connection-service-alist'. ABBREVTABLE is the abbrev table |
|
|
to use in buffers that talk to that network service.") |
|
|
|
|
606 |
;; Workhorse macro |
;; Workhorse macro |
607 |
(defmacro run-network-program (process-name host port |
(defmacro run-network-program (process-name host port |
608 |
&optional initial-string) |
&optional initial-string) |
778 |
) |
) |
779 |
|
|
780 |
(defun network-connection-mode-setup (host service) |
(defun network-connection-mode-setup (host service) |
781 |
(let ((network-abbrev-table |
(make-local-variable 'network-connection-host) |
782 |
(or |
(setq network-connection-host host) |
783 |
(assoc service network-connection-service-abbrev-alist) |
(make-local-variable 'network-connection-service) |
784 |
(and (rassoc service network-connection-service-alist) |
(setq network-connection-service service))) |
|
(assoc |
|
|
(elt (rassoc service network-connection-service-alist) 0) |
|
|
network-connection-service-abbrev-alist))))) |
|
|
(make-local-variable 'network-connection-host) |
|
|
(setq network-connection-host host) |
|
|
(make-local-variable 'network-connection-service) |
|
|
(setq network-connection-service service) |
|
|
(and network-abbrev-table |
|
|
(setq local-abbrev-table (cdr network-abbrev-table)) |
|
|
(abbrev-mode t) |
|
|
))) |
|
785 |
|
|
786 |
;;;###autoload |
;;;###autoload |
787 |
(defun network-connection-to-service (host service) |
(defun network-connection-to-service (host service) |