comparison lisp/vm/vm-page.el @ 36:c53a95d3c46d r19-15b101

Import from CVS: tag r19-15b101
author cvs
date Mon, 13 Aug 2007 08:53:38 +0200
parents ec9a17fef872
children 05472e90ae02
comparison
equal deleted inserted replaced
35:279432d5c479 36:c53a95d3c46d
162 ;; window configuration, while this exploratory scrolling forces 162 ;; window configuration, while this exploratory scrolling forces
163 ;; Emacs to recompute the display, giving us an up to the moment 163 ;; Emacs to recompute the display, giving us an up to the moment
164 ;; answer about where the end of the message is going to be 164 ;; answer about where the end of the message is going to be
165 ;; visible when redisplay finally does occur. 165 ;; visible when redisplay finally does occur.
166 (defun vm-howl-if-eom () 166 (defun vm-howl-if-eom ()
167 (let ((w (vm-get-visible-buffer-window (current-buffer)))) 167 (let ((w (get-buffer-window (current-buffer))))
168 (and w 168 (and w
169 (save-excursion 169 (save-excursion
170 (save-window-excursion 170 (save-window-excursion
171 (condition-case () 171 (condition-case ()
172 (let ((next-screen-context-lines 0)) 172 (let ((next-screen-context-lines 0))
448 (or end (setq end (vm-text-end-of (car vm-message-pointer)))) 448 (or end (setq end (vm-text-end-of (car vm-message-pointer))))
449 ;; energize the URLs 449 ;; energize the URLs
450 (if (or vm-highlight-url-face vm-url-browser) 450 (if (or vm-highlight-url-face vm-url-browser)
451 (save-restriction 451 (save-restriction
452 (widen) 452 (widen)
453 (narrow-to-region start 453 (narrow-to-region start end)
454 end)
455 (vm-energize-urls))))) 454 (vm-energize-urls)))))
456 455
457 (defun vm-highlight-headers-maybe () 456 (defun vm-highlight-headers-maybe ()
458 ;; highlight the headers 457 ;; highlight the headers
459 (if (or vm-highlighted-header-regexp 458 (if (or vm-highlighted-header-regexp
497 (point)))) 496 (point))))
498 (t (vm-text-end-of (car vm-message-pointer)))))) 497 (t (vm-text-end-of (car vm-message-pointer))))))
499 498
500 (defun vm-preview-current-message () 499 (defun vm-preview-current-message ()
501 (vm-save-buffer-excursion 500 (vm-save-buffer-excursion
502 (setq vm-system-state 'previewing) 501 (setq vm-system-state 'previewing
502 vm-mime-decoded nil)
503 (if vm-real-buffers 503 (if vm-real-buffers
504 (vm-make-virtual-copy (car vm-message-pointer))) 504 (vm-make-virtual-copy (car vm-message-pointer)))
505 505
506 ;; run the message select hooks. 506 ;; run the message select hooks.
507 (save-excursion 507 (save-excursion
560 vm-auto-decode-mime-messages 560 vm-auto-decode-mime-messages
561 (if vm-mail-buffer 561 (if vm-mail-buffer
562 (not (vm-buffer-variable-value vm-mail-buffer 'vm-mime-decoded)) 562 (not (vm-buffer-variable-value vm-mail-buffer 'vm-mime-decoded))
563 (not vm-mime-decoded)) 563 (not vm-mime-decoded))
564 (not (vm-mime-plain-message-p (car vm-message-pointer))) 564 (not (vm-mime-plain-message-p (car vm-message-pointer)))
565 (vm-decode-mime-message)) 565 (condition-case data
566 (vm-decode-mime-message)
567 (vm-mime-error (vm-set-mime-layout-of (car vm-message-pointer)
568 (car (cdr data)))
569 (message "%s" (car (cdr data))))))
566 (vm-save-buffer-excursion 570 (vm-save-buffer-excursion
567 (save-excursion 571 (save-excursion
568 (save-excursion 572 (save-excursion
569 (goto-char (point-min)) 573 (goto-char (point-min))
570 (widen) 574 (widen)