]> code.delx.au - gnu-emacs/blob - lisp/tmm.el
Merge from emacs--devo--0
[gnu-emacs] / lisp / tmm.el
1 ;;; tmm.el --- text mode access to menu-bar
2
3 ;; Copyright (C) 1994, 1995, 1996, 2000, 2001, 2002, 2003,
4 ;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5
6 ;; Author: Ilya Zakharevich <ilya@math.mps.ohio-state.edu>
7 ;; Maintainer: FSF
8 ;; Keywords: convenience
9
10 ;; This file is part of GNU Emacs.
11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 3, or (at your option)
15 ;; any later version.
16
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
26
27 ;;; Commentary:
28
29 ;; This package provides text mode access to the menu bar.
30
31 ;;; Code:
32
33 (require 'electric)
34
35 (defgroup tmm nil
36 "Text mode access to menu-bar."
37 :prefix "tmm-"
38 :group 'menu)
39
40 ;;; The following will be localized, added only to pacify the compiler.
41 (defvar tmm-short-cuts)
42 (defvar tmm-old-mb-map nil)
43 (defvar tmm-old-comp-map)
44 (defvar tmm-c-prompt nil)
45 (defvar tmm-km-list)
46 (defvar tmm-next-shortcut-digit)
47 (defvar tmm-table-undef)
48
49 ;;;###autoload (define-key global-map "\M-`" 'tmm-menubar)
50 ;;;###autoload (define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse)
51
52 ;;;###autoload
53 (defun tmm-menubar (&optional x-position)
54 "Text-mode emulation of looking and choosing from a menubar.
55 See the documentation for `tmm-prompt'.
56 X-POSITION, if non-nil, specifies a horizontal position within the menu bar;
57 we make that menu bar item (the one at that position) the default choice."
58 (interactive)
59 (run-hooks 'menu-bar-update-hook)
60 ;; Obey menu-bar-final-items; put those items last.
61 (let ((menu-bar (tmm-get-keybind [menu-bar]))
62 menu-bar-item)
63 (let ((list menu-bar-final-items))
64 (while list
65 (let ((item (car list)))
66 ;; ITEM is the name of an item that we want to put last.
67 ;; Find it in MENU-BAR and move it to the end.
68 (let ((this-one (assq item menu-bar)))
69 (setq menu-bar (append (delq this-one menu-bar)
70 (list this-one)))))
71 (setq list (cdr list))))
72 (if x-position
73 (let ((tail menu-bar) (column 0)
74 this-one name visible)
75 (while (and tail (<= column x-position))
76 (setq this-one (car tail))
77 (if (and (consp this-one)
78 (consp (cdr this-one))
79 (setq name ;simple menu
80 (cond ((stringp (nth 1 this-one))
81 (nth 1 this-one))
82 ;extended menu
83 ((stringp (nth 2 this-one))
84 (setq visible (plist-get
85 (nthcdr 4 this-one) :visible))
86 (unless (and visible (not (eval visible)))
87 (nth 2 this-one))))))
88 (setq column (+ column (length name) 1)))
89 (setq tail (cdr tail)))
90 (setq menu-bar-item (car this-one))))
91 (tmm-prompt menu-bar nil menu-bar-item)))
92
93 ;;;###autoload
94 (defun tmm-menubar-mouse (event)
95 "Text-mode emulation of looking and choosing from a menubar.
96 This command is used when you click the mouse in the menubar
97 on a console which has no window system but does have a mouse.
98 See the documentation for `tmm-prompt'."
99 (interactive "e")
100 (tmm-menubar (car (posn-x-y (event-start event)))))
101
102 (defcustom tmm-mid-prompt "==>"
103 "*String to insert between shortcut and menu item.
104 If nil, there will be no shortcuts. It should not consist only of spaces,
105 or else the correct item might not be found in the `*Completions*' buffer."
106 :type 'string
107 :group 'tmm)
108
109 (defvar tmm-mb-map nil
110 "A place to store minibuffer map.")
111
112 (defcustom tmm-completion-prompt
113 "Press PageUp key to reach this buffer from the minibuffer.
114 Alternatively, you can use Up/Down keys (or your History keys) to change
115 the item in the minibuffer, and press RET when you are done, or press the
116 marked letters to pick up your choice. Type C-g or ESC ESC ESC to cancel.
117 "
118 "*Help text to insert on the top of the completion buffer.
119 To save space, you can set this to nil,
120 in which case the standard introduction text is deleted too."
121 :type '(choice string (const nil))
122 :group 'tmm)
123
124 (defcustom tmm-shortcut-style '(downcase upcase)
125 "*What letters to use as menu shortcuts.
126 Must be either one of the symbols `downcase' or `upcase',
127 or else a list of the two in the order you prefer."
128 :type '(choice (const downcase)
129 (const upcase)
130 (repeat (choice (const downcase) (const upcase))))
131 :group 'tmm)
132
133 (defcustom tmm-shortcut-words 2
134 "*How many successive words to try for shortcuts, nil means all.
135 If you use only one of `downcase' or `upcase' for `tmm-shortcut-style',
136 specify nil for this variable."
137 :type '(choice integer (const nil))
138 :group 'tmm)
139
140 (defface tmm-inactive
141 '((t :inherit shadow))
142 "Face used for inactive menu items."
143 :group 'tmm)
144
145 ;;;###autoload
146 (defun tmm-prompt (menu &optional in-popup default-item)
147 "Text-mode emulation of calling the bindings in keymap.
148 Creates a text-mode menu of possible choices. You can access the elements
149 in the menu in two ways:
150 *) via history mechanism from minibuffer;
151 *) Or via completion-buffer that is automatically shown.
152 The last alternative is currently a hack, you cannot use mouse reliably.
153
154 MENU is like the MENU argument to `x-popup-menu': either a
155 keymap or an alist of alists.
156 DEFAULT-ITEM, if non-nil, specifies an initial default choice.
157 Its value should be an event that has a binding in MENU."
158 ;; If the optional argument IN-POPUP is t,
159 ;; then MENU is an alist of elements of the form (STRING . VALUE).
160 ;; That is used for recursive calls only.
161 (let ((gl-str "Menu bar") ;; The menu bar itself is not a menu keymap
162 ; so it doesn't have a name.
163 tmm-km-list out history history-len tmm-table-undef tmm-c-prompt
164 tmm-old-mb-map tmm-old-comp-map tmm-short-cuts
165 chosen-string choice
166 (not-menu (not (keymapp menu))))
167 (run-hooks 'activate-menubar-hook)
168 ;; Compute tmm-km-list from MENU.
169 ;; tmm-km-list is an alist of (STRING . MEANING).
170 ;; It has no other elements.
171 ;; The order of elements in tmm-km-list is the order of the menu bar.
172 (mapc (lambda (elt)
173 (if (stringp elt)
174 (setq gl-str elt)
175 (and (listp elt) (tmm-get-keymap elt not-menu))))
176 menu)
177 ;; Choose an element of tmm-km-list; put it in choice.
178 (if (and not-menu (= 1 (length tmm-km-list)))
179 ;; If this is the top-level of an x-popup-menu menu,
180 ;; and there is just one pane, choose that one silently.
181 ;; This way we only ask the user one question,
182 ;; for which element of that pane.
183 (setq choice (cdr (car tmm-km-list)))
184 (unless tmm-km-list
185 (error "Empty menu reached"))
186 (and tmm-km-list
187 (let ((index-of-default 0))
188 (if tmm-mid-prompt
189 (setq tmm-km-list (tmm-add-shortcuts tmm-km-list))
190 t)
191 ;; Find the default item's index within the menu bar.
192 ;; We use this to decide the initial minibuffer contents
193 ;; and initial history position.
194 (if default-item
195 (let ((tail menu) visible)
196 (while (and tail
197 (not (eq (car-safe (car tail)) default-item)))
198 ;; Be careful to count only the elements of MENU
199 ;; that actually constitute menu bar items.
200 (if (and (consp (car tail))
201 (or (stringp (car-safe (cdr (car tail))))
202 (and
203 (eq (car-safe (cdr (car tail))) 'menu-item)
204 (progn
205 (setq visible
206 (plist-get
207 (nthcdr 4 (car tail)) :visible))
208 (or (not visible) (eval visible))))))
209 (setq index-of-default (1+ index-of-default)))
210 (setq tail (cdr tail)))))
211 (let ((prompt (concat "^." (regexp-quote tmm-mid-prompt))))
212 (setq history
213 (reverse (delq nil
214 (mapcar
215 (lambda (elt)
216 (if (string-match prompt (car elt))
217 (car elt)))
218 tmm-km-list)))))
219 (setq history-len (length history))
220 (setq history (append history history history history))
221 (setq tmm-c-prompt (nth (- history-len 1 index-of-default) history))
222 (add-hook 'minibuffer-setup-hook 'tmm-add-prompt)
223 (if default-item
224 (setq out (car (nth index-of-default tmm-km-list)))
225 (save-excursion
226 (unwind-protect
227 (setq out
228 (completing-read
229 (concat gl-str
230 " (up/down to change, PgUp to menu): ")
231 tmm-km-list nil t nil
232 (cons 'history
233 (- (* 2 history-len) index-of-default))))
234 (save-excursion
235 (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt)
236 (if (get-buffer "*Completions*")
237 (progn
238 (set-buffer "*Completions*")
239 (use-local-map tmm-old-comp-map)
240 (bury-buffer (current-buffer))))))))))
241 (setq choice (cdr (assoc out tmm-km-list)))
242 (and (null choice)
243 (> (length out) (length tmm-c-prompt))
244 (string= (substring out 0 (length tmm-c-prompt)) tmm-c-prompt)
245 (setq out (substring out (length tmm-c-prompt))
246 choice (cdr (assoc out tmm-km-list))))
247 (and (null choice) out
248 (setq out (try-completion out tmm-km-list)
249 choice (cdr (assoc out tmm-km-list)))))
250 ;; CHOICE is now (STRING . MEANING). Separate the two parts.
251 (setq chosen-string (car choice))
252 (setq choice (cdr choice))
253 (cond (in-popup
254 ;; We just did the inner level of a -popup menu.
255 choice)
256 ;; We just did the outer level. Do the inner level now.
257 (not-menu (tmm-prompt choice t))
258 ;; We just handled a menu keymap and found another keymap.
259 ((keymapp choice)
260 (if (symbolp choice)
261 (setq choice (indirect-function choice)))
262 (condition-case nil
263 (require 'mouse)
264 (error nil))
265 (condition-case nil
266 (x-popup-menu nil choice) ; Get the shortcuts
267 (error nil))
268 (tmm-prompt choice))
269 ;; We just handled a menu keymap and found a command.
270 (choice
271 (if chosen-string
272 (progn
273 (setq last-command-event chosen-string)
274 (call-interactively choice))
275 choice)))))
276
277 (defun tmm-add-shortcuts (list)
278 "Adds shortcuts to cars of elements of the list.
279 Takes a list of lists with a string as car, returns list with
280 shortcuts added to these cars.
281 Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
282 (let ((tmm-next-shortcut-digit ?0))
283 (mapcar 'tmm-add-one-shortcut (reverse list))))
284
285 (defsubst tmm-add-one-shortcut (elt)
286 ;; uses the free vars tmm-next-shortcut-digit and tmm-short-cuts
287 (cond
288 ((eq (cddr elt) 'ignore)
289 (cons (concat " " (make-string (length tmm-mid-prompt) ?\-)
290 (car elt))
291 (cdr elt)))
292 (t
293 (let* ((str (car elt))
294 (paren (string-match "(" str))
295 (pos 0) (word 0) char)
296 (catch 'done ; ??? is this slow?
297 (while (and (or (not tmm-shortcut-words) ; no limit on words
298 (< word tmm-shortcut-words)) ; try n words
299 (setq pos (string-match "\\w+" str pos)) ; get next word
300 (not (and paren (> pos paren)))) ; don't go past "(binding.."
301 (if (or (= pos 0)
302 (/= (aref str (1- pos)) ?.)) ; avoid file extensions
303 (let ((shortcut-style
304 (if (listp tmm-shortcut-style) ; convert to list
305 tmm-shortcut-style
306 (list tmm-shortcut-style))))
307 (while shortcut-style ; try upcase and downcase variants
308 (setq char (funcall (car shortcut-style) (aref str pos)))
309 (if (not (memq char tmm-short-cuts)) (throw 'done char))
310 (setq shortcut-style (cdr shortcut-style)))))
311 (setq word (1+ word))
312 (setq pos (match-end 0)))
313 (while (<= tmm-next-shortcut-digit ?9) ; no letter shortcut, pick a digit
314 (setq char tmm-next-shortcut-digit)
315 (setq tmm-next-shortcut-digit (1+ tmm-next-shortcut-digit))
316 (if (not (memq char tmm-short-cuts)) (throw 'done char)))
317 (setq char nil))
318 (if char (setq tmm-short-cuts (cons char tmm-short-cuts)))
319 (cons (concat (if char (concat (char-to-string char) tmm-mid-prompt)
320 ;; keep them lined up in columns
321 (make-string (1+ (length tmm-mid-prompt)) ?\s))
322 str)
323 (cdr elt))))))
324
325 ;; This returns the old map.
326 (defun tmm-define-keys (minibuffer)
327 (let ((map (make-sparse-keymap)))
328 (suppress-keymap map t)
329 (mapc
330 (lambda (c)
331 (if (listp tmm-shortcut-style)
332 (define-key map (char-to-string c) 'tmm-shortcut)
333 ;; only one kind of letters are shortcuts, so map both upcase and
334 ;; downcase input to the same
335 (define-key map (char-to-string (downcase c)) 'tmm-shortcut)
336 (define-key map (char-to-string (upcase c)) 'tmm-shortcut)))
337 tmm-short-cuts)
338 (if minibuffer
339 (progn
340 (define-key map [pageup] 'tmm-goto-completions)
341 (define-key map [prior] 'tmm-goto-completions)
342 (define-key map "\ev" 'tmm-goto-completions)
343 (define-key map "\C-n" 'next-history-element)
344 (define-key map "\C-p" 'previous-history-element)))
345 (prog1 (current-local-map)
346 (use-local-map (append map (current-local-map))))))
347
348 (defun tmm-completion-delete-prompt ()
349 (set-buffer standard-output)
350 (goto-char 1)
351 (delete-region 1 (search-forward "Possible completions are:\n")))
352
353 (defun tmm-remove-inactive-mouse-face ()
354 "Remove the mouse-face property from inactive menu items."
355 (let ((inhibit-read-only t)
356 (inactive-string
357 (concat " " (make-string (length tmm-mid-prompt) ?\-)))
358 next)
359 (save-excursion
360 (goto-char (point-min))
361 (while (not (eobp))
362 (setq next (next-single-char-property-change (point) 'mouse-face))
363 (when (looking-at inactive-string)
364 (remove-text-properties (point) next '(mouse-face))
365 (add-text-properties (point) next '(face tmm-inactive)))
366 (goto-char next)))
367 (set-buffer-modified-p nil)))
368
369 (defun tmm-add-prompt ()
370 (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt)
371 (add-hook 'minibuffer-exit-hook 'tmm-delete-map nil t)
372 (unless tmm-c-prompt
373 (error "No active menu entries"))
374 (let ((win (selected-window)))
375 (setq tmm-old-mb-map (tmm-define-keys t))
376 ;; Get window and hide it for electric mode to get correct size
377 (save-window-excursion
378 (let ((completions
379 (mapcar 'car minibuffer-completion-table)))
380 (or tmm-completion-prompt
381 (add-hook 'completion-setup-hook
382 'tmm-completion-delete-prompt 'append))
383 (with-output-to-temp-buffer "*Completions*"
384 (display-completion-list completions))
385 (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt))
386 (set-buffer "*Completions*")
387 (tmm-remove-inactive-mouse-face)
388 (when tmm-completion-prompt
389 (let ((buffer-read-only nil))
390 (goto-char (point-min))
391 (insert tmm-completion-prompt))))
392 (save-selected-window
393 (other-window 1) ; Electric-pop-up-window does
394 ; not work in minibuffer
395 (Electric-pop-up-window "*Completions*")
396 (with-current-buffer "*Completions*"
397 (setq tmm-old-comp-map (tmm-define-keys nil))))
398 (insert tmm-c-prompt)))
399
400 (defun tmm-delete-map ()
401 (remove-hook 'minibuffer-exit-hook 'tmm-delete-map t)
402 (if tmm-old-mb-map
403 (use-local-map tmm-old-mb-map)))
404
405 (defun tmm-shortcut ()
406 "Choose the shortcut that the user typed."
407 (interactive)
408 (let ((c last-command-char) s)
409 (if (symbolp tmm-shortcut-style)
410 (setq c (funcall tmm-shortcut-style c)))
411 (if (memq c tmm-short-cuts)
412 (if (equal (buffer-name) "*Completions*")
413 (progn
414 (goto-char (point-min))
415 (re-search-forward
416 (concat "\\(^\\|[ \t]\\)" (char-to-string c) tmm-mid-prompt))
417 (choose-completion))
418 ;; In minibuffer
419 (delete-region (minibuffer-prompt-end) (point-max))
420 (mapc (lambda (elt)
421 (if (string=
422 (substring (car elt) 0
423 (min (1+ (length tmm-mid-prompt))
424 (length (car elt))))
425 (concat (char-to-string c) tmm-mid-prompt))
426 (setq s (car elt))))
427 tmm-km-list)
428 (insert s)
429 (exit-minibuffer)))))
430
431 (defun tmm-goto-completions ()
432 (interactive)
433 (let ((prompt-end (minibuffer-prompt-end)))
434 (setq tmm-c-prompt (buffer-substring prompt-end (point-max)))
435 (delete-region prompt-end (point-max)))
436 (switch-to-buffer-other-window "*Completions*")
437 (search-forward tmm-c-prompt)
438 (search-backward tmm-c-prompt))
439
440 (defun tmm-get-keymap (elt &optional in-x-menu)
441 "Prepends (DOCSTRING EVENT BINDING) to free variable `tmm-km-list'.
442 The values are deduced from the argument ELT, that should be an
443 element of keymap, an `x-popup-menu' argument, or an element of
444 `x-popup-menu' argument (when IN-X-MENU is not-nil).
445 This function adds the element only if it is not already present.
446 It uses the free variable `tmm-table-undef' to keep undefined keys."
447 (let (km str cache plist filter visible enable (event (car elt)))
448 (setq elt (cdr elt))
449 (if (eq elt 'undefined)
450 (setq tmm-table-undef (cons (cons event nil) tmm-table-undef))
451 (unless (assoc event tmm-table-undef)
452 (cond ((if (listp elt)
453 (or (keymapp elt) (eq (car elt) 'lambda))
454 (fboundp elt))
455 (setq km elt))
456
457 ((if (listp (cdr-safe elt))
458 (or (keymapp (cdr-safe elt))
459 (eq (car (cdr-safe elt)) 'lambda))
460 (fboundp (cdr-safe elt)))
461 (setq km (cdr elt))
462 (and (stringp (car elt)) (setq str (car elt))))
463
464 ((if (listp (cdr-safe (cdr-safe elt)))
465 (or (keymapp (cdr-safe (cdr-safe elt)))
466 (eq (car (cdr-safe (cdr-safe elt))) 'lambda))
467 (fboundp (cdr-safe (cdr-safe elt))))
468 (setq km (cdr (cdr elt)))
469 (and (stringp (car elt)) (setq str (car elt)))
470 (and str
471 (stringp (cdr (car (cdr elt)))) ; keyseq cache
472 (setq cache (cdr (car (cdr elt))))
473 cache (setq str (concat str cache))))
474
475 ((eq (car-safe elt) 'menu-item)
476 ;; (menu-item TITLE COMMAND KEY ...)
477 (setq plist (cdr-safe (cdr-safe (cdr-safe elt))))
478 (when (consp (car-safe plist))
479 (setq plist (cdr-safe plist)))
480 (setq km (nth 2 elt))
481 (setq str (eval (nth 1 elt)))
482 (setq filter (plist-get plist :filter))
483 (if filter
484 (setq km (funcall filter km)))
485 (setq visible (plist-get plist :visible))
486 (if visible
487 (setq km (and (eval visible) km)))
488 (setq enable (plist-get plist :enable))
489 (if enable
490 (setq km (if (eval enable) km 'ignore)))
491 (and str
492 (consp (nth 3 elt))
493 (stringp (cdr (nth 3 elt))) ; keyseq cache
494 (setq cache (cdr (nth 3 elt)))
495 cache
496 (setq str (concat str cache))))
497
498 ((if (listp (cdr-safe (cdr-safe (cdr-safe elt))))
499 (or (keymapp (cdr-safe (cdr-safe (cdr-safe elt))))
500 (eq (car (cdr-safe (cdr-safe (cdr-safe elt)))) 'lambda))
501 (fboundp (cdr-safe (cdr-safe (cdr-safe elt)))))
502 ; New style of easy-menu
503 (setq km (cdr (cdr (cdr elt))))
504 (and (stringp (car elt)) (setq str (car elt)))
505 (and str
506 (stringp (cdr (car (cdr (cdr elt))))) ; keyseq cache
507 (setq cache (cdr (car (cdr (cdr elt)))))
508 cache (setq str (concat str cache))))
509
510 ((stringp event) ; x-popup or x-popup element
511 (if (or in-x-menu (stringp (car-safe elt)))
512 (setq str event event nil km elt)
513 (setq str event event nil km (cons 'keymap elt))
514 ))))
515 (and km (stringp km) (setq str km))
516 ;; Verify that the command is enabled;
517 ;; if not, don't mention it.
518 (when (and km (symbolp km) (get km 'menu-enable))
519 (setq km (if (eval (get km 'menu-enable)) km 'ignore)))
520 (and km str
521 (or (assoc str tmm-km-list)
522 (push (cons str (cons event km)) tmm-km-list))))))
523
524 (defun tmm-get-keybind (keyseq)
525 "Return the current binding of KEYSEQ, merging prefix definitions.
526 If KEYSEQ is a prefix key that has local and global bindings,
527 we merge them into a single keymap which shows the proper order of the menu.
528 However, for the menu bar itself, the value does not take account
529 of `menu-bar-final-items'."
530 (let (allbind bind minorbind localbind globalbind)
531 (setq bind (key-binding keyseq))
532 ;; If KEYSEQ is a prefix key, then BIND is either nil
533 ;; or a symbol defined as a keymap (which satisfies keymapp).
534 (if (keymapp bind)
535 (setq bind nil))
536 ;; If we have a non-keymap definition, return that.
537 (or bind
538 (progn
539 ;; Otherwise, it is a prefix, so make a list of the subcommands.
540 ;; Make a list of all the bindings in all the keymaps.
541 (setq minorbind (mapcar 'cdr (minor-mode-key-binding keyseq)))
542 (setq localbind (local-key-binding keyseq))
543 (setq globalbind (copy-sequence (cdr (global-key-binding keyseq))))
544
545 ;; If items have been redefined/undefined locally, remove them from
546 ;; the global list.
547 (dolist (minor minorbind)
548 (dolist (item (cdr minor))
549 (setq globalbind (assq-delete-all (car-safe item) globalbind))))
550 (dolist (item (cdr localbind))
551 (setq globalbind (assq-delete-all (car-safe item) globalbind)))
552
553 (setq globalbind (cons 'keymap globalbind))
554 (setq allbind (cons globalbind (cons localbind minorbind)))
555
556 ;; Merge all the elements of ALLBIND into one keymap.
557 (mapc (lambda (in)
558 (if (and (symbolp in) (keymapp in))
559 (setq in (symbol-function in)))
560 (and in (keymapp in)
561 (if (keymapp bind)
562 (setq bind (nconc bind (copy-sequence (cdr in))))
563 (setq bind (copy-sequence in)))))
564 allbind)
565 ;; Return that keymap.
566 bind))))
567
568 (add-hook 'calendar-load-hook (lambda () (require 'cal-menu)))
569
570 (provide 'tmm)
571
572 ;;; arch-tag: e7ddbdb6-4b95-4da3-afbe-ad6063d112f4
573 ;;; tmm.el ends here