X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/09d9db2c4921cb2eb0974892164dd03d6bffdd80..4869e0d85a215e7fb0262430a48aa4d5804bf0a4:/lisp/url/url-nfs.el diff --git a/lisp/url/url-nfs.el b/lisp/url/url-nfs.el index 1cda75c59e..15377f59c3 100644 --- a/lisp/url/url-nfs.el +++ b/lisp/url/url-nfs.el @@ -1,6 +1,6 @@ ;;; url-nfs.el --- NFS URL interface -;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2016 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -23,13 +23,11 @@ ;;; 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 "")))