]> code.delx.au - gnu-emacs/blobdiff - lisp/url/url-nfs.el
Update copyright year to 2015
[gnu-emacs] / lisp / url / url-nfs.el
index 6261b6fddb1ad12da29433c0fa25e98c7de220a2..1f8a4096460da1ba82ad7a178f093660c5af9ee5 100644 (file)
@@ -1,7 +1,6 @@
 ;;; url-nfs.el --- NFS URL interface
 
-;; Copyright (C) 1996, 1997, 1998, 1999, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc.
 
 ;; Keywords: comm, data, processes
 
 
 ;;; 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
@@ -39,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*")
@@ -49,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 "")))