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
566f5ae6
Commit
566f5ae6
authored
Mar 27, 2008
by
Glenn Morris
Browse files
(diary-mark-entries-1): Fix position offsets in non-gregorian case.
parent
78d2cbe1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
lisp/ChangeLog
lisp/ChangeLog
+1
-0
lisp/calendar/diary-lib.el
lisp/calendar/diary-lib.el
+5
-8
No files found.
lisp/ChangeLog
View file @
566f5ae6
...
...
@@ -20,6 +20,7 @@
(diary-display-no-entries): New function.
(simple-diary-display, fancy-diary-display): Use it.
(fancy-diary-display): Doc fix. Remove unneeded local entry-list.
(diary-mark-entries-1): Fix position offsets in non-gregorian case.
2008-03-26 Jay Belanger <jay.p.belanger@gmail.com>
...
...
lisp/calendar/diary-lib.el
View file @
566f5ae6
...
...
@@ -1108,24 +1108,21 @@ function that converts absolute dates to dates of the appropriate type. "
(day "[0-9]+\\|\\*
")
(year "
[0-9]+\\|\\*")
(case-fold-search t)
;; FIXME is this the right reason for 1 versus 2?
;; Should docs of symbols say must be single character?
(inc (if symbol 2 1))
marks)
(dolist (date-form diary-date-forms)
(if (eq (car date-form) 'backup) ; ignore 'backup directive
(setq date-form (cdr date-form)))
(let* ((l (length date-form))
(d-name-pos (- l (length (memq 'dayname date-form))))
(d-name-pos (if (/= l d-name-pos) (+
inc
d-name-pos)))
(d-name-pos (if (/= l d-name-pos) (
1
+ d-name-pos)))
(m-name-pos (- l (length (memq 'monthname date-form))))
(m-name-pos (if (/= l m-name-pos) (+
inc
m-name-pos)))
(m-name-pos (if (/= l m-name-pos) (
1
+ m-name-pos)))
(d-pos (- l (length (memq 'day date-form))))
(d-pos (if (/= l d-pos) (+
inc
d-pos)))
(d-pos (if (/= l d-pos) (
1
+ d-pos)))
(m-pos (- l (length (memq 'month date-form))))
(m-pos (if (/= l m-pos) (+
inc
m-pos)))
(m-pos (if (/= l m-pos) (
1
+ m-pos)))
(y-pos (- l (length (memq 'year date-form))))
(y-pos (if (/= l y-pos) (+
inc
y-pos)))
(y-pos (if (/= l y-pos) (
1
+ y-pos)))
(regexp (format "^%s\\(%s\\)"
(if symbol (regexp-quote symbol) "")
(mapconcat 'eval date-form "\\)\\("))))
...
...
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