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
318a5488
Commit
318a5488
authored
Mar 17, 2008
by
Glenn Morris
Browse files
(list-yahrzeit-dates): Use calendar-in-read-only-buffer to replace
previous code and disable undo.
parent
9449f9eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
26 deletions
+18
-26
lisp/calendar/cal-hebrew.el
lisp/calendar/cal-hebrew.el
+18
-26
No files found.
lisp/calendar/cal-hebrew.el
View file @
318a5488
...
...
@@ -687,32 +687,24 @@ from the cursor position."
(
h-month
(
extract-calendar-month
h-date
))
(
h-day
(
extract-calendar-day
h-date
))
(
h-year
(
extract-calendar-year
h-date
)))
(
set-buffer
(
get-buffer-create
cal-hebrew-yahrzeit-buffer
))
(
setq
buffer-read-only
nil
)
(
calendar-set-mode-line
(
format
"Yahrzeit dates for %s = %s"
(
calendar-date-string
death-date
)
(
let
((
calendar-month-name-array
(
if
(
hebrew-calendar-leap-year-p
h-year
)
calendar-hebrew-month-name-array-leap-year
calendar-hebrew-month-name-array-common-year
)))
(
calendar-date-string
h-date
nil
t
))))
(
erase-buffer
)
(
goto-char
(
point-min
))
(
calendar-for-loop
i
from
start-year
to
end-year
do
(
insert
(
calendar-date-string
(
calendar-gregorian-from-absolute
(
hebrew-calendar-yahrzeit
h-date
(
extract-calendar-year
(
calendar-hebrew-from-absolute
(
calendar-absolute-from-gregorian
(
list
1
1
i
)))))))
"\n"
))
(
goto-char
(
point-min
))
(
set-buffer-modified-p
nil
)
(
setq
buffer-read-only
t
)
(
display-buffer
cal-hebrew-yahrzeit-buffer
)
(
calendar-in-read-only-buffer
cal-hebrew-yahrzeit-buffer
(
calendar-set-mode-line
(
format
"Yahrzeit dates for %s = %s"
(
calendar-date-string
death-date
)
(
let
((
calendar-month-name-array
(
if
(
hebrew-calendar-leap-year-p
h-year
)
calendar-hebrew-month-name-array-leap-year
calendar-hebrew-month-name-array-common-year
)))
(
calendar-date-string
h-date
nil
t
))))
(
calendar-for-loop
i
from
start-year
to
end-year
do
(
insert
(
calendar-date-string
(
calendar-gregorian-from-absolute
(
hebrew-calendar-yahrzeit
h-date
(
extract-calendar-year
(
calendar-hebrew-from-absolute
(
calendar-absolute-from-gregorian
(
list
1
1
i
)))))))
"\n"
)))
(
message
"Computing Yahrzeits...done"
)))
(
defvar
date
)
...
...
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