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
6bd2011c
Commit
6bd2011c
authored
Jul 25, 2007
by
Nick Roberts
Browse files
(change-log-redate): Remove (not needed anymore and
doesn't appear to work).
parent
5a1164db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
23 deletions
+0
-23
lisp/add-log.el
lisp/add-log.el
+0
-23
No files found.
lisp/add-log.el
View file @
6bd2011c
...
...
@@ -1104,29 +1104,6 @@ old-style time formats for entries are supported."
(
goto-char
(
point-max
)))
(
insert-buffer-substring
other-buf
start
)))))))
;;;###autoload
(
defun
change-log-redate
()
"Fix any old-style date entries in the current log file to default format."
(
interactive
)
(
require
'timezone
)
(
save-excursion
(
goto-char
(
point-min
))
(
while
(
re-search-forward
"^\\sw.........[0-9:+ ]*"
nil
t
)
(
unless
(
=
12
(
-
(
match-end
0
)
(
match-beginning
0
)))
(
let*
((
date
(
save-match-data
(
timezone-fix-time
(
match-string
0
)
nil
nil
)))
(
zone
(
if
(
consp
(
aref
date
6
))
(
nth
1
(
aref
date
6
)))))
(
replace-match
(
format-time-string
"%Y-%m-%d "
(
encode-time
(
aref
date
5
)
(
aref
date
4
)
(
aref
date
3
)
(
aref
date
2
)
(
aref
date
1
)
(
aref
date
0
)
zone
))))))))
(
provide
'add-log
)
;; arch-tag: 81eee6fc-088f-4372-a37f-80ad9620e762
...
...
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