aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2012-11-18 09:10:35 -0800
committerPaul Eggert2012-11-18 09:10:35 -0800
commit535efd4a430b6595a30efaa2919e565ad21209b9 (patch)
treec21d0af518630ab3e9ad7d0142568bb8fc759493
parent273ac8d1ef96529d010975b59caa99489cbc51b4 (diff)
downloademacs-535efd4a430b6595a30efaa2919e565ad21209b9.tar.gz
emacs-535efd4a430b6595a30efaa2919e565ad21209b9.zip
More minor time fixes.
* calendar/time-date.el: Commentary fix. * net/tramp-sh.el (tramp-do-file-attributes-with-ls): Undo last change; too much other code depends on (0 0) time stamps. * net/tramp.el (tramp-time-less-p, tramp-time-subtract): Add a couple of FIXME comments.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/calendar/time-date.el9
-rw-r--r--lisp/net/tramp-sh.el7
-rw-r--r--lisp/net/tramp.el2
4 files changed, 17 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 920f893bb7d..a6fdf7ebc4b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,12 @@
12012-11-18 Paul Eggert <eggert@cs.ucla.edu> 12012-11-18 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 More minor time fixes.
4 * calendar/time-date.el: Commentary fix.
5 * net/tramp-sh.el (tramp-do-file-attributes-with-ls): Undo last change;
6 too much other code depends on (0 0) time stamps.
7 * net/tramp.el (tramp-time-less-p, tramp-time-subtract):
8 Add a couple of FIXME comments.
9
3 Minor cleanup for times as lists of four integers. 10 Minor cleanup for times as lists of four integers.
4 * files.el (dir-locals-directory-cache): 11 * files.el (dir-locals-directory-cache):
5 * ps-bdf.el (bdf-file-mod-time, bdf-read-font-info): 12 * ps-bdf.el (bdf-file-mod-time, bdf-read-font-info):
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index 38b766084c9..6e967bd8c79 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -30,11 +30,10 @@
30;; value equal to HIGH * 2^16 + LOW + USEC * 10^-6 + PSEC * 10^-12 30;; value equal to HIGH * 2^16 + LOW + USEC * 10^-6 + PSEC * 10^-12
31;; seconds, where missing components are treated as zero. HIGH can be 31;; seconds, where missing components are treated as zero. HIGH can be
32;; negative, either because the value is a time difference, or because 32;; negative, either because the value is a time difference, or because
33;; the machine supports negative time stamps that fall before the 33;; the machine supports negative time stamps that fall before the epoch.
34;; epoch. The macro `with-decoded-time-value' and the 34;; The macro `with-decoded-time-value' and the function
35;; function `encode-time-value' make it easier to deal with these 35;; `encode-time-value' make it easier to deal with these formats.
36;; three formats. See `time-subtract' for an example of how to use 36;; See `time-subtract' for an example of how to use them.
37;; them.
38 37
39;;; Code: 38;;; Code:
40 39
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 5b090047f8d..059e1e63c77 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1270,11 +1270,12 @@ target of the symlink differ."
1270 res-uid 1270 res-uid
1271 ;; 3. File gid. 1271 ;; 3. File gid.
1272 res-gid 1272 res-gid
1273 ;; 4. Last access time, as a list of integers in the same format 1273 ;; 4. Last access time, as a list of integers. Normally this would be
1274 ;; as `current-time'. 1274 ;; in the same format as `current-time', but the subseconds part is not
1275 ;; currently implemented, and (0 0) denotes an unknown time.
1275 ;; 5. Last modification time, likewise. 1276 ;; 5. Last modification time, likewise.
1276 ;; 6. Last status change time, likewise. 1277 ;; 6. Last status change time, likewise.
1277 '(0 0 0 0) '(0 0 0 0) '(0 0 0 0) ;CCC how to find out? 1278 '(0 0) '(0 0) '(0 0) ;CCC how to find out?
1278 ;; 7. Size in bytes (-1, if number is out of range). 1279 ;; 7. Size in bytes (-1, if number is out of range).
1279 res-size 1280 res-size
1280 ;; 8. File modes, as a string of ten letters or dashes as in ls -l. 1281 ;; 8. File modes, as a string of ten letters or dashes as in ls -l.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 874c0aa7fef..6157da20db7 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3761,6 +3761,7 @@ Invokes `password-read' if available, `read-passwd' else."
3761 ("oct" . 10) ("nov" . 11) ("dec" . 12)) 3761 ("oct" . 10) ("nov" . 11) ("dec" . 12))
3762 "Alist mapping month names to integers.") 3762 "Alist mapping month names to integers.")
3763 3763
3764;; FIXME: Shouldn't this also look at any subseconds parts of T1 and T2?
3764;;;###tramp-autoload 3765;;;###tramp-autoload
3765(defun tramp-time-less-p (t1 t2) 3766(defun tramp-time-less-p (t1 t2)
3766 "Say whether time value T1 is less than time value T2." 3767 "Say whether time value T1 is less than time value T2."
@@ -3770,6 +3771,7 @@ Invokes `password-read' if available, `read-passwd' else."
3770 (and (= (car t1) (car t2)) 3771 (and (= (car t1) (car t2))
3771 (< (nth 1 t1) (nth 1 t2))))) 3772 (< (nth 1 t1) (nth 1 t2)))))
3772 3773
3774;; FIXME: Shouldn't this also look at any subseconds parts of T1 and T2?
3773(defun tramp-time-subtract (t1 t2) 3775(defun tramp-time-subtract (t1 t2)
3774 "Subtract two time values. 3776 "Subtract two time values.
3775Return the difference in the format of a time value." 3777Return the difference in the format of a time value."