Mercurial > emacs
comparison lisp/calendar/calendar.el @ 39523:183567a011b1
(calendar-mode-map): Require cal-menu unconditionally.
(calendar-mode): Set up activate-menubar-hook unconditionally.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Mon, 01 Oct 2001 11:05:18 +0000 |
parents | aa185d4220dd |
children | 5c56451d877f |
comparison
equal
deleted
inserted
replaced
39522:6102045363ab | 39523:183567a011b1 |
---|---|
1898 | 1898 |
1899 (defvar calendar-mode-map nil) | 1899 (defvar calendar-mode-map nil) |
1900 (if calendar-mode-map | 1900 (if calendar-mode-map |
1901 nil | 1901 nil |
1902 (setq calendar-mode-map (make-sparse-keymap)) | 1902 (setq calendar-mode-map (make-sparse-keymap)) |
1903 (if (display-popup-menus-p) (require 'cal-menu)) | 1903 (require 'cal-menu) |
1904 (calendar-for-loop i from 0 to 9 do | 1904 (calendar-for-loop i from 0 to 9 do |
1905 (define-key calendar-mode-map (int-to-string i) 'digit-argument)) | 1905 (define-key calendar-mode-map (int-to-string i) 'digit-argument)) |
1906 (let ((l (list 'narrow-to-region 'mark-word 'mark-sexp 'mark-paragraph | 1906 (let ((l (list 'narrow-to-region 'mark-word 'mark-sexp 'mark-paragraph |
1907 'mark-defun 'mark-whole-buffer 'mark-page | 1907 'mark-defun 'mark-whole-buffer 'mark-page |
1908 'downcase-region 'upcase-region 'kill-region | 1908 'downcase-region 'upcase-region 'kill-region |
2099 (setq mode-name "Calendar") | 2099 (setq mode-name "Calendar") |
2100 (use-local-map calendar-mode-map) | 2100 (use-local-map calendar-mode-map) |
2101 (setq buffer-read-only t) | 2101 (setq buffer-read-only t) |
2102 (setq indent-tabs-mode nil) | 2102 (setq indent-tabs-mode nil) |
2103 (update-calendar-mode-line) | 2103 (update-calendar-mode-line) |
2104 (if (display-popup-menus-p) | 2104 (make-local-hook 'activate-menubar-hook) |
2105 (progn | 2105 (add-hook 'activate-menubar-hook 'cal-menu-update nil t) |
2106 (make-local-hook 'activate-menubar-hook) | |
2107 (add-hook 'activate-menubar-hook 'cal-menu-update nil t))) | |
2108 (make-local-variable 'calendar-mark-ring) | 2106 (make-local-variable 'calendar-mark-ring) |
2109 (make-local-variable 'displayed-month);; Month in middle of window. | 2107 (make-local-variable 'displayed-month);; Month in middle of window. |
2110 (make-local-variable 'displayed-year));; Year in middle of window. | 2108 (make-local-variable 'displayed-year));; Year in middle of window. |
2111 | 2109 |
2112 (defun calendar-string-spread (strings char length) | 2110 (defun calendar-string-spread (strings char length) |