aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2012-11-17 18:13:19 -0800
committerPaul Eggert2012-11-17 18:13:19 -0800
commit0c93aa38b3f5333d7b026e6cc1e0c9d313a4da71 (patch)
tree9c84c831fd2a9729822bed4d59f6b16bd2218d08
parent291a654dad6d4604ed4db80885b3af04e64c944f (diff)
downloademacs-0c93aa38b3f5333d7b026e6cc1e0c9d313a4da71.tar.gz
emacs-0c93aa38b3f5333d7b026e6cc1e0c9d313a4da71.zip
Minor cleanup for times as lists of four integers.
* doc/lispref/os.texi (Time Parsing): Time values can now be four integers. * lisp/files.el (dir-locals-directory-cache): * lisp/ps-bdf.el (bdf-file-mod-time, bdf-read-font-info): Doc fixes. * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls): * lisp/ps-bdf.el (bdf-file-newer-than-time): Process four-integers time stamps, not two. Doc fixes.
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/os.texi4
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/files.el2
-rw-r--r--lisp/net/tramp-sh.el7
-rw-r--r--lisp/ps-bdf.el19
6 files changed, 28 insertions, 19 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 43ca9ac4aa5..389d94bf8c5 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12012-11-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 Minor cleanup for times as lists of four integers.
4 * os.texi (Time Parsing): Time values can now be four integers.
5
12012-11-18 Glenn Morris <rgm@gnu.org> 62012-11-18 Glenn Morris <rgm@gnu.org>
2 7
3 * loading.texi (How Programs Do Loading): Add eager macro expansion. 8 * loading.texi (How Programs Do Loading): Add eager macro expansion.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 6c5f6e85683..002632c3479 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1373,8 +1373,8 @@ on others, years as early as 1901 do work.
1373@node Time Parsing 1373@node Time Parsing
1374@section Parsing and Formatting Times 1374@section Parsing and Formatting Times
1375 1375
1376 These functions convert time values (lists of two or three integers) 1376 These functions convert time values to text in a string, and vice versa.
1377to text in a string, and vice versa. 1377Time values are lists of two to four integers (@pxref{Time of Day}).
1378 1378
1379@defun date-to-time string 1379@defun date-to-time string
1380This function parses the time-string @var{string} and returns the 1380This function parses the time-string @var{string} and returns the
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 00cf0c1afb6..920f893bb7d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12012-11-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 Minor cleanup for times as lists of four integers.
4 * files.el (dir-locals-directory-cache):
5 * ps-bdf.el (bdf-file-mod-time, bdf-read-font-info):
6 Doc fixes.
7 * net/tramp-sh.el (tramp-do-file-attributes-with-ls):
8 * ps-bdf.el (bdf-file-newer-than-time):
9 Process four-integers time stamps, not two. Doc fixes.
10
12012-11-18 Glenn Morris <rgm@gnu.org> 112012-11-18 Glenn Morris <rgm@gnu.org>
2 12
3 * image.el (insert-image, insert-sliced-image): Doc fix. 13 * image.el (insert-image, insert-sliced-image): Doc fix.
diff --git a/lisp/files.el b/lisp/files.el
index 26c5c683b3d..51f8256f71a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3424,7 +3424,7 @@ DIR is the name of the directory.
3424CLASS is the name of a variable class (a symbol). 3424CLASS is the name of a variable class (a symbol).
3425MTIME is the recorded modification time of the directory-local 3425MTIME is the recorded modification time of the directory-local
3426variables file associated with this entry. This time is a list 3426variables file associated with this entry. This time is a list
3427of two integers (the same format as `file-attributes'), and is 3427of integers (the same format as `file-attributes'), and is
3428used to test whether the cache entry is still valid. 3428used to test whether the cache entry is still valid.
3429Alternatively, MTIME can be nil, which means the entry is always 3429Alternatively, MTIME can be nil, which means the entry is always
3430considered valid.") 3430considered valid.")
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ec321d00506..5b090047f8d 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1270,12 +1270,11 @@ 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 two integers. First 1273 ;; 4. Last access time, as a list of integers in the same format
1274 ;; integer has high-order 16 bits of time, second has low 16 1274 ;; as `current-time'.
1275 ;; bits.
1276 ;; 5. Last modification time, likewise. 1275 ;; 5. Last modification time, likewise.
1277 ;; 6. Last status change time, likewise. 1276 ;; 6. Last status change time, likewise.
1278 '(0 0) '(0 0) '(0 0) ;CCC how to find out? 1277 '(0 0 0 0) '(0 0 0 0) '(0 0 0 0) ;CCC how to find out?
1279 ;; 7. Size in bytes (-1, if number is out of range). 1278 ;; 7. Size in bytes (-1, if number is out of range).
1280 res-size 1279 res-size
1281 ;; 8. File modes, as a string of ten letters or dashes as in ls -l. 1280 ;; 8. File modes, as a string of ten letters or dashes as in ls -l.
diff --git a/lisp/ps-bdf.el b/lisp/ps-bdf.el
index a82e03ceda7..477aee1b2da 100644
--- a/lisp/ps-bdf.el
+++ b/lisp/ps-bdf.el
@@ -70,20 +70,15 @@ for BDFNAME."
70 70
71(defsubst bdf-file-mod-time (filename) 71(defsubst bdf-file-mod-time (filename)
72 "Return modification time of FILENAME. 72 "Return modification time of FILENAME.
73The value is a list of two integers, the first integer has high-order 73The value is a list of integers in the same format as `current-time'."
7416 bits, the second has low 16 bits."
75 (nth 5 (file-attributes filename))) 74 (nth 5 (file-attributes filename)))
76 75
77(defun bdf-file-newer-than-time (filename mod-time) 76(defun bdf-file-newer-than-time (filename mod-time)
78 "Return non-nil if and only if FILENAME is newer than MOD-TIME. 77 "Return non-nil if and only if FILENAME is newer than MOD-TIME.
79MOD-TIME is a modification time as a list of two integers, the first 78MOD-TIME is a modification time as a list of integers in the same
80integer has high-order 16 bits, the second has low 16 bits." 79format as `current-time'."
81 (let* ((new-mod-time (bdf-file-mod-time filename)) 80 (let ((new-mod-time (bdf-file-mod-time filename)))
82 (new-time (car new-mod-time)) 81 (time-less-p mod-time new-mod-time)))
83 (time (car mod-time)))
84 (or (> new-time time)
85 (and (= new-time time)
86 (> (nth 1 new-mod-time) (nth 1 mod-time))))))
87 82
88(defun bdf-find-file (bdfname) 83(defun bdf-find-file (bdfname)
89 "Return a buffer visiting a bdf file BDFNAME. 84 "Return a buffer visiting a bdf file BDFNAME.
@@ -178,8 +173,8 @@ FONT-INFO is a list of the following format:
178 (BDFFILE MOD-TIME FONT-BOUNDING-BOX 173 (BDFFILE MOD-TIME FONT-BOUNDING-BOX
179 RELATIVE-COMPOSE BASELINE-OFFSET CODE-RANGE MAXLEN OFFSET-VECTOR) 174 RELATIVE-COMPOSE BASELINE-OFFSET CODE-RANGE MAXLEN OFFSET-VECTOR)
180 175
181MOD-TIME is last modification time as a list of two integers, the 176MOD-TIME is last modification time as a list of integers in the
182first integer has high-order 16 bits, the second has low 16 bits. 177same format as `current-time'.
183 178
184SIZE is a size of the font on 72 dpi device. This value is got 179SIZE is a size of the font on 72 dpi device. This value is got
185from SIZE record of the font. 180from SIZE record of the font.