Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
89a13959
Commit
89a13959
authored
Jun 12, 2010
by
Romain Francoise
Browse files
Synch with Gnus trunk.
* gnus-util.el (gnus-date-get-time): Move up before first use.
parent
133a8d82
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
14 deletions
+18
-14
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog
+4
-0
lisp/gnus/gnus-util.el
lisp/gnus/gnus-util.el
+14
-14
No files found.
lisp/gnus/ChangeLog
View file @
89a13959
2010-06-12 Romain Francoise <romain@orebokech.com>
* gnus-util.el (gnus-date-get-time): Move up before first use.
2010-06-10 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-mime-buttonized-part-id): New internal variable.
...
...
lisp/gnus/gnus-util.el
View file @
89a13959
...
...
@@ -429,6 +429,20 @@ TIME defaults to the current time."
(
+
(
car
now
)
(
*
(
car
(
cdr
now
))
60
)
(
*
(
car
(
nthcdr
2
now
))
3600
)
(
*
(
-
(
string-to-number
days
)
1
)
3600
24
))))
(
defmacro
gnus-date-get-time
(
date
)
"Convert DATE string to Emacs time.
Cache the result as a text property stored in DATE."
;; Either return the cached value...
`
(
let
((
d
,
date
))
(
if
(
equal
""
d
)
'
(
0
0
)
(
or
(
get-text-property
0
'gnus-time
d
)
;; or compute the value...
(
let
((
time
(
safe-date-to-time
d
)))
;; and store it back in the string.
(
put-text-property
0
1
'gnus-time
time
d
)
time
)))))
(
defvar
gnus-user-date-format-alist
'
(((
gnus-seconds-today
)
.
"%k:%M"
)
(
604800
.
"%a %k:%M"
)
;;that's one week
...
...
@@ -480,20 +494,6 @@ Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"."
(
format-time-string
"%d-%b"
(
gnus-date-get-time
messy-date
))
(
error
" - "
)))
(
defmacro
gnus-date-get-time
(
date
)
"Convert DATE string to Emacs time.
Cache the result as a text property stored in DATE."
;; Either return the cached value...
`
(
let
((
d
,
date
))
(
if
(
equal
""
d
)
'
(
0
0
)
(
or
(
get-text-property
0
'gnus-time
d
)
;; or compute the value...
(
let
((
time
(
safe-date-to-time
d
)))
;; and store it back in the string.
(
put-text-property
0
1
'gnus-time
time
d
)
time
)))))
(
defsubst
gnus-time-iso8601
(
time
)
"Return a string of TIME in YYYYMMDDTHHMMSS format."
(
format-time-string
"%Y%m%dT%H%M%S"
time
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment