Mercurial > emacs
comparison lisp/ffap.el @ 92148:f991f10f15ec
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1074
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 24 Feb 2008 10:09:07 +0000 |
parents | 962527987174 4318dfaeb2cb |
children | 1e3a407766b9 |
comparison
equal
deleted
inserted
replaced
92147:773ae07da318 | 92148:f991f10f15ec |
---|---|
424 ;; (ffap-machine-p "nonesuch" nil nil 'ping) | 424 ;; (ffap-machine-p "nonesuch" nil nil 'ping) |
425 ;; (ffap-machine-p "ftp.mathcs.emory.edu" nil nil 'ping) | 425 ;; (ffap-machine-p "ftp.mathcs.emory.edu" nil nil 'ping) |
426 ;; (ffap-machine-p "mathcs" 5678 nil 'ping) | 426 ;; (ffap-machine-p "mathcs" 5678 nil 'ping) |
427 ;; (ffap-machine-p "foo.bonk" nil nil 'ping) | 427 ;; (ffap-machine-p "foo.bonk" nil nil 'ping) |
428 ;; (ffap-machine-p "foo.bonk.com" nil nil 'ping) | 428 ;; (ffap-machine-p "foo.bonk.com" nil nil 'ping) |
429 (if (or (string-match "[^-[:alnum:].]" host) ; Illegal chars (?) | 429 (if (or (string-match "[^-[:alnum:].]" host) ; Invalid chars (?) |
430 (not (string-match "[^0-9]" host))) ; 1: a number? 2: quick reject | 430 (not (string-match "[^0-9]" host))) ; 1: a number? 2: quick reject |
431 nil | 431 nil |
432 (let* ((domain | 432 (let* ((domain |
433 (and (string-match "\\.[^.]*$" host) | 433 (and (string-match "\\.[^.]*$" host) |
434 (downcase (substring host (1+ (match-beginning 0)))))) | 434 (downcase (substring host (1+ (match-beginning 0)))))) |