XEmacs 21.2.6
[chise/xemacs-chise.git.1] / lisp / package-get.el
index 539c6be..acc3483 100644 (file)
@@ -260,7 +260,10 @@ When nil, updates which are not PGP signed are allowed without confirmation."
   (mapcar (lambda (site)
             (vector (car site)
                     `(push (quote ,(cdr site))
   (mapcar (lambda (site)
             (vector (car site)
                     `(push (quote ,(cdr site))
-                           package-get-remote)))
+                           package-get-remote)
+                    :style 'toggle
+                    :selected `(member (quote ,(cdr site))
+                                       package-get-remote)))
           package-get-download-sites))
 
 ;;;###autoload
           package-get-download-sites))
 
 ;;;###autoload
@@ -702,8 +705,10 @@ successfully installed but errors occurred during initialization, or
         (package-status t)
         filenames full-package-filename)
     (if (null this-package)
         (package-status t)
         filenames full-package-filename)
     (if (null this-package)
-       (error "Couldn't find package %s with version %s"
-              package version))
+       (if package-get-remote
+           (error "Couldn't find package %s with version %s"
+                  package version)
+         (error "No download sites or local package locations specified.")))
     (if (null base-filename)
        (error "No filename associated with package %s, version %s"
               package version))
     (if (null base-filename)
        (error "No filename associated with package %s, version %s"
               package version))
@@ -804,7 +809,10 @@ successfully installed but errors occurred during initialization, or
 
       (if (or (not full-package-filename)
              (not (file-exists-p full-package-filename)))
 
       (if (or (not full-package-filename)
              (not (file-exists-p full-package-filename)))
-         (error "Unable to find file %s" base-filename))
+         (if package-get-remote
+             (error "Unable to find file %s" base-filename)
+           (error
+            "No download sites or local package locations specified.")))
       ;; Validate the md5 checksum
       ;; Doing it with XEmacs removes the need for an external md5 program
       (message "Validating checksum for `%s'..." package) (sit-for 0)
       ;; Validate the md5 checksum
       ;; Doing it with XEmacs removes the need for an external md5 program
       (message "Validating checksum for `%s'..." package) (sit-for 0)
@@ -937,7 +945,9 @@ words
   (if (efs-ftp-path filename)
       filename
     (let ((dir (cadr search)))
   (if (efs-ftp-path filename)
       filename
     (let ((dir (cadr search)))
-      (concat "/"
+      (concat (if (string-match "@" (car search))
+                 "/"
+               "/anonymous@")
              (car search) ":"
              (if (string-match "/$" dir)
                  dir
              (car search) ":"
              (if (string-match "/$" dir)
                  dir