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