comparison lisp/tm/tm-vm.el @ 124:9b50b4588a93 r20-1b15

Import from CVS: tag r20-1b15
author cvs
date Mon, 13 Aug 2007 09:26:39 +0200
parents 8619ce7e4c50
children 1856695b1fa9
comparison
equal deleted inserted replaced
123:c77884c6318d 124:9b50b4588a93
7 ;; MORIOKA Tomohiko <morioka@jaist.ac.jp> 7 ;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;; Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp> 8 ;; Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
9 ;; Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> 9 ;; Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
10 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> 10 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
11 ;; Created: 1994/10/29 11 ;; Created: 1994/10/29
12 ;; Version: $Revision: 1.3 $ 12 ;; Version: $Revision: 1.4 $
13 ;; Keywords: mail, MIME, multimedia, multilingual, encoded-word 13 ;; Keywords: mail, MIME, multimedia, multilingual, encoded-word
14 14
15 ;; This file is part of tm (Tools for MIME). 15 ;; This file is part of tm (Tools for MIME).
16 16
17 ;; This program is free software; you can redistribute it and/or 17 ;; This program is free software; you can redistribute it and/or
58 made available.") 58 made available.")
59 59
60 (defvar tm-vm/attach-to-popup-menus t 60 (defvar tm-vm/attach-to-popup-menus t
61 "*If t append MIME specific commands to VM's popup menus.") 61 "*If t append MIME specific commands to VM's popup menus.")
62 62
63 (defvar tm-vm/use-original-url-button nil 63 (defvar tm-vm/use-original-url-button t
64 "*If it is t, use original URL button instead of tm's.") 64 "*If it is t, use original URL button instead of tm's.")
65 65
66 (defvar tm-vm/automatic-mime-preview (or (and (boundp 'vm-display-using-mime) 66 (defvar tm-vm/automatic-mime-preview (or (and (boundp 'vm-display-using-mime)
67 vm-display-using-mime) 67 vm-display-using-mime)
68 t) 68 t)
101 These hooks are run in the MIME-Preview buffer.") 101 These hooks are run in the MIME-Preview buffer.")
102 102
103 ;;; @@ System/Information variables 103 ;;; @@ System/Information variables
104 104
105 (defconst tm-vm/RCS-ID 105 (defconst tm-vm/RCS-ID
106 "$Id: tm-vm.el,v 1.3 1997/03/22 06:02:46 steve Exp $") 106 "$Id: tm-vm.el,v 1.4 1997/04/13 03:14:15 steve Exp $")
107 (defconst tm-vm/version (get-version-string tm-vm/RCS-ID)) 107 (defconst tm-vm/version (get-version-string tm-vm/RCS-ID))
108 108
109 ; Ensure vm-menu-mail-menu gets properly defined *before* tm-vm/vm-emulation-map 109 ; Ensure vm-menu-mail-menu gets properly defined *before* tm-vm/vm-emulation-map
110 ; since it contains a call to vm-menu-initialize-vm-mode-menu-map 110 ; since it contains a call to vm-menu-initialize-vm-mode-menu-map
111 (setq vm-menu-mail-menu 111 (setq vm-menu-mail-menu
423 (goto-char (vm-start-of (car vm-message-pointer))) 423 (goto-char (vm-start-of (car vm-message-pointer)))
424 (forward-line) 424 (forward-line)
425 (narrow-to-region (point) 425 (narrow-to-region (point)
426 (vm-end-of (car vm-message-pointer))) 426 (vm-end-of (car vm-message-pointer)))
427 427
428 (let ((ml vm-message-list)) 428 (let ((ml vm-message-list)
429 (mp vm-message-pointer))
429 (mime/viewer-mode nil nil nil nil nil nil) 430 (mime/viewer-mode nil nil nil nil nil nil)
430 (setq vm-mail-buffer mime::preview/article-buffer) 431 (setq vm-mail-buffer mime::preview/article-buffer)
431 (setq vm-message-list ml)) 432 (setq vm-message-list ml
433 vm-message-pointer mp))
432 ;; Install VM toolbar for MIME-Preview buffer if not installed 434 ;; Install VM toolbar for MIME-Preview buffer if not installed
433 (tm-vm/check-for-toolbar) 435 (tm-vm/check-for-toolbar)
434 (if tm-vm/use-vm-bindings 436 (if tm-vm/use-vm-bindings
435 (progn 437 (progn
436 (define-key tm-vm/vm-emulation-map "\C-c" (current-local-map)) 438 (define-key tm-vm/vm-emulation-map "\C-c" (current-local-map))
440 (vm-menu-support-possible-p)) 442 (vm-menu-support-possible-p))
441 (setq mode-popup-menu tm-vm/popup-menu)))) 443 (setq mode-popup-menu tm-vm/popup-menu))))
442 444
443 ;; Highlight message (and display XFace if supported) 445 ;; Highlight message (and display XFace if supported)
444 (if (or vm-highlighted-header-regexp 446 (if (or vm-highlighted-header-regexp
445 (and (vm-xemacs-p) vm-use-lucid-highlighting)) 447 (and running-xemacs vm-use-lucid-highlighting))
446 (vm-highlight-headers)) 448 (vm-highlight-headers))
447 ;; Energize URLs and buttons 449 ;; Display XFaces with VM internal support if appropriate
450 (if (and vm-display-xfaces
451 running-xemacs
452 (vm-multiple-frames-possible-p)
453 (featurep 'xface))
454 (let ((highlight-headers-hack-x-face-p t)
455 (highlight-headers-regexp nil)
456 (highlight-headers-citation-regexp nil)
457 (highlight-headers-citation-header-regexp nil))
458 (highlight-headers (point-min) (point-max) t)))
459 ;; Energize URLs and buttons
448 (if (and tm-vm/use-original-url-button 460 (if (and tm-vm/use-original-url-button
449 vm-use-menus (vm-menu-support-possible-p)) 461 vm-use-menus (vm-menu-support-possible-p))
450 (progn 462 (progn (vm-energize-headers)
451 (vm-energize-urls) 463 (vm-energize-urls)))
452 (vm-energize-headers)))
453 (run-hooks 'tm-vm/build-mime-preview-buffer-hook) 464 (run-hooks 'tm-vm/build-mime-preview-buffer-hook)
454 )))) 465 ))))
455 466
456 (defun tm-vm/sync-preview-buffer () 467 (defun tm-vm/sync-preview-buffer ()
457 "Ensure that the MIME preview buffer, if it exists, actually corresponds to the current message. 468 "Ensure that the MIME preview buffer, if it exists, actually corresponds to the current message.