aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-05-30 20:02:22 +0000
committerGerd Moellmann2000-05-30 20:02:22 +0000
commit086d5b876589f4942d45eec3d167c31f10fd6f95 (patch)
tree7a1c3a65fc11a8295561f3f43216595f63824535
parent10fc3187637f785c7dd5e81a00fd65d1a995d1c0 (diff)
downloademacs-086d5b876589f4942d45eec3d167c31f10fd6f95.tar.gz
emacs-086d5b876589f4942d45eec3d167c31f10fd6f95.zip
(finger-X.500-host-regexps): New user-option.
(finger): If HOST matches a regexp from finger-X.500-host-regexps, send a query containing USER only, not USER@HOST.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/net/net-utils.el36
2 files changed, 27 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 58c1e41128b..d2c83bb2046 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12000-05-30 Gerd Moellmann <gerd@gnu.org> 12000-05-30 Gerd Moellmann <gerd@gnu.org>
2 2
3 * net/net-utils.el (finger-X.500-host-regexps): New user-option.
4 (finger): If HOST matches a regexp from finger-X.500-host-regexps,
5 send a query containing USER only, not USER@HOST.
6
3 * mail/rmail.el (rmail-widen-to-current-msgbeg): Use rmail-msgbeg 7 * mail/rmail.el (rmail-widen-to-current-msgbeg): Use rmail-msgbeg
4 and rmail-msgend to compute the restriction at the end, instead of 8 and rmail-msgend to compute the restriction at the end, instead of
5 computing it. 9 computing it.
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index 480a6163a2e..9a349f7637d 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -691,6 +691,15 @@ This list in not complete.")
691;; Simple protocols 691;; Simple protocols
692;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 692;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
693 693
694(defcustom finger-X.500-host-regexps nil
695 "A list of regular expressions matching host names.
696If a host name passed to `finger' matches one of these regular
697expressions, it is assumed to be a host that doesn't accept
698queries of the form USER@HOST, and wants a query containing USER only."
699 :group 'net-utils
700 :type '(repeat regexp)
701 :version "21.1")
702
694;; Finger protocol 703;; Finger protocol
695;;;###autoload 704;;;###autoload
696(defun finger (user host) 705(defun finger (user host)
@@ -704,23 +713,24 @@ This list in not complete.")
704 (net-utils-url-at-point))) 713 (net-utils-url-at-point)))
705 (index (string-match (regexp-quote "@") answer))) 714 (index (string-match (regexp-quote "@") answer)))
706 (if index 715 (if index
707 (list 716 (list (substring answer 0 index)
708 (substring answer 0 index) 717 (substring answer (1+ index)))
709 (substring answer (1+ index))) 718 (list answer
710 (list 719 (read-from-minibuffer "At Host: "
711 answer 720 (net-utils-machine-at-point))))))
712 (read-from-minibuffer "At Host: " (net-utils-machine-at-point)))))) 721 (let* ((user-and-host (concat user "@" host))
713 (let* ( 722 (process-name (concat "Finger [" user-and-host "]"))
714 (user-and-host (concat user "@" host)) 723 (regexps finger-X.500-host-regexps)
715 (process-name 724 found)
716 (concat "Finger [" user-and-host "]")) 725 (while (not (string-match (car regexps) host))
717 ) 726 (setq regexps (cdr regexps)))
727 (when regexps
728 (setq user-and-host user))
718 (run-network-program 729 (run-network-program
719 process-name 730 process-name
720 host 731 host
721 (cdr (assoc 'finger network-connection-service-alist)) 732 (cdr (assoc 'finger network-connection-service-alist))
722 user-and-host 733 user-and-host)))
723 )))
724 734
725(defcustom whois-server-name "rs.internic.net" 735(defcustom whois-server-name "rs.internic.net"
726 "Default host name for the whois service." 736 "Default host name for the whois service."