]> code.delx.au - gnu-emacs/blobdiff - lisp/url/url-nfs.el
Merge from emacs-24; up to 2012-05-04T19:17:01Z!monnier@iro.umontreal.ca
[gnu-emacs] / lisp / url / url-nfs.el
index a22d105b1a1ecda4db68c9dfb51e8e7666b01c35..2eed16c3ad3d31aa9cec9fb119b6e50d0a4d9fd4 100644 (file)
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
 (require 'url-parse)
 (require 'url-file)
 
-(defvar url-nfs-automounter-directory-spec
-  "file:/net/%h%f"
-  "*How to invoke the NFS automounter.  Certain % sequences are recognized.
+(defcustom url-nfs-automounter-directory-spec "file:/net/%h%f"
+  "How to invoke the NFS automounter.  Certain % sequences are recognized.
 
 %h -- the hostname of the NFS server
 %n -- the port # of the NFS server
@@ -38,7 +36,9 @@
 %f -- the filename on the remote server
 %% -- a literal %
 
-Each can be used any number of times.")
+Each can be used any number of times."
+  :group 'url
+  :type 'string)
 
 (defun url-nfs-unescape (format host port user pass file)
   (with-current-buffer (get-buffer-create " *nfs-parse*")
@@ -48,7 +48,7 @@ Each can be used any number of times.")
     (while (re-search-forward "%\\(.\\)" nil t)
        (let ((escape (aref (match-string 1) 0)))
         (replace-match "" t t)
-        (case escape
+        (pcase escape
           (?% (insert "%"))
           (?h (insert host))
           (?n (insert (or port "")))