aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2016-12-05 16:06:04 +0100
committerMichael Albinus2016-12-05 16:06:04 +0100
commit1b762de16642cd08a7fbc47e2e0c058af2e09a11 (patch)
tree4a294bc1be481f73a18297ddb427871d4b96c368
parentd75e9881fdf648fcb6c25e344353450a7806feee (diff)
downloademacs-1b762de16642cd08a7fbc47e2e0c058af2e09a11.tar.gz
emacs-1b762de16642cd08a7fbc47e2e0c058af2e09a11.zip
Remove compat code in Tramp
* lisp/net/tramp.el (tramp-parse-time-months): Remove. * lisp/net/tramp-compat.el (top): Require parse-time. * lisp/net/tramp-smb.el (tramp-smb-read-file-entry): Use `parse-time-months'.
-rw-r--r--lisp/net/tramp-compat.el1
-rw-r--r--lisp/net/tramp-smb.el2
-rw-r--r--lisp/net/tramp.el9
3 files changed, 3 insertions, 9 deletions
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 4ebae79d32a..a079b670641 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -37,6 +37,7 @@
37(require 'advice) 37(require 'advice)
38(require 'custom) 38(require 'custom)
39(require 'format-spec) 39(require 'format-spec)
40(require 'parse-time)
40(require 'password-cache) 41(require 'password-cache)
41(require 'shell) 42(require 'shell)
42(require 'timer) 43(require 'timer)
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 61796a25bb3..e52296faaf7 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1724,7 +1724,7 @@ Result is the list (LOCALNAME MODE SIZE MTIME)."
1724 (if (and sec min hour day month year) 1724 (if (and sec min hour day month year)
1725 (encode-time 1725 (encode-time
1726 sec min hour day 1726 sec min hour day
1727 (cdr (assoc (downcase month) tramp-parse-time-months)) 1727 (cdr (assoc (downcase month) parse-time-months))
1728 year) 1728 year)
1729 '(0 0))) 1729 '(0 0)))
1730 (list localname mode size mtime)))) 1730 (list localname mode size mtime))))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index a92b602e36a..1eb66cf59ef 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4292,18 +4292,11 @@ Invokes `password-read' if available, `read-passwd' else."
4292 'auth-source-forget-user-or-password "password" host method)) 4292 'auth-source-forget-user-or-password "password" host method))
4293 (password-cache-remove (tramp-make-tramp-file-name method user host "")))) 4293 (password-cache-remove (tramp-make-tramp-file-name method user host ""))))
4294 4294
4295;; Snarfed code from time-date.el and parse-time.el 4295;; Snarfed code from time-date.el.
4296 4296
4297(defconst tramp-half-a-year '(241 17024) 4297(defconst tramp-half-a-year '(241 17024)
4298"Evaluated by \"(days-to-time 183)\".") 4298"Evaluated by \"(days-to-time 183)\".")
4299 4299
4300(defconst tramp-parse-time-months
4301 '(("jan" . 1) ("feb" . 2) ("mar" . 3)
4302 ("apr" . 4) ("may" . 5) ("jun" . 6)
4303 ("jul" . 7) ("aug" . 8) ("sep" . 9)
4304 ("oct" . 10) ("nov" . 11) ("dec" . 12))
4305 "Alist mapping month names to integers.")
4306
4307;;;###tramp-autoload 4300;;;###tramp-autoload
4308(defun tramp-time-diff (t1 t2) 4301(defun tramp-time-diff (t1 t2)
4309 "Return the difference between the two times, in seconds. 4302 "Return the difference between the two times, in seconds.