Mercurial > hg > xemacs-beta
comparison lisp/vm/vm-menu.el @ 126:1370575f1259 xemacs-20-1p1
Import from CVS: tag xemacs-20-1p1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:27:39 +0200 |
parents | cca96a509cfe |
children | 869e1851236b |
comparison
equal
deleted
inserted
replaced
125:8b0638b347ec | 126:1370575f1259 |
---|---|
42 ;;; along with this program; if not, write to the Free Software | 42 ;;; along with this program; if not, write to the Free Software |
43 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 43 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
44 | 44 |
45 (provide 'vm-menu) | 45 (provide 'vm-menu) |
46 | 46 |
47 ;; makeu sure the emacs/xemacs version variables are set, as they | 47 ;; copied from vm-vars.el because vm-xemacs-p, vm-xemacs-mule-p |
48 ;; and vm-fsfemacs-19-p are needed below at load time and | |
49 ;; vm-note-emacs-version may not be autoloadable. | |
50 (or (fboundp 'vm-note-emacs-version) | |
51 (defun vm-note-emacs-version () | |
52 (setq vm-xemacs-p (string-match "XEmacs" emacs-version) | |
53 vm-xemacs-mule-p (and vm-xemacs-p (featurep 'mule) | |
54 ;; paranoia | |
55 (fboundp 'set-file-coding-system)) | |
56 vm-fsfemacs-19-p (not vm-xemacs-p)))) | |
57 | |
58 ;; make sure the emacs/xemacs version variables are set, as they | |
48 ;; are needed below at load time. | 59 ;; are needed below at load time. |
49 (vm-note-emacs-version) | 60 (vm-note-emacs-version) |
50 | 61 |
51 (defun vm-menu-fsfemacs-menus-p () | 62 (defun vm-menu-fsfemacs-menus-p () |
52 (and vm-fsfemacs-19-p | 63 (and vm-fsfemacs-19-p |
367 :active vm-send-using-mime | 378 :active vm-send-using-mime |
368 :style radio | 379 :style radio |
369 :selected (eq vm-mime-8bit-text-transfer-encoding 'base64)])) | 380 :selected (eq vm-mime-8bit-text-transfer-encoding 'base64)])) |
370 "----" | 381 "----" |
371 ["Attach File..." vm-mime-attach-file vm-send-using-mime] | 382 ["Attach File..." vm-mime-attach-file vm-send-using-mime] |
372 ["Attach MIME File..." vm-mime-attach-mime-file vm-send-using-mime] | 383 ;; ["Attach MIME Message..." vm-mime-attach-mime-file |
384 ;; vm-send-using-mime] | |
373 ["Encode MIME, But Don't Send" vm-mime-encode-composition | 385 ["Encode MIME, But Don't Send" vm-mime-encode-composition |
374 (and vm-send-using-mime | 386 (and vm-send-using-mime |
375 (null (vm-mail-mode-get-header-contents "MIME-Version:")))] | 387 (null (vm-mail-mode-get-header-contents "MIME-Version:")))] |
376 ["Preview MIME Before Sending" vm-mime-preview-composition | 388 ["Preview MIME Before Sending" vm-mime-preview-composition |
377 vm-send-using-mime] | 389 vm-send-using-mime] |
542 set to the command name so that window configuration will be done." | 554 set to the command name so that window configuration will be done." |
543 (setq this-command command) | 555 (setq this-command command) |
544 (apply command args)) | 556 (apply command args)) |
545 | 557 |
546 (defun vm-menu-can-revert-p () | 558 (defun vm-menu-can-revert-p () |
547 (save-excursion | 559 (condition-case nil |
548 (vm-check-for-killed-folder) | 560 (save-excursion |
549 (vm-select-folder-buffer) | 561 (vm-select-folder-buffer) |
550 (and (buffer-modified-p) buffer-file-name))) | 562 (and (buffer-modified-p) buffer-file-name)) |
563 (error nil))) | |
551 | 564 |
552 (defun vm-menu-can-recover-p () | 565 (defun vm-menu-can-recover-p () |
553 (save-excursion | 566 (condition-case nil |
554 (vm-check-for-killed-folder) | 567 (save-excursion |
555 (vm-select-folder-buffer) | 568 (vm-select-folder-buffer) |
556 (and buffer-file-name | 569 (and buffer-file-name |
557 buffer-auto-save-file-name | 570 buffer-auto-save-file-name |
558 (file-newer-than-file-p | 571 (file-newer-than-file-p |
559 buffer-auto-save-file-name | 572 buffer-auto-save-file-name |
560 buffer-file-name)))) | 573 buffer-file-name))) |
574 (error nil))) | |
561 | 575 |
562 (defun vm-menu-can-save-p () | 576 (defun vm-menu-can-save-p () |
563 (save-excursion | 577 (condition-case nil |
564 (vm-check-for-killed-folder) | 578 (save-excursion |
565 (vm-select-folder-buffer) | 579 (vm-select-folder-buffer) |
566 (or (eq major-mode 'vm-virtual-mode) | 580 (or (eq major-mode 'vm-virtual-mode) |
567 (buffer-modified-p)))) | 581 (buffer-modified-p))) |
582 (error nil))) | |
568 | 583 |
569 (defun vm-menu-can-get-new-mail-p () | 584 (defun vm-menu-can-get-new-mail-p () |
570 (save-excursion | 585 (condition-case nil |
571 (vm-check-for-killed-folder) | 586 (save-excursion |
572 (vm-select-folder-buffer) | 587 (vm-select-folder-buffer) |
573 (or (eq major-mode 'vm-virtual-mode) | 588 (or (eq major-mode 'vm-virtual-mode) |
574 (and (not vm-block-new-mail) (not vm-folder-read-only))))) | 589 (and (not vm-block-new-mail) (not vm-folder-read-only)))) |
590 (error nil))) | |
575 | 591 |
576 (defun vm-menu-can-undo-p () | 592 (defun vm-menu-can-undo-p () |
577 (save-excursion | 593 (condition-case nil |
578 (vm-check-for-killed-folder) | 594 (save-excursion |
579 (vm-select-folder-buffer) | 595 (vm-select-folder-buffer) |
580 vm-undo-record-list)) | 596 vm-undo-record-list) |
597 (error nil))) | |
581 | 598 |
582 (defun vm-menu-can-decode-mime-p () | 599 (defun vm-menu-can-decode-mime-p () |
583 (save-excursion | 600 (condition-case nil |
584 (vm-check-for-killed-folder) | 601 (save-excursion |
585 (vm-select-folder-buffer) | 602 (vm-select-folder-buffer) |
586 (and vm-display-using-mime | 603 (and vm-display-using-mime |
587 vm-message-pointer | 604 vm-message-pointer |
588 vm-presentation-buffer | 605 vm-presentation-buffer |
589 (not vm-mime-decoded) | 606 (not vm-mime-decoded) |
590 (not (vm-mime-plain-message-p (car vm-message-pointer)))))) | 607 (not (vm-mime-plain-message-p (car vm-message-pointer))))) |
608 (error nil))) | |
591 | 609 |
592 (defun vm-menu-yank-original () | 610 (defun vm-menu-yank-original () |
593 (interactive) | 611 (interactive) |
594 (save-excursion | 612 (save-excursion |
595 (let ((mlist vm-reply-list)) | 613 (let ((mlist vm-reply-list)) |