comparison lisp/calendar/calendar.el @ 63334:e3610cf31194

(calendar-mode): Use run-mode-hooks.
author Lute Kamstra <lute@gnu.org>
date Sun, 12 Jun 2005 08:57:58 +0000
parents 6e968f79cfbc
children 18a818a2ee7c a1b34dec1104
comparison
equal deleted inserted replaced
63333:cda186c07437 63334:e3610cf31194
2445 2445
2446 For a complete description, type \ 2446 For a complete description, type \
2447 \\<calendar-mode-map>\\[calendar-goto-info-node] from within the calendar. 2447 \\<calendar-mode-map>\\[calendar-goto-info-node] from within the calendar.
2448 2448
2449 \\<calendar-mode-map>\\{calendar-mode-map}" 2449 \\<calendar-mode-map>\\{calendar-mode-map}"
2450
2451 (kill-all-local-variables) 2450 (kill-all-local-variables)
2452 (setq major-mode 'calendar-mode) 2451 (setq major-mode 'calendar-mode)
2453 (setq mode-name "Calendar") 2452 (setq mode-name "Calendar")
2454 (use-local-map calendar-mode-map) 2453 (use-local-map calendar-mode-map)
2455 (setq buffer-read-only t) 2454 (setq buffer-read-only t)
2458 (add-hook 'activate-menubar-hook 'cal-menu-update nil t) 2457 (add-hook 'activate-menubar-hook 'cal-menu-update nil t)
2459 (make-local-variable 'calendar-mark-ring) 2458 (make-local-variable 'calendar-mark-ring)
2460 (make-local-variable 'displayed-month);; Month in middle of window. 2459 (make-local-variable 'displayed-month);; Month in middle of window.
2461 (make-local-variable 'displayed-year) ;; Year in middle of window. 2460 (make-local-variable 'displayed-year) ;; Year in middle of window.
2462 (set (make-local-variable 'font-lock-defaults) 2461 (set (make-local-variable 'font-lock-defaults)
2463 '(calendar-font-lock-keywords t))) 2462 '(calendar-font-lock-keywords t))
2463 (run-mode-hooks 'calendar-mode-hook))
2464 2464
2465 (defun calendar-string-spread (strings char length) 2465 (defun calendar-string-spread (strings char length)
2466 "Concatenate list of STRINGS separated with copies of CHAR to fill LENGTH. 2466 "Concatenate list of STRINGS separated with copies of CHAR to fill LENGTH.
2467 The effect is like mapconcat but the separating pieces are as balanced as 2467 The effect is like mapconcat but the separating pieces are as balanced as
2468 possible. Each item of STRINGS is evaluated before concatenation so it can 2468 possible. Each item of STRINGS is evaluated before concatenation so it can