;;; url-nfs.el --- NFS URL interface
-;; Copyright (C) 1996, 1997, 1998, 1999, 2004,
-;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2013 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
%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)
- (save-excursion
- (set-buffer (get-buffer-create " *nfs-parse*"))
+ (with-current-buffer (get-buffer-create " *nfs-parse*")
(erase-buffer)
(insert format)
(goto-char (point-min))
(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 "")))
(provide 'url-nfs)
-;; arch-tag: cdf9c9ba-b7d2-4c29-8b48-7ae9bbc0d437
;;; url-nfs.el ends here