=== modified file 'lisp/u-vm-color.el' --- lisp/u-vm-color.el 2012-03-04 11:09:40 +0000 +++ lisp/u-vm-color.el 2012-08-13 02:12:30 +0000 @@ -403,9 +403,7 @@ (u-format "^..") (u-match nil) (count 1) - (t-vm-summary-format vm-summary-format) - (u-vm-color-xemacs-workaround - (string-match "XEmacs\\|Lucid" emacs-version))) + (t-vm-summary-format vm-summary-format)) ;; pick up all elements in the vm-summary-format (while (string-match (concat "%-?\\([0-9]+\\.\\)?-?\\([0-9]+\\)?" @@ -440,19 +438,19 @@ ;; possible letters are given! (setq f-element "\\([DNU ][FW ][RZB ][E ]\\)") (setq m-element (list count (quote 'u-vm-color-attribute-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "A") ;; attributes -- long (setq f-element "\\([DNU ][r ][z ][b ][f ][w ][e ]\\)") (setq m-element (list count (quote 'u-vm-color-attribute-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "c") ;; number of characters (setq f-element "\\( *[0-9]+ *\\)") (setq m-element (list count (quote 'u-vm-color-length-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "d") ;; day -- numeric (setq f-element "\\( *[0-9]+ *\\)") (setq m-element (list count (quote 'u-vm-color-date-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "f") ;; authors/principal/recipients address ;;(setq f-element "\\(To: [^ \n]+\\)?\\([^ \n]+\\)?") (setq f-element (concat @@ -494,36 +492,36 @@ ((string-equal value "h") ;; time (setq f-element "\\([0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\)") (setq m-element (list count (quote 'u-vm-color-time-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "H") ;; time -- short (setq f-element "\\([0-9][0-9]:[0-9][0-9]\\)") (setq m-element (list count (quote 'u-vm-color-time-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "i") ;; id (setq f-element "\\(<[^ \n]+>\\)") (setq m-element (list count (quote 'u-vm-color-id-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "I") ;; indentation (setq f-element " *") (setq m-element nil)) ((string-equal value "l") ;; number of lines (setq f-element "\\( *[0-9]+ *\\)") (setq m-element (list count (quote 'u-vm-color-length-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "L") ;; label (setq f-element (u-vm-color-make-specific-length-regexp ;;"[ [:graph:]]" "." m-length length)) (setq m-element (list count (quote 'u-vm-color-label-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "m") ;; month (setq f-element "\\([A-Za-z]+\\)") (setq m-element (list count (quote 'u-vm-color-date-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "M") ;; month -- numeric (setq f-element "\\( *[0-9]+ *\\)") (setq m-element (list count (quote 'u-vm-color-date-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "n") ;; message number (setq f-element "\\( *[0-9]+ *\\)") (setq m-element (list count (quote 'u-vm-color-number-face)))) @@ -532,31 +530,31 @@ ;;"[ [:graph:]]" "." m-length length)) (setq m-element (list count (quote 'u-vm-color-subject-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "t") ;; recipient addresses (setq f-element "\\([^ \n]+\\)") (setq m-element (list count (quote 'u-vm-color-recipient-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "T") ;; recipient full names (setq f-element "\\(.+\\)") (setq m-element (list count (quote 'u-vm-color-recipient-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "w") ;; week day (is missing in some mails!) (setq f-element "\\([A-Za-z ]+\\)") (setq m-element (list count (quote 'u-vm-color-date-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "y") ;; year (setq f-element "\\([0-9]+\\)") (setq m-element (list count (quote 'u-vm-color-date-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "z") ;; timezone (setq f-element "\\(.+\\)") (setq m-element (list count (quote 'u-vm-color-date-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) ((string-equal value "*") ;; mark-marker (setq f-element "\\(\\*\\| \\)") (setq m-element (list count (quote 'u-vm-color-attribute-face) - nil u-vm-color-xemacs-workaround))) + nil (featurep 'xemacs)))) (t ;; user defined and everything else (setq f-element ".*") (setq m-element nil))) === modified file 'lisp/vm-avirtual.el' --- lisp/vm-avirtual.el 2012-04-09 19:47:10 +0000 +++ lisp/vm-avirtual.el 2012-08-13 02:12:30 +0000 @@ -714,11 +714,10 @@ (setq selector (vm-virtual-get-selector (vm-read-string "Virtual folder: " vm-virtual-folder-alist))) - (if vm-xemacs-p - (setq function - (key-or-menu-binding (read-key-sequence "VM command: "))) - (setq function - (key-binding (read-key-sequence "VM command: "))))) + (setq function + (if (featurep 'xemacs) + (key-or-menu-binding (read-key-sequence "VM command: ")) + (key-binding (read-key-sequence "VM command: "))))) (vm-select-folder-buffer-and-validate 1 (vm-interactive-p)) === modified file 'lisp/vm-biff.el' --- lisp/vm-biff.el 2011-11-12 23:26:19 +0000 +++ lisp/vm-biff.el 2012-08-13 02:12:30 +0000 @@ -65,10 +65,10 @@ (start end &optional overlay)) (declare-function vm-summary-faces-add "vm-summary-faces" (message)) -(when vm-xemacs-p +(when (featurep 'xemacs) (require 'overlay)) -(when vm-fsfemacs-p +(when (not (featurep 'xemacs)) (defvar horizontal-scrollbar-visible-p nil)) ; group already defined in vm-vars.el @@ -246,12 +246,12 @@ (defvar vm-biff--folder-window nil) (defun vm-biff-x-p () - (if vm-xemacs-p + (if (featurep 'xemacs) (memq (console-type) '(x mswindows)) t)) (defun vm-biff-get-buffer-window (buf) - (if vm-xemacs-p + (if (featurep 'xemacs) (vm-get-buffer-window buf (vm-biff-x-p) (frame-device)) (vm-get-buffer-window buf (vm-biff-x-p)))) @@ -464,7 +464,7 @@ (cons (cons 'popup ff) vm-biff-frame-properties) vm-biff-frame-properties)) - (mf (or (and (if vm-xemacs-p + (mf (or (and (if (featurep 'xemacs) (vm-get-buffer-window buf t (frame-device)) (vm-get-buffer-window buf t)) @@ -474,7 +474,7 @@ (select-frame mf) (switch-to-buffer buf) - (if vm-xemacs-p + (if (featurep 'xemacs) (set-specifier horizontal-scrollbar-visible-p nil)) (if (functionp vm-biff-place-frame-function) @@ -496,13 +496,11 @@ (setq wf (split-window (selected-window)))) (sit-for 0) (switch-to-buffer buf) - (if (> h vm-biff-max-height) - (setq h vm-biff-max-height)) - (if vm-xemacs-p - (setq h (- (window-displayed-height) h)) - (setq h (- (window-height) h))) (if (not (one-window-p)) - (shrink-window h))))) + (shrink-window + (- (if (featurep 'xemacs) + (window-displayed-height) (window-height)) + (min h vm-biff-max-height))))))) (if vm-biff-auto-remove (cond === modified file 'lisp/vm-edit.el' --- lisp/vm-edit.el 2012-01-08 15:35:41 +0000 +++ lisp/vm-edit.el 2012-08-13 02:12:30 +0000 @@ -77,7 +77,7 @@ (format "edit of %s's note re: %s" (vm-su-full-name (car vm-message-pointer)) (vm-su-subject (car vm-message-pointer))))) - (if vm-fsfemacs-mule-p + (if (not (featurep 'xemacs)) (set-buffer-multibyte nil)) ; for new buffer (vm-set-edit-buffer-of (car mp) edit-buf) (copy-to-buffer edit-buf === modified file 'lisp/vm-grepmail.el' --- lisp/vm-grepmail.el 2011-03-17 10:20:24 +0000 +++ lisp/vm-grepmail.el 2012-08-13 02:12:30 +0000 @@ -86,7 +86,7 @@ (defvar vm-grepmail-folder-buffer nil) -(if vm-fsfemacs-p +(if (not (featurep 'xemacs)) ;; For sixth arg of read-file-name in Emacs 21. cf vm-folder-history. (defun vm-grepmail-folders-history (&rest ignored) t)) @@ -182,7 +182,7 @@ (if (null process) (error "Cannot start grepmail")) ;; set the send-filter - (if vm-fsfemacs-p + (if (not (featurep 'xemacs)) (set-buffer-process-coding-system 'raw-text-unix 'raw-text-unix)) (set-process-filter process 'vm-grepmail-process-filter) (set-process-sentinel process 'vm-grepmail-process-done) === modified file 'lisp/vm-menu.el' --- lisp/vm-menu.el 2012-03-12 19:07:56 +0000 +++ lisp/vm-menu.el 2012-08-13 02:12:30 +0000 @@ -101,7 +101,7 @@ (defconst vm-menu-folder-menu `("Folder" - ,(if vm-fsfemacs-p + ,(if (not (featurep 'xemacs)) ["Manipulate Folders" ignore (ignore)] vm-menu-folders-menu) "---" === modified file 'lisp/vm-mime.el' --- lisp/vm-mime.el 2012-04-30 10:59:23 +0000 +++ lisp/vm-mime.el 2012-08-13 02:12:30 +0000 @@ -127,7 +127,7 @@ ;; We can depend on the fact that, in FSF Emacsen, coding systems ;; have aliases that correspond to MIME charset names. (let ((tmp nil)) - (cond (vm-fsfemacs-mule-p + (cond ((not (featurep 'xemacs)) (cond ((vm-coding-system-p (setq tmp (intern (downcase charset)))) tmp) ((equal charset "us-ascii") @@ -196,7 +196,7 @@ '(iso-8859-1 "iso-8859-1"))) (eval-when-compile - (when vm-fsfemacs-p + (when (not (featurep 'xemacs)) (defvar latin-unity-character-sets nil))) (when vm-xemacs-mule-p @@ -510,7 +510,7 @@ (insert-buffer-substring b b-start b-end) (setq retval (apply 'decode-coding-region (point-min) (point-max) coding-system foo)) - (and vm-fsfemacs-p (set-buffer-multibyte t)) ; is this safe? + (unless (featurep 'xemacs) (set-buffer-multibyte t)) ; Is this safe? (setq start (point-min) end (point-max)) (save-excursion (set-buffer b) @@ -527,9 +527,9 @@ (defun vm-mime-charset-decode-region (charset start end) (or (markerp end) (setq end (vm-marker end))) - (cond ((or vm-xemacs-mule-p vm-fsfemacs-mule-p) - (if (or (and vm-xemacs-p (memq (vm-device-type) '(x gtk mswindows))) - vm-fsfemacs-p + (cond ((or vm-xemacs-mule-p (not (featurep 'xemacs))) + (if (or (not (featurep 'xemacs)) + (and (memq (vm-device-type) '(x gtk mswindows))) (vm-mime-tty-can-display-mime-charset charset) nil) (let ((buffer-read-only nil) @@ -556,7 +556,7 @@ (if font (condition-case data (progn (set-face-font face font) - (if vm-fsfemacs-p + (if (not (featurep 'xemacs)) (put-text-property start end 'face face) (vm-set-extent-property e 'duplicable t) (vm-set-extent-property e 'face face))) @@ -600,7 +600,7 @@ ;; The FSF Emacs version of this is unforgiving ;; of errors, which is not in the spirit of the ;; MIME spec, so avoid using it. - (not vm-fsfemacs-p)) + (featurep 'xemacs)) (condition-case data (base64-decode-region start end) (error (vm-mime-error "%S" data))) @@ -1898,9 +1898,9 @@ (save-restriction (narrow-to-region beg end) (if (or vm-xemacs-mule-p - (and vm-fsfemacs-mule-p enable-multibyte-characters)) + (and (not (featurep 'xemacs)) enable-multibyte-characters)) ;; Okay, we're on a MULE build. - (if (and vm-fsfemacs-mule-p + (if (and (not (featurep 'xemacs)) (fboundp 'check-coding-systems-region)) ;; check-coding-systems-region appeared in GNU Emacs 23. (let* ((preapproved (vm-get-coding-system-priorities)) @@ -2136,7 +2136,7 @@ ((vm-mime-types-match "image/xbm" type) (and (vm-image-type-available-p 'xbm) (vm-images-possible-here-p))) ((vm-mime-types-match "audio/basic" type) - (and vm-xemacs-p + (and (featurep 'xemacs) (or (featurep 'native-sound) (featurep 'nas-sound)) (or (device-sound-enabled-p) @@ -2402,7 +2402,7 @@ (vm-warn 0 1 "Conversion from %s to %s signalled exit code %s" (nth 0 ooo) (nth 1 ooo) ex)) ;; This cannot possibly safe. USR, 2011-02-11 - ;; (if vm-fsfemacs-mule-p + ;; (if (not (featurep 'xemacs)) ;; (set-buffer-multibyte t)) (setq start (point-min) end (point-max)) (with-current-buffer b @@ -3588,7 +3588,7 @@ (lambda (extent) ;; reuse the internal display code, but make sure that no new ;; buttons will be created for the external-body content. - (let ((layout (if vm-xemacs-p + (let ((layout (if (featurep 'xemacs) (vm-extent-property extent 'vm-mime-layout) (overlay-get extent 'vm-mime-layout))) (vm-mime-auto-displayed-content-types t) @@ -3847,9 +3847,9 @@ IMAGE-TYPE is its image type (png, jpeg etc.). NAME is a string describing the image type. USR, 2011-03-25" (cond - (vm-xemacs-p + ((featurep 'xemacs) (vm-mime-display-internal-image-xemacs-xxxx layout image-type name)) - ((and vm-fsfemacs-p (fboundp 'image-type-available-p)) + ((fboundp 'image-type-available-p) (vm-mime-display-internal-image-fsfemacs-xxxx layout image-type name)) (t (vm-inform 0 "Unsupported Emacs version")) @@ -4092,7 +4092,7 @@ ;; (catch 'done ;; (let ((selective-display nil) ;; start end origfile workfile image work-buffer -;; (hroll (if vm-fsfemacs-mule-p +;; (hroll (if (not (featurep 'xemacs)) ;; (+ (cdr (assq 'internal-border-width ;; (frame-parameters))) ;; (if (memq (cdr (assq 'vertical-scroll-bars @@ -4721,7 +4721,7 @@ vm-mime-thumbnail-max-geometry)) ;; extract image data, don't need the image itself! ;; if the display was not successful, glyph will be nil - (setq glyph (if vm-xemacs-p + (setq glyph (if (featurep 'xemacs) (let ((e1 (vm-extent-at start)) (e2 (vm-extent-at (1+ start)))) (or (and e1 (extent-begin-glyph e1)) @@ -4732,7 +4732,7 @@ (setq start (point)) (vm-mime-display-button-xxxx layout t) (when glyph - (if vm-xemacs-p + (if (featurep 'xemacs) (set-extent-begin-glyph (vm-extent-at start) glyph) (put-text-property start (1+ start) 'display glyph))) ;; remove the cached thumb so that full sized image will be shown @@ -4747,7 +4747,7 @@ (vm-mime-display-button-image layout)) (defun vm-mime-display-internal-audio/basic (layout) - (if (and vm-xemacs-p + (if (and (featurep 'xemacs) (or (featurep 'native-sound) (featurep 'nas-sound)) (or (device-sound-enabled-p) @@ -5289,9 +5289,9 @@ "Set an image stamp for MIME button extent E as appropriate for TYPE. USR, 2011-03-25" (cond - (vm-xemacs-p + ((featurep 'xemacs) (vm-mime-xemacs-set-image-stamp-for-type e type)) - (vm-fsfemacs-p + (t (vm-mime-fsfemacs-set-image-stamp-for-type e type)))) (defconst vm-mime-type-images @@ -5387,7 +5387,7 @@ (insert caption "\n") ;; we must use the same interface that the vm-extent functions ;; use. if they use overlays, then we call make-overlay. - (if vm-fsfemacs-p + (if (not (featurep 'xemacs)) ;; we MUST have the five arg make-overlay. overlays must ;; advance when text is inserted at their start position or ;; inline text and graphics will seep into the button @@ -5397,9 +5397,8 @@ (vm-set-extent-property e 'start-open t) (vm-set-extent-property e 'end-open t)) (vm-mime-set-image-stamp-for-type e (car (vm-mm-layout-type layout))) - (when vm-fsfemacs-p - (vm-set-extent-property e 'local-map keymap)) - (when vm-xemacs-p + (if (not (featurep 'xemacs)) + (vm-set-extent-property e 'local-map keymap) (vm-set-extent-property e 'highlight t) (vm-set-extent-property e 'keymap keymap) (vm-set-extent-property e 'balloon-help 'vm-mouse-3-help)) @@ -5411,9 +5410,8 @@ (vm-set-extent-property e 'vm-mime-layout layout) (vm-set-extent-property e 'vm-mime-function action) ;; for vm-continue-postponed-message - (when vm-xemacs-p - (vm-set-extent-property e 'duplicable t)) - (when vm-fsfemacs-p + (if (featurep 'xemacs) + (vm-set-extent-property e 'duplicable t) (put-text-property (overlay-start e) (overlay-end e) 'vm-mime-layout layout)) @@ -5873,7 +5871,7 @@ ;; vm-mime-tty-can-display-mime-charset (called below) fails ;; for GNU Emacs. So keep things simple, since there's no harm ;; if replacement characters are displayed. - (vm-fsfemacs-mule-p) + ((not (featurep 'xemacs))) ((vm-multiple-fonts-possible-p) (or (vm-mime-default-face-charset-p name) (vm-string-assoc name vm-mime-charset-font-alist))) @@ -6549,7 +6547,7 @@ (setq end (1- (point))) - (cond (vm-fsfemacs-p + (cond ((not (featurep 'xemacs)) (put-text-property start end 'front-sticky nil) (put-text-property start end 'rear-nonsticky t) ;; can't be intangible because menu clicking at a position @@ -6571,7 +6569,7 @@ (put-text-property start end 'vm-mime-encoded mimed) ;; (put-text-property start end 'duplicable t) ) - (vm-xemacs-p + (t (setq e (vm-make-extent start end)) (vm-mime-set-image-stamp-for-type e (or type "text/plain")) (vm-set-extent-property e 'start-open t) @@ -6596,37 +6594,35 @@ (defalias 'vm-mime-attach-object 'vm-attach-object) (defun vm-mime-attachment-forward-local-refs-at-point () - (cond (vm-fsfemacs-p - (let ((fb (get-text-property (point) 'vm-mime-forward-local-refs))) - (car fb) )) - (vm-xemacs-p - (let* ((e (vm-extent-at (point) 'vm-mime-type)) - (fb (vm-extent-property e 'vm-mime-forward-local-refs))) - (car fb) )))) + (car (cond ((not (featurep 'xemacs)) + (get-text-property (point) 'vm-mime-forward-local-refs)) + (t + (let* ((e (vm-extent-at (point) 'vm-mime-type))) + (vm-extent-property e 'vm-mime-forward-local-refs)))))) (defun vm-mime-set-attachment-forward-local-refs-at-point (val) - (cond (vm-fsfemacs-p - (let ((fb (get-text-property (point) 'vm-mime-forward-local-refs))) - (setcar fb val) )) - (vm-xemacs-p - (let* ((e (vm-extent-at (point) 'vm-mime-type)) - (fb (vm-extent-property e 'vm-mime-forward-local-refs))) - (setcar fb val) )))) + (let ((fb + (cond ((not (featurep 'xemacs)) + (get-text-property (point) 'vm-mime-forward-local-refs)) + (t + (let ((e (vm-extent-at (point) 'vm-mime-type))) + (vm-extent-property e 'vm-mime-forward-local-refs)))))) + (setcar fb val))) (defun vm-mime-delete-attachment-button () - (cond (vm-fsfemacs-p + (cond ((not (featurep 'xemacs)) ;; TODO ) - (vm-xemacs-p + (t (let ((e (vm-extent-at (point) 'vm-mime-type))) (delete-region (vm-extent-start-position e) (vm-extent-end-position e)))))) (defun vm-mime-delete-attachment-button-keep-infos () - (cond (vm-fsfemacs-p + (cond ((not (featurep 'xemacs)) ;; TODO ) - (vm-xemacs-p + (t (let ((e (vm-extent-at (point) 'vm-mime-type))) (save-excursion (goto-char (1+ (vm-extent-start-position e))) @@ -6649,37 +6645,34 @@ nil t)))) (defun vm-mime-attachment-disposition-at-point () - (cond (vm-fsfemacs-p - (let ((disp (get-text-property (point) 'vm-mime-disposition))) - (intern (car disp)))) - (vm-xemacs-p - (let* ((e (vm-extent-at (point) 'vm-mime-disposition)) - (disp (vm-extent-property e 'vm-mime-disposition))) - (intern (car disp)))))) + (intern (car (cond ((not (featurep 'xemacs)) + (get-text-property (point) 'vm-mime-disposition)) + (t + (let ((e (vm-extent-at (point) 'vm-mime-disposition))) + (vm-extent-property e 'vm-mime-disposition))))))) (defun vm-mime-set-attachment-disposition-at-point (sym) - (cond (vm-fsfemacs-p - (let ((disp (get-text-property (point) 'vm-mime-disposition))) - (setcar disp (symbol-name sym)))) - (vm-xemacs-p - (let* ((e (vm-extent-at (point) 'vm-mime-disposition)) - (disp (vm-extent-property e 'vm-mime-disposition))) - (setcar disp (symbol-name sym)))))) + (setcar (cond ((not (featurep 'xemacs)) + (get-text-property (point) 'vm-mime-disposition)) + (t + (let ((e (vm-extent-at (point) 'vm-mime-disposition))) + (vm-extent-property e 'vm-mime-disposition)))) + (symbol-name sym))) (defun vm-mime-attachment-encoding-at-point () - (cond (vm-fsfemacs-p + (cond ((not (featurep 'xemacs)) (get-text-property (point) 'vm-mime-encoding)) - (vm-xemacs-p + (t (let ((e (vm-extent-at (point) 'vm-mime-encoding))) (if e (vm-extent-property e 'vm-mime-encoding)))))) (defun vm-mime-set-attachment-encoding-at-point (sym) - (cond (vm-fsfemacs-p + (cond ((not (featurep 'xemacs)) ;; (set-text-property (point) 'vm-mime-encoding sym) (put-text-property (point) (point) 'vm-mime-encoding sym) ) - (vm-xemacs-p + (t (let ((e (vm-extent-at (point) 'vm-mime-disposition))) (vm-set-extent-property e 'vm-mime-encoding sym))))) @@ -6708,7 +6701,7 @@ In GNU Emacs version of this function, attachment buttons are expected to be denoted by text-properties rather than extents. \"Fake\" extents are created for the purpose of this function. USR, 2011-03-27" - (let ((e-list (if vm-xemacs-p + (let ((e-list (if (featurep 'xemacs) (vm-extent-list start end prop) (vm-mime-fake-attachment-overlays start end prop)))) (sort e-list (function @@ -7051,7 +7044,7 @@ coding (vm-mime-charset-to-coding charset)) ;; encode coding system body (when (and coding (not (eq coding 'no-conversion))) - (if vm-xemacs-p + (if (featurep 'xemacs) (vm-encode-coding-region start end coding) ;; using vm-encode-coding-region causes wrong encoding in GNU Emacs (encode-coding-region start end coding))) @@ -7177,7 +7170,7 @@ forward-local-refs already-mimed layout e e-list boundary type encoding charset params description disposition object opoint-min encoded-attachment message-smimed) - (when vm-xemacs-p + (when (featurep 'xemacs) ;;Make sure we don't double encode UTF-8 (for example) text. (setq buffer-file-coding-system (vm-binary-coding-system))) (goto-char (mail-text-start)) @@ -7488,7 +7481,7 @@ ;; support enriched-mode for text/enriched composition (when enriched (let ((enriched-initial-annotation "")) - (if vm-fsfemacs-p + (if (not (featurep 'xemacs)) (save-excursion ;; insert/delete trick needed to avoid ;; enriched-mode tags from seeping into the @@ -7521,7 +7514,7 @@ coding-system))) ;; not clear why this is needed. USR, 2011-03-27 - (when vm-xemacs-p + (when (featurep 'xemacs) (when whole-message (enriched-mode -1))) (setq encoding (vm-determine-proper-content-transfer-encoding (point-min) (point-max)) @@ -7843,7 +7836,7 @@ (delete-char -1)))) (setq charset (vm-determine-proper-charset (point-min) (point-max))) - (when vm-fsfemacs-mule-p + (when (not (featurep 'xemacs)) (let ((coding-system (vm-mime-charset-to-coding charset))) (unless coding-system @@ -8337,7 +8330,7 @@ "Replace all mime buttons in the current buffer by attachment buttons." ;; called vm-mime-encode-mime-attachments in vm-pine.el (interactive) - (cond (vm-xemacs-p + (cond ((featurep 'xemacs) (let ((e-list (vm-extent-list (point-min) (point-max) 'vm-mime-layout))) (setq e-list @@ -8350,16 +8343,13 @@ (while e-list (vm-mime-replace-by-attachment-button (car e-list)) (setq e-list (cdr e-list))))) - (vm-fsfemacs-p + (t (let ((e-list (vm-mime-attachment-button-extents (point-min) (point-max) 'vm-mime-layout))) (while e-list (vm-mime-replace-by-attachment-button (car e-list)) (setq e-list (cdr e-list))) - (goto-char (point-max)))) - (t - (error "don't know how to MIME encode composition for %s" - (emacs-version))))) + (goto-char (point-max)))))) ;; The function vm-mime-re-fake-attachment-overlays from vm-pine.el is ;; now unused. USR, 2011-02-14 @@ -8433,7 +8423,7 @@ (defun vm-mime-insert-file-contents (file type) "Safely insert the contents of FILE of TYPE into the current buffer." - (if vm-xemacs-p + (if (featurep 'xemacs) (let ((coding-system-for-read (if (vm-mime-text-type-p type) (vm-line-ending-coding-system) @@ -8490,7 +8480,7 @@ (defun vm-mime-insert-buffer-substring (buffer type) "Safe insert the contents of BUFFER of TYPE into the current buffer." - (if vm-xemacs-p + (if (featurep 'xemacs) (insert-buffer-substring buffer) ;; Under Emacs 20.7 inserting a unibyte buffer ;; contents that contain 8-bit characters into a === modified file 'lisp/vm-misc.el' --- lisp/vm-misc.el 2012-04-09 19:47:10 +0000 +++ lisp/vm-misc.el 2012-08-13 02:12:30 +0000 @@ -607,8 +607,8 @@ (lambda () (called-interactively-p 'any)))) (fset 'vm-device-type - (cond (vm-xemacs-p 'device-type) - (vm-fsfemacs-p 'vm-fsfemacs-device-type))) + (cond ((featurep 'xemacs) 'device-type) + (t 'vm-fsfemacs-device-type))) (defun vm-fsfemacs-device-type (&optional device) "An FSF Emacs emulation for XEmacs `device-type' function. Returns @@ -619,7 +619,7 @@ window-system)) (defun vm-generate-new-unibyte-buffer (name) - (if vm-xemacs-p + (if (featurep 'xemacs) (generate-new-buffer name) (let* (;; (default-enable-multibyte-characters nil) ;; don't need this because of set-buffer-multibyte below @@ -630,7 +630,7 @@ buffer))) (defun vm-generate-new-multibyte-buffer (name) - (if vm-xemacs-p + (if (featurep 'xemacs) (generate-new-buffer name) (let* (;; (default-enable-multibyte-characters t) ;; don't need this because of set-buffer-multibyte below @@ -651,7 +651,7 @@ (fset 'xemacs-abbreviate-file-name 'abbreviate-file-name) (defun vm-abbreviate-file-name (path) - (if vm-xemacs-p + (if (featurep 'xemacs) (xemacs-abbreviate-file-name path t) (abbreviate-file-name path))) @@ -989,7 +989,7 @@ ;; The following function is not working correctly on Gnu Emacs 23. ;; So we do it ourselves. (defun vm-delete-auto-save-file-if-necessary () - (if vm-xemacs-p + (if (featurep 'xemacs) (delete-auto-save-file-if-necessary) (when (and buffer-auto-save-file-name delete-auto-save-files (not (string= buffer-file-name buffer-auto-save-file-name)) @@ -1042,7 +1042,7 @@ (fset 'vm-buffer-substring-no-properties (cond ((fboundp 'buffer-substring-no-properties) (function buffer-substring-no-properties)) - (vm-xemacs-p + ((featurep 'xemacs) (function buffer-substring)) (t (function vm-default-buffer-substring-no-properties)))) @@ -1067,73 +1067,65 @@ (set-buffer target-buffer))) (if (not (fboundp 'vm-extent-property)) - (if vm-fsfemacs-p - (fset 'vm-extent-property 'overlay-get) - (fset 'vm-extent-property 'extent-property))) + (fset 'vm-extent-property + (if (featurep 'xemacs) 'extent-property 'overlay-get))) (if (not (fboundp 'vm-extent-object)) - (if vm-fsfemacs-p - (fset 'vm-extent-object 'overlay-buffer) - (fset 'vm-extent-object 'extent-object))) + (fset 'vm-extent-object + (if (featurep 'xemacs) 'extent-object 'overlay-buffer))) (if (not (fboundp 'vm-set-extent-property)) - (if vm-fsfemacs-p - (fset 'vm-set-extent-property 'overlay-put) - (fset 'vm-set-extent-property 'set-extent-property))) + (fset 'vm-set-extent-property + (if (featurep 'xemacs) 'set-extent-property 'overlay-put))) (if (not (fboundp 'vm-set-extent-endpoints)) - (if vm-fsfemacs-p - (fset 'vm-set-extent-endpoints 'move-overlay) - (fset 'vm-set-extent-endpoints 'set-extent-endpoints))) + (fset 'vm-set-extent-endpoints + (if (featurep 'xemacs) 'set-extent-endpoints 'move-overlay))) (if (not (fboundp 'vm-make-extent)) - (if vm-fsfemacs-p - (fset 'vm-make-extent 'make-overlay) - (fset 'vm-make-extent 'make-extent))) + (fset 'vm-make-extent (if (featurep 'xemacs) 'make-extent 'make-overlay))) (if (not (fboundp 'vm-extent-end-position)) - (if vm-fsfemacs-p - (fset 'vm-extent-end-position 'overlay-end) - (fset 'vm-extent-end-position 'extent-end-position))) + (fset 'vm-extent-end-position + (if (featurep 'xemacs) 'extent-end-position 'overlay-end))) (if (not (fboundp 'vm-extent-start-position)) - (if vm-fsfemacs-p - (fset 'vm-extent-start-position 'overlay-start) - (fset 'vm-extent-start-position 'extent-start-position))) + (fset 'vm-extent-start-position + (if (featurep 'xemacs) 'extent-start-position 'overlay-start))) (if (not (fboundp 'vm-next-extent-change)) - (if vm-fsfemacs-p - (fset 'vm-next-extent-change 'next-overlay-change) - (fset 'vm-next-extent-change 'next-extent-change))) + (fset 'vm-next-extent-change + (if (featurep 'xemacs) 'next-extent-change 'next-overlay-change))) (if (not (fboundp 'vm-previous-extent-change)) - (if vm-fsfemacs-p - (fset 'vm-previous-extent-change 'previous-overlay-change) - (fset 'vm-previous-extent-change 'previous-extent-change))) + (fset 'vm-previous-extent-change + (if (featurep 'xemacs) + 'previous-extent-change 'previous-overlay-change))) (if (not (fboundp 'vm-detach-extent)) - (if vm-fsfemacs-p - (fset 'vm-detach-extent 'delete-overlay) - (fset 'vm-detach-extent 'detach-extent))) + (fset 'vm-detach-extent + (if (featurep 'xemacs) 'detach-extent 'delete-overlay))) (if (not (fboundp 'vm-delete-extent)) - (if vm-fsfemacs-p - ;; This doesn't actually destroy the overlay, but it is the - ;; best there is. - (fset 'vm-delete-extent 'delete-overlay) - (fset 'vm-delete-extent 'delete-extent))) + (fset 'vm-delete-extent + (if (featurep 'xemacs) + 'delete-extent + ;; This doesn't actually destroy the overlay, but it is the + ;; best there is. + ;; [ What would "destroy the overlay" do differently? --Stef ] + 'delete-overlay))) (if (not (fboundp 'vm-disable-extents)) - (if (and vm-fsfemacs-p (fboundp 'remove-overlays)) - (fset 'vm-disable-extents 'remove-overlays) - ;; XEamcs doesn't need to disable extents because they don't - ;; slow things down - (fset 'vm-disable-extents (lambda (&optional beg end name val) nil)))) + (fset 'vm-disable-extents + (if (and (not (featurep 'xemacs)) (fboundp 'remove-overlays)) + 'remove-overlays + ;; XEmacs doesn't need to disable extents because they don't + ;; slow things down. + (lambda (&optional beg end name val) nil)))) (if (not (fboundp 'vm-extent-properties)) - (if vm-fsfemacs-p - (fset 'vm-extent-properties 'overlay-properties) - (fset 'vm-extent-properties 'extent-properties))) + (fset 'vm-extent-properties + (if (featurep 'xemacs) 'extent-properties 'overlay-properties))) (defun vm-xemacs-map-extents (function &optional buffer) (let (from to) @@ -1158,9 +1150,9 @@ (setq p (cdr p))))) (if (not (fboundp 'vm-map-extents)) - (if vm-fsfemacs-p - (fset 'vm-map-extents 'vm-fsfemacs-map-extents) - (fset 'vm-map-extents 'vm-xemacs-map-extents))) + (fset 'vm-map-extents + (if (featurep 'xemacs) + 'vm-xemacs-map-extents 'vm-fsfemacs-map-extents))) (defun vm-extent-at (pos &optional property) "Find an extent at POS in the current buffer having PROPERTY. @@ -1385,7 +1377,7 @@ (defun vm-coding-system-p (name) (cond (vm-xemacs-mule-p (coding-system-p (find-coding-system name))) - (vm-fsfemacs-mule-p + ((not (featurep 'xemacs)) (coding-system-p name)))) (cond ((fboundp 'coding-system-name) @@ -1401,7 +1393,9 @@ (coding-system-change-eol-conversion coding-system nil))) (defun vm-get-file-line-ending-coding-system (file) - (if (not (or vm-fsfemacs-mule-p vm-xemacs-mule-p vm-xemacs-file-coding-p)) + (if (and (featurep 'xemacs) + (not vm-xemacs-mule-p) + (not vm-xemacs-file-coding-p)) nil (let ((coding-system-for-read (vm-binary-coding-system)) (work-buffer (vm-make-work-buffer))) @@ -1412,11 +1406,11 @@ (error nil)) (goto-char (point-min)) (cond ((re-search-forward "[^\r]\n" nil t) - (if vm-fsfemacs-mule-p 'raw-text-unix 'no-conversion-unix)) + (if (featurep 'xemacs) 'no-conversion-unix 'raw-text-unix)) ((re-search-forward "\r[^\n]" nil t) - (if vm-fsfemacs-mule-p 'raw-text-mac 'no-conversion-mac)) + (if (featurep 'xemacs) 'no-conversion-mac 'raw-text-mac)) ((search-forward "\r\n" nil t) - (if vm-fsfemacs-mule-p 'raw-text-dos 'no-conversion-dos)) + (if (featurep 'xemacs) 'no-conversion-dos 'raw-text-dos)) (t (vm-line-ending-coding-system)))) (and work-buffer (kill-buffer work-buffer)))))) @@ -1424,11 +1418,11 @@ (cond ((eq vm-default-new-folder-line-ending-type nil) (vm-line-ending-coding-system)) ((eq vm-default-new-folder-line-ending-type 'lf) - (if vm-fsfemacs-mule-p 'raw-text-unix 'no-conversion-unix)) + (if (featurep 'xemacs) 'no-conversion-unix 'raw-text-unix)) ((eq vm-default-new-folder-line-ending-type 'crlf) - (if vm-fsfemacs-mule-p 'raw-text-dos 'no-conversion-dos)) + (if (featurep 'xemacs) 'no-conversion-dos 'raw-text-dos)) ((eq vm-default-new-folder-line-ending-type 'cr) - (if vm-fsfemacs-mule-p 'raw-text-mac 'no-conversion-mac)) + (if (featurep 'xemacs) 'no-conversion-mac 'raw-text-mac)) (t (vm-line-ending-coding-system)))) @@ -1625,10 +1619,9 @@ (defvar enable-multibyte-characters) (defvar buffer-display-table) (defun vm-fsfemacs-nonmule-display-8bit-chars () - (cond ((and vm-fsfemacs-p - (or (not vm-fsfemacs-mule-p) - (and (boundp 'enable-multibyte-characters) - (not enable-multibyte-characters)))) + (cond ((and (not (featurep 'xemacs)) + (and (boundp 'enable-multibyte-characters) + (not enable-multibyte-characters))) (let* (tab (i 160)) ;; We need the function make-display-table, but it is ;; in disp-table.el, which overwrites the value of === modified file 'lisp/vm-mouse.el' --- lisp/vm-mouse.el 2011-12-21 15:45:27 +0000 +++ lisp/vm-mouse.el 2012-08-13 02:12:30 +0000 @@ -45,19 +45,19 @@ overlay is moved to cover START to END. No new overlay is created in that case. USR, 2010-08-01" (if (null overlay) - (cond (vm-fsfemacs-p + (cond ((not (featurep 'xemacs)) (let ((o (make-overlay start end))) (overlay-put o 'mouse-face 'highlight) o )) - (vm-xemacs-p + (t (let ((o (vm-make-extent start end))) (vm-set-extent-property o 'start-open t) (vm-set-extent-property o 'priority 10) (vm-set-extent-property o 'highlight t) o ))) - (cond (vm-fsfemacs-p + (cond ((not (featurep 'xemacs)) (move-overlay overlay start end)) - (vm-xemacs-p + (t (vm-set-extent-endpoints overlay start end))))) ;;;###autoload @@ -128,7 +128,7 @@ ((vm-mouse-fsfemacs-mouse-p) (set-buffer (window-buffer (posn-window (event-start event)))) (goto-char (posn-point (event-start event))))) - (cond (vm-fsfemacs-p + (cond ((not (featurep 'xemacs)) (let ((o-list (overlays-at (point))) (string nil)) (while o-list @@ -139,13 +139,12 @@ o-list nil) (setq o-list (cdr o-list)))) string )) - (vm-xemacs-p + (t (let ((e (vm-extent-at (point) 'highlight))) (if e (buffer-substring (vm-extent-start-position e) (vm-extent-end-position e)) - nil))) - (t nil)))) + nil)))))) ;;;###autoload (defun vm-mouse-popup-or-select (event) === modified file 'lisp/vm-page.el' --- lisp/vm-page.el 2012-04-10 00:03:30 +0000 +++ lisp/vm-page.el 2012-08-13 02:12:30 +0000 @@ -315,14 +315,14 @@ (defun vm-highlight-headers () (cond - ((and vm-xemacs-p vm-use-lucid-highlighting) + ((and (featurep 'xemacs) vm-use-lucid-highlighting) (require 'highlight-headers) ;; disable the url marking stuff, since VM has its own interface. (let ((highlight-headers-mark-urls nil) (highlight-headers-regexp (or vm-highlighted-header-regexp highlight-headers-regexp))) (highlight-headers (point-min) (point-max) t))) - (vm-xemacs-p + ((featurep 'xemacs) (let (e) (map-extents (function (lambda (e ignore) @@ -338,7 +338,7 @@ (vm-set-extent-property e 'face vm-highlighted-header-face) (vm-set-extent-property e 'vm-highlight t))) (goto-char (vm-matched-header-end))))) - (vm-fsfemacs-p + (t (let (o-lists p) (setq o-lists (overlay-lists) p (car o-lists)) @@ -367,25 +367,25 @@ ;; large, search just the head and the tail of the region since ;; they tend to contain the interesting text. (let ((search-limit vm-url-search-limit) - search-pairs n) - (if (and search-limit (> (- (point-max) (point-min)) search-limit)) - (setq search-pairs (list (cons (point-min) - (+ (point-min) (/ search-limit 2))) - (cons (- (point-max) (/ search-limit 2)) - (point-max)))) - (setq search-pairs (list (cons (point-min) (point-max))))) - (cond - ((or vm-xemacs-p vm-fsfemacs-p) ; should work for both cases - (let (e) - (vm-map-extents (function - (lambda (e ignore) - (when (vm-extent-property e 'vm-url) - (vm-delete-extent e)) - nil)) - (current-buffer) - ;; (point-min) (point-max) - ) - (if clean-only (vm-inform 1 "Energy from urls removed!") + (search-pairs + (if (and search-limit (> (- (point-max) (point-min)) search-limit)) + (list (cons (point-min) + (+ (point-min) (/ search-limit 2))) + (cons (- (point-max) (/ search-limit 2)) + (point-max))) + (list (cons (point-min) (point-max))))) + n) + ;; Should work for both the Emacs and the XEmacs cases. + (let (e) + (vm-map-extents (function + (lambda (e ignore) + (when (vm-extent-property e 'vm-url) + (vm-delete-extent e)) + nil)) + (current-buffer) + ;; (point-min) (point-max) + ) + (if clean-only (vm-inform 1 "Energy from urls removed!") (while search-pairs (goto-char (car (car search-pairs))) (while (re-search-forward vm-url-regexp (cdr (car search-pairs)) t) @@ -404,24 +404,19 @@ (looking-at "mailto:")) 'vm-menu-popup-mailto-url-browser-menu 'vm-menu-popup-url-browser-menu))) - (if vm-fsfemacs-p - (setq keymap (nconc keymap (current-local-map)))) - (if vm-xemacs-p - (define-key keymap 'button2 'vm-mouse-send-url-at-event) - ;; nothing for fsfemacs? + (if (featurep 'xemacs) + (define-key keymap 'button2 'vm-mouse-send-url-at-event) + ;; Nothing for fsfemacs? ) (when vm-popup-menu-on-mouse-3 - (if vm-xemacs-p - (define-key keymap 'button3 popup-function) - (define-key keymap [mouse-3] popup-function))) + (define-key keymap + (if (featurep 'xemacs) 'button3 [mouse-3]) + popup-function)) (define-key keymap "\r" (function (lambda () (interactive) (vm-mouse-send-url-at-position (point))))) (vm-set-extent-property e 'vm-button t) - ;; for xemacs (vm-set-extent-property e 'keymap keymap) - ;; for fsfemacs - (vm-set-extent-property e 'local-map keymap) (vm-set-extent-property e 'balloon-help 'vm-url-help) ;; for xemacs (vm-set-extent-property e 'highlight t) @@ -430,49 +425,11 @@ ;; for vm-continue-postponed-message (vm-set-extent-property e 'duplicable t) ))) - (setq search-pairs (cdr search-pairs)))))) - (vm-fsfemacs-p - (let (e) - (vm-map-extents (function - (lambda (e ignore) - (when (vm-extent-property e 'vm-url) - (vm-delete-extent e)) - nil)) - (current-buffer)) - (while search-pairs - (goto-char (car (car search-pairs))) - (while (re-search-forward vm-url-regexp (cdr (car search-pairs)) t) - (setq n 1) - (while (null (match-beginning n)) - (vm-increment n)) - (setq e (vm-make-extent (match-beginning n) (match-end n))) - (vm-set-extent-property e 'vm-url t) - (if vm-highlight-url-face - (vm-set-extent-property e 'face vm-highlight-url-face)) - (if vm-url-browser - (let ((keymap (make-sparse-keymap)) - (popup-function - (if (save-excursion - (goto-char (match-beginning n)) - (looking-at "mailto:")) - 'vm-menu-popup-mailto-url-browser-menu - 'vm-menu-popup-url-browser-menu))) - (setq keymap (nconc keymap (current-local-map))) - (if vm-popup-menu-on-mouse-3 - (define-key keymap [mouse-3] popup-function)) - (define-key keymap "\r" - (function (lambda () (interactive) - (vm-mouse-send-url-at-position (point))))) - (vm-set-extent-property e 'vm-button t) - (vm-set-extent-property e 'local-map keymap) - (vm-set-extent-property e 'balloon-help 'vm-url-help) - (vm-set-extent-property e 'mouse-face 'highlight) - ))) - (setq search-pairs (cdr search-pairs)))))))) + (setq search-pairs (cdr search-pairs))))))) (defun vm-energize-headers () (cond - (vm-xemacs-p + ((featurep 'xemacs) (let ((search-tuples '(("^From:" vm-menu-author-menu) ("^Subject:" vm-menu-subject-menu))) regexp menu keymap e) @@ -506,8 +463,7 @@ (vm-set-extent-property e 'balloon-help 'vm-mouse-3-help) (vm-set-extent-property e 'highlight t)) (setq search-tuples (cdr search-tuples))))) - ((and vm-fsfemacs-p - (fboundp 'overlay-put)) + ((fboundp 'overlay-put) (let ((search-tuples '(("^From:" vm-menu-fsfemacs-author-menu) ("^Subject:" vm-menu-fsfemacs-subject-menu))) regexp menu @@ -537,10 +493,9 @@ (setq search-tuples (cdr search-tuples))))))) (defun vm-display-xface () - (cond (vm-xemacs-p (vm-display-xface-xemacs)) - ((and vm-fsfemacs-p - (and (stringp vm-uncompface-program) - (fboundp 'create-image))) + (cond ((featurep 'xemacs) (vm-display-xface-xemacs)) + ((and (stringp vm-uncompface-program) + (fboundp 'create-image)) (vm-display-xface-fsfemacs)))) (defun vm-display-xface-xemacs () @@ -691,7 +646,7 @@ (defun vm-highlight-headers-maybe () ;; highlight the headers (if (or vm-highlighted-header-regexp - (and vm-xemacs-p vm-use-lucid-highlighting)) + (and (featurep 'xemacs) vm-use-lucid-highlighting)) (save-restriction (widen) (narrow-to-region (vm-headers-of (car vm-message-pointer)) @@ -708,9 +663,9 @@ (vm-energize-headers))) ;; display xfaces, if we can (if (and vm-display-xfaces - (or (and vm-xemacs-p (featurep 'xface)) - (and vm-fsfemacs-p (fboundp 'create-image) - (stringp vm-uncompface-program)))) + (if (featurep 'xemacs) + (featurep 'xface) + (and (fboundp 'create-image) (stringp vm-uncompface-program)))) (save-restriction (widen) (narrow-to-region (vm-headers-of (car vm-message-pointer)) @@ -740,7 +695,7 @@ ;; cutoff line one character forward, but only if ;; we're doing MIME decode for preview. (if (and (not just-passing-through) - vm-xemacs-p + (featurep 'xemacs) vm-mail-buffer ; in presentation buffer vm-auto-decode-mime-messages vm-mime-decode-for-preview @@ -1039,7 +994,7 @@ (vm-text-end-of (car vm-message-pointer)))))) (defun vm-narrow-to-page () - (cond (vm-fsfemacs-p + (cond ((not (featurep 'xemacs)) (if (not (and vm-page-end-overlay (overlay-buffer vm-page-end-overlay))) (let ((g vm-page-continuation-glyph)) @@ -1047,7 +1002,7 @@ (vm-set-extent-property vm-page-end-overlay 'vm-glyph g) (vm-set-extent-property vm-page-end-overlay 'before-string g) (overlay-put vm-page-end-overlay 'evaporate nil)))) - (vm-xemacs-p + (t (if (not (and vm-page-end-overlay (vm-extent-end-position vm-page-end-overlay))) (let ((g vm-page-continuation-glyph)) === modified file 'lisp/vm-pcrisis.el' --- lisp/vm-pcrisis.el 2012-04-30 10:59:23 +0000 +++ lisp/vm-pcrisis.el 2012-08-13 02:12:30 +0000 @@ -372,43 +372,43 @@ In other words, EXERLAY is the name of the overlay or extent with a quote in front. START and END are the equivalent of the marker insertion types for the start and end of the overlay/extent." - (if vm-xemacs-p + (if (featurep 'xemacs) (vmpc-set-extent-insertion-types (symbol-value exerlay) start end) (set exerlay (vmpc-set-overlay-insertion-types (symbol-value exerlay) start end)))) -(defun vmpc-exerlay-start (exerlay) +(defun vmpc-exerlay-start (exerlay) ;FIXME: Use defalias! "Return buffer position of the start of EXERLAY." - (if vm-xemacs-p + (if (featurep 'xemacs) (vm-extent-start-position exerlay) (overlay-start exerlay))) (defun vmpc-exerlay-end (exerlay) "Return buffer position of the end of EXERLAY." - (if vm-xemacs-p + (if (featurep 'xemacs) (vm-extent-end-position exerlay) (overlay-end exerlay))) (defun vmpc-move-exerlay (exerlay new-start new-end) "Change EXERLAY to cover region from NEW-START to NEW-END." - (if vm-xemacs-p + (if (featurep 'xemacs) (vm-set-extent-endpoints exerlay new-start new-end (current-buffer)) (move-overlay exerlay new-start new-end (current-buffer)))) (defun vmpc-set-exerlay-detachable-property (exerlay newval) "Set the 'detachable or 'evaporate property for EXERLAY to NEWVAL." - (if vm-xemacs-p + (if (featurep 'xemacs) (vm-set-extent-property exerlay 'detachable newval) (overlay-put exerlay 'evaporate newval))) (defun vmpc-set-exerlay-intangible-property (exerlay newval) "Set the 'intangible or 'atomic property for EXERLAY to NEWVAL." - (if vm-xemacs-p + (if (featurep 'xemacs) (progn (require 'atomic-extents) (vm-set-extent-property exerlay 'atomic newval)) @@ -417,14 +417,14 @@ (defun vmpc-set-exerlay-face (exerlay newface) "Set the face used by EXERLAY to NEWFACE." - (if vm-xemacs-p + (if (featurep 'xemacs) (set-extent-face exerlay newface) (overlay-put exerlay 'face newface))) (defun vmpc-forcefully-detach-exerlay (exerlay) "Leave EXERLAY in memory but detaches it from the buffer." - (if vm-xemacs-p + (if (featurep 'xemacs) (vm-detach-extent exerlay) (delete-overlay exerlay))) === modified file 'lisp/vm-pgg.el' --- lisp/vm-pgg.el 2012-03-04 11:09:40 +0000 +++ lisp/vm-pgg.el 2012-08-13 02:12:30 +0000 @@ -938,7 +938,7 @@ (insert-buffer-substring pgg-errors-buffer)) (vm-pgg-state-set 'verified) (insert-buffer-substring - (if vm-fsfemacs-p pgg-errors-buffer pgg-output-buffer)) + (if (featurep 'xemacs) pgg-output-buffer pgg-errors-buffer)) (vm-pgg-crlf-cleanup start (point))) (setq end (point)) (put-text-property start end 'face @@ -1010,9 +1010,9 @@ ;; verify (unless (pgg-snarf-keys) (error "Snarfing failed")) - (save-excursion - (set-buffer (if vm-fsfemacs-p pgg-errors-buffer pgg-output-buffer)) - (message (buffer-substring (point-min) (point-max)))))) + (with-current-buffer + (if (featurep 'xemacs) pgg-output-buffer pgg-errors-buffer) + (message "%s" (buffer-substring (point-min) (point-max)))))) ;;; ###autoload (defun vm-pgg-attach-public-key () === modified file 'lisp/vm-pine.el' --- lisp/vm-pine.el 2011-12-26 09:50:31 +0000 +++ lisp/vm-pine.el 2012-08-13 02:12:30 +0000 @@ -734,7 +734,7 @@ (not (vm-deleted-flag (car vm-message-pointer)))) (message "Please select a draft!") (select-window (car (get-buffer-window-list buffer nil 0))) - (if (and vm-xemacs-p (frames-of-buffer buffer)) + (if (and (featurep 'xemacs) (frames-of-buffer buffer)) (deiconify-frame (car (frames-of-buffer buffer)))) (setq action 'none)) (setq action 'visit))) @@ -913,7 +913,7 @@ (insert "\n" vm-mail-priority))))) ;;----------------------------------------------------------------------------- -(if (not vm-xemacs-p) +(if (not (featurep 'xemacs)) (defun user-home-directory () (getenv "HOME"))) @@ -1032,9 +1032,8 @@ (result)) ;; Set up a buffer that matches our cached ;; match data. - (save-excursion - (set-buffer buf) - (if vm-fsfemacs-mule-p + (with-current-buffer buf + (if (not (featurep 'xemacs)) (set-buffer-multibyte nil)) ; for empty buffer (widen) (erase-buffer) === modified file 'lisp/vm-reply.el' --- lisp/vm-reply.el 2012-07-03 20:12:20 +0000 +++ lisp/vm-reply.el 2012-08-13 02:12:30 +0000 @@ -793,7 +793,7 @@ (defvar vm-dont-ask-coding-system-question nil) -(cond ((and vm-fsfemacs-mule-p +(cond ((and (not (featurep 'xemacs)) (fboundp 'select-message-coding-system) (not (fboundp 'vm-old-select-message-coding-system))) (fset 'vm-old-select-message-coding-system @@ -1189,7 +1189,7 @@ (insert "Content-Description: forwarded message\n") ;; eight bit chars will get \201 prepended if we ;; don't do this. - (when vm-fsfemacs-mule-p + (when (not (featurep 'xemacs)) (set-buffer-multibyte t))) ; is this safe? ((equal vm-forwarding-digest-type "rfc934") (vm-rfc934-encapsulate-messages @@ -1323,7 +1323,7 @@ (insert "Resent-To: \n") (if mail-self-blind (insert "Bcc: " - (cond ((and vm-xemacs-p (fboundp 'user-mail-address)) + (cond ((and (featurep 'xemacs) (fboundp 'user-mail-address)) (user-mail-address)) ((and (boundp 'user-mail-address) (stringp user-mail-address)) @@ -1677,7 +1677,7 @@ (set-buffer (generate-new-buffer buffer-name)) ;; FSF Emacs: try to prevent write-region (called to handle FCC) from ;; asking the user to choose a safe coding system. - (if (and vm-fsfemacs-mule-p (fboundp 'set-buffer-file-coding-system)) + (if (and (not (featurep 'xemacs)) (fboundp 'set-buffer-file-coding-system)) (set-buffer-file-coding-system 'raw-text)) ;; avoid trying to write auto-save files in potentially ;; unwritable directories. @@ -1749,7 +1749,7 @@ (insert "Reply-To: " mail-default-reply-to "\n")) (when mail-self-blind (insert "Bcc: " - (cond ((and vm-xemacs-p (fboundp 'user-mail-address)) + (cond ((and (featurep 'xemacs) (fboundp 'user-mail-address)) (user-mail-address)) ((and (boundp 'user-mail-address) (stringp user-mail-address)) @@ -1828,7 +1828,7 @@ (mail-position-on-field "To" t)) ((null subject) (mail-position-on-field "Subject" t))) - (cond ((and vm-xemacs-p + (cond ((and (featurep 'xemacs) (fboundp 'start-itimer) (null (get-itimer "vm-rename-mail")) (start-itimer "vm-rename-mail" === modified file 'lisp/vm-rfaddons.el' --- lisp/vm-rfaddons.el 2012-06-18 22:06:47 +0000 +++ lisp/vm-rfaddons.el 2012-08-13 02:12:30 +0000 @@ -106,7 +106,7 @@ (require 'sendmail) (vm-load-features '(bbdb)) -(if vm-xemacs-p (require 'overlay)) +(if (featurep 'xemacs) (require 'overlay)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -613,7 +613,7 @@ ;; predicate, require-match nil t) current-prefix-arg)) - (if (or vm-xemacs-mule-p vm-fsfemacs-p) + (if (or vm-xemacs-mule-p (not (featurep 'xemacs))) (error "vm-mime-8bit-composition-charset has no effect in XEmacs/MULE")) (if buffer-local (set (make-local-variable 'vm-mime-8bit-composition-charset) charset) @@ -1172,11 +1172,10 @@ :group 'vm-rfaddons) (defconst vm-shrunken-headers-keymap - (let ((map (if vm-xemacs-p (make-keymap) (copy-keymap vm-mode-map)))) + (let ((map (if (featurep 'xemacs) (make-keymap) (copy-keymap vm-mode-map)))) (define-key map [(return)] 'vm-shrunken-headers-toggle-this) - (if vm-xemacs-p - (define-key map [(button2)] 'vm-shrunken-headers-toggle-this-mouse) - (define-key map [(mouse-2)] 'vm-shrunken-headers-toggle-this-mouse)) + (define-key map (if (featurep 'xemacs) [(button2)] [(mouse-2)]) + 'vm-shrunken-headers-toggle-this-mouse)) map) "Keymap used for shrunken-headers glyphs. (Rob F)") === modified file 'lisp/vm-save.el' --- lisp/vm-save.el 2012-06-09 22:03:33 +0000 +++ lisp/vm-save.el 2012-08-13 02:12:30 +0000 @@ -69,7 +69,7 @@ ;; match data. (save-excursion (set-buffer buf) - (if vm-fsfemacs-mule-p + (if (not (featurep 'xemacs)) (set-buffer-multibyte nil)) ; for empty buffer (widen) (erase-buffer) === modified file 'lisp/vm-serial.el' --- lisp/vm-serial.el 2012-04-30 10:59:23 +0000 +++ lisp/vm-serial.el 2012-08-13 02:12:30 +0000 @@ -690,7 +690,7 @@ "\\(" (regexp-quote vm-serial-cookie) "\\)*" "[{\(a-zA-Z]")) start end expr result vm-serial-point) - (if (and vm-xemacs-p + (if (and (featurep 'xemacs) (region-exists-p) (eq (zmacs-region-buffer) (current-buffer))) (setq rstart (goto-char (region-beginning)) rend (region-end)) === modified file 'lisp/vm-summary-faces.el' --- lisp/vm-summary-faces.el 2012-04-30 10:59:23 +0000 +++ lisp/vm-summary-faces.el 2012-08-13 02:12:30 +0000 @@ -42,7 +42,7 @@ (require 'vm-virtual)) ;; (eval-and-compile -;; (if vm-xemacs-p (require 'overlay))) +;; (if (featurep 'xemacs) (require 'overlay))) (declare-function vm-extent-property "vm-misc.el" (overlay prop) t) (declare-function vm-set-extent-property "vm-misc.el" (overlay prop value) t) === modified file 'lisp/vm-summary.el' --- lisp/vm-summary.el 2012-05-06 03:00:26 +0000 +++ lisp/vm-summary.el 2012-08-13 02:12:30 +0000 @@ -128,7 +128,7 @@ bidi-paragraph-direction 'left-to-right) ;; horizontal scrollbar off by default ;; user can turn it on in summary hook if desired. - (when (and vm-xemacs-p (featurep 'scrollbar)) + (when (and (featurep 'xemacs) (featurep 'scrollbar)) (set-specifier scrollbar-height (cons (current-buffer) 0))) (use-local-map vm-summary-mode-map) (when (vm-menu-support-possible-p) @@ -662,14 +662,14 @@ (defun vm-summary-xxxx-highlight-region (start end face var) (let ((ooo (symbol-value var))) - (cond (vm-fsfemacs-p + (cond ((not (featurep 'xemacs)) (if (and ooo (overlay-buffer ooo)) (move-overlay ooo start end) (setq ooo (make-overlay start end)) (set var ooo) (overlay-put ooo 'evaporate nil) (overlay-put ooo 'face face))) - (vm-xemacs-p + (t (if (and ooo (vm-extent-end-position ooo)) (vm-set-extent-endpoints ooo start end) (setq ooo (vm-make-extent start end)) @@ -2177,7 +2177,7 @@ buffer-read-only t buffer-offer-save nil truncate-lines t) - (when (and vm-xemacs-p (featurep 'scrollbar)) + (when (and (featurep 'xemacs) (featurep 'scrollbar)) (set-specifier scrollbar-height (cons (current-buffer) 0))) (use-local-map vm-folders-summary-mode-map) (when (vm-menu-support-possible-p) === modified file 'lisp/vm-toolbar.el' --- lisp/vm-toolbar.el 2011-11-12 23:26:19 +0000 +++ lisp/vm-toolbar.el 2012-08-13 02:12:30 +0000 @@ -387,7 +387,7 @@ (defun vm-toolbar-install-or-uninstall-toolbar () (and (vm-toolbar-support-possible-p) vm-use-toolbar (vm-toolbar-install-toolbar)) - (if (and vm-fsfemacs-p (not vm-use-toolbar)) + (if (and (not (featurep 'xemacs)) (not vm-use-toolbar)) (vm-toolbar-fsfemacs-uninstall-toolbar))) (defcustom vm-toolbar-height nil @@ -402,7 +402,7 @@ ;; save file is newer..." (require 'vm-save) (require 'vm-summary) - (if vm-fsfemacs-p + (if (not (featurep 'xemacs)) (if (not vm-fsfemacs-toolbar-installed-p) (vm-toolbar-fsfemacs-install-toolbar)) (if (not (vm-toolbar-pixmap-directory)) @@ -493,7 +493,7 @@ (defun vm-toolbar-initialize () (cond - (vm-fsfemacs-p nil) + ((not (featurep 'xemacs)) nil) ((null vm-toolbar-help-icon) (let ((tuples (list === modified file 'lisp/vm-vars.el' --- lisp/vm-vars.el 2012-06-18 22:06:47 +0000 +++ lisp/vm-vars.el 2012-08-13 02:12:30 +0000 @@ -1825,7 +1825,7 @@ regexp)) (defcustom vm-mime-default-face-charsets - (if vm-fsfemacs-mule-p + (if (not (featurep 'xemacs)) (if (eq window-system nil) '("us-ascii" "ansi_x3.4-1968" "iso-8859-1") '("us-ascii" "ansi_x3.4-1968")) @@ -4308,7 +4308,7 @@ (expand-file-name vm-configure-datadir)) (expand-file-name "pixmaps" vm-dir) (expand-file-name "../pixmaps" vm-dir) - (let ((d (and vm-xemacs-p + (let ((d (and (featurep 'xemacs) (xemacs-locate-data-directory "vm")))) (and d (expand-file-name "pixmaps" d))))) image-dir) @@ -5008,8 +5008,8 @@ (put 'vm-summary-marked-face 'face-alias 'vm-summary-marked) (make-obsolete 'vm-summary-marked-face 'vm-summary-marked "8.2.0") -(if vm-xemacs-p - (defface vm-summary-deleted +(defface vm-summary-deleted + (if (featurep 'xemacs) '( (((class color) (background light)) (:foreground "grey50" :strikethru t)) @@ -5028,9 +5028,6 @@ (((type tty)) (:dim t)) (t ())) - "The face used in VM Summary buffers for deleted messages." - :group 'vm-summary-faces) - (defface vm-summary-deleted '( (((type x w32 mswindows mac) (class color) (background light)) (:foreground "grey50" :strike-through "grey80")) @@ -5052,9 +5049,9 @@ (:strike-through t)) (((type tty)) (:dim t)) - (t ())) - "The face used in VM Summary buffers for deleted messages." - :group 'vm-summary-faces)) + (t ()))) + "The face used in VM Summary buffers for deleted messages." + :group 'vm-summary-faces) (put 'vm-summary-deleted-face 'face-alias 'vm-summary-deleted) (make-obsolete 'vm-summary-deleted-face 'vm-summary-deleted "8.2.0") @@ -5774,7 +5771,7 @@ :group 'vm-helpers :type '(string :tag "Shell command")) -(defcustom vm-uncompface-program (and vm-fsfemacs-p +(defcustom vm-uncompface-program (and (not (featurep 'xemacs)) (fboundp 'image-type-available-p) (vm-locate-executable-file "uncompface")) "*Program used to convert X-Face data to Sun icon format. @@ -5785,7 +5782,7 @@ :type '(choice (const :tag "None" nil) file)) -(defcustom vm-icontopbm-program (and vm-fsfemacs-p +(defcustom vm-icontopbm-program (and (not (featurep 'xemacs)) (fboundp 'image-type-available-p) (vm-locate-executable-file "icontopbm")) "*Program to convert Sun icon data to a PBM file. @@ -5797,7 +5794,7 @@ file)) (defvar vm-uncompface-accepts-dash-x - (and vm-fsfemacs-p (fboundp 'image-type-available-p) + (and (not (featurep 'xemacs)) (fboundp 'image-type-available-p) (stringp vm-uncompface-program) (eq 0 (string-match "#define" (shell-command-to-string @@ -7249,7 +7246,7 @@ (defconst vm-mime-header-list '("MIME-Version:" "Content-")) (defconst vm-mime-header-regexp "\\(MIME-Version:\\|Content-\\)") (defconst vm-mime-mule-charset-to-coding-alist - (cond (vm-fsfemacs-mule-p + (cond ((not (featurep 'xemacs)) (let ((coding-systems (coding-system-list)) (alist nil) val) @@ -7313,7 +7310,7 @@ "Alist that maps MULE character sets to matching MIME character sets.") (defconst vm-mime-mule-coding-to-charset-alist - (cond (vm-fsfemacs-mule-p + (cond ((not (featurep 'xemacs)) (let ((coding-systems (coding-system-list)) (alist nil) val) === modified file 'lisp/vm-version.el' --- lisp/vm-version.el 2011-06-25 18:05:45 +0000 +++ lisp/vm-version.el 2012-08-13 02:12:30 +0000 @@ -47,81 +47,71 @@ (message "VM version is: %s" vm-version)) vm-version) -(defconst vm-xemacs-p - (featurep 'xemacs)) (defconst vm-xemacs-mule-p - (and vm-xemacs-p (featurep 'mule))) + (and (featurep 'xemacs) (featurep 'mule))) (defconst vm-xemacs-file-coding-p - (and vm-xemacs-p (featurep 'file-coding) + (and (featurep 'xemacs) (featurep 'file-coding) ;; paranoia (fboundp 'set-buffer-file-coding-system))) -(defconst vm-fsfemacs-p - (not vm-xemacs-p)) -(defconst vm-fsfemacs-mule-p - (and (not vm-xemacs-mule-p) (featurep 'mule) - (fboundp 'set-buffer-file-coding-system))) -(defun vm-xemacs-p () vm-xemacs-p) (defun vm-xemacs-mule-p () vm-xemacs-mule-p) (defun vm-xemacs-file-coding-p () vm-xemacs-file-coding-p) -(defun vm-fsfemacs-p () vm-fsfemacs-p) -(defun vm-fsfemacs-mule-p () vm-fsfemacs-mule-p) (defun vm-emacs-mule-p () - (or vm-xemacs-mule-p vm-fsfemacs-mule-p)) + (or vm-xemacs-mule-p (not (featurep 'xemacs)))) (defun vm-mouse-fsfemacs-mouse-p () - (and vm-fsfemacs-p + (and (not (featurep 'xemacs)) (fboundp 'set-mouse-position))) (defun vm-mouse-xemacs-mouse-p () - (and vm-xemacs-p + (and (featurep 'xemacs) (fboundp 'set-mouse-position))) (defun vm-menu-fsfemacs-menus-p () - (and vm-fsfemacs-p + (and (not (featurep 'xemacs)) (fboundp 'menu-bar-mode))) (defun vm-menu-fsfemacs19-menus-p () - (and vm-fsfemacs-p + (and (not (featurep 'xemacs)) (fboundp 'menu-bar-mode) (= emacs-major-version 19))) (defun vm-menu-xemacs-menus-p () - (and vm-xemacs-p + (and (featurep 'xemacs) (fboundp 'set-buffer-menubar))) (defun vm-menu-can-eval-item-name () - (and vm-xemacs-p + (and (featurep 'xemacs) (fboundp 'check-menu-syntax) (condition-case nil (check-menu-syntax '("bar" ((identity "foo") 'ding t))) (error nil)))) (defun vm-multiple-frames-possible-p () - (cond (vm-xemacs-p + (cond ((featurep 'xemacs) (or (memq 'win (device-matching-specifier-tag-list)) (featurep 'tty-frames))) - (vm-fsfemacs-p + ((not (featurep 'xemacs)) (fboundp 'make-frame)))) (defun vm-mouse-support-possible-p () - (cond (vm-xemacs-p + (cond ((featurep 'xemacs) (featurep 'window-system)) - (vm-fsfemacs-p + ((not (featurep 'xemacs)) (fboundp 'track-mouse)))) (defun vm-mouse-support-possible-here-p () - (cond (vm-xemacs-p + (cond ((featurep 'xemacs) (memq 'win (device-matching-specifier-tag-list))) - (vm-fsfemacs-p + ((not (featurep 'xemacs)) (memq window-system '(x mac w32 win32))))) (defun vm-menu-support-possible-p () - (cond (vm-xemacs-p + (cond ((featurep 'xemacs) (featurep 'menubar)) - (vm-fsfemacs-p + ((not (featurep 'xemacs)) (fboundp 'menu-bar-mode)))) (defun vm-menubar-buttons-possible-p () @@ -129,23 +119,24 @@ Windowing toolkits do not allow such buttons. This says whether such buttons are possible under the current windowing system." (not - (cond (vm-xemacs-p (memq (device-type) '(gtk ns))) - (vm-fsfemacs-p (or (and (eq window-system 'x) (featurep 'gtk)) - (eq window-system 'ns)))))) + (cond ((featurep 'xemacs) (memq (device-type) '(gtk ns))) + (t (or (and (eq window-system 'x) (featurep 'gtk)) + (eq window-system 'ns)))))) (defun vm-toolbar-support-possible-p () - (or (and vm-xemacs-p (featurep 'toolbar)) - (and vm-fsfemacs-p (fboundp 'tool-bar-mode) (boundp 'tool-bar-map)))) + (or (and (featurep 'xemacs) (featurep 'toolbar)) + (and (not (featurep 'xemacs)) + (fboundp 'tool-bar-mode) (boundp 'tool-bar-map)))) (defun vm-multiple-fonts-possible-p () - (cond (vm-xemacs-p + (cond ((featurep 'xemacs) (memq (device-type) '(x gtk mswindows))) - (vm-fsfemacs-p + (t (memq window-system '(x mac w32 win32))))) (defun vm-images-possible-here-p () - (or (and vm-xemacs-p (memq (device-type) '(x gtk mswindows))) - (and vm-fsfemacs-p window-system + (or (and (featurep 'xemacs) (memq (device-type) '(x gtk mswindows))) + (and (not (featurep 'xemacs)) window-system (or (fboundp 'image-type-available-p) (and (stringp vm-imagemagick-convert-program) (stringp vm-imagemagick-identify-program)))))) === modified file 'lisp/vm-window.el' --- lisp/vm-window.el 2012-04-30 10:59:23 +0000 +++ lisp/vm-window.el 2012-08-13 02:12:30 +0000 @@ -145,7 +145,7 @@ (unwind-protect (progn (set-buffer (setq work-buffer (get-buffer-create "*vm-wconfig*"))) - (if vm-fsfemacs-mule-p + (if (not (featurep 'xemacs)) (set-buffer-multibyte nil)) ; for empty buffer (erase-buffer) (setq vm-window-configurations @@ -164,7 +164,7 @@ (unwind-protect (progn (set-buffer (setq work-buffer (get-buffer-create "*vm-wconfig*"))) - (if vm-fsfemacs-mule-p + (if (not (featurep 'xemacs)) (set-buffer-multibyte nil)) ; for empty buffer ;; for MULE (if (fboundp 'set-buffer-file-coding-system) @@ -484,7 +484,7 @@ (defun vm-bury-buffer (&optional buffer) (or buffer (setq buffer (current-buffer))) - (if vm-xemacs-p + (if (featurep 'xemacs) (if (vm-multiple-frames-possible-p) (vm-frame-loop 'bury buffer) (bury-buffer buffer)) @@ -624,7 +624,7 @@ ;; (/ (apply 'screen-width frame) 2) ;; (/ (apply 'screen-height frame) 2)))) ))) - ((vm-fsfemacs-p) + ((not (featurep 'xemacs)) (let ((mp (mouse-position))) (if (and (eq (car mp) frame) ;; nil coordinates mean that the mouse @@ -692,7 +692,7 @@ ;; 2 April 1997, frame-totally-visible-p apparently still broken ;; under 19.15. I give up for now. ;;(if (and (fboundp 'frame-totally-visible-p) -;; vm-xemacs-p +;; (featurep 'xemacs) ;; (or (>= emacs-major-version 20) ;; (>= emacs-minor-version 15))) ;; (fset 'vm-frame-totally-visible-p 'frame-totally-visible-p) === modified file 'lisp/vm.el' --- lisp/vm.el 2012-05-30 07:41:26 +0000 +++ lisp/vm.el 2012-08-13 02:12:30 +0000 @@ -215,12 +215,12 @@ ;; [5] Prepare the folder buffer for MULE - (if (and vm-fsfemacs-mule-p enable-multibyte-characters) + (if (and (not (featurep 'xemacs)) enable-multibyte-characters) (set-buffer-multibyte nil)) ; is this safe? (defvar buffer-file-coding-system) (if (or vm-xemacs-mule-p vm-xemacs-file-coding-p) (vm-setup-xemacs-folder-coding-system)) - (if vm-fsfemacs-mule-p + (if (not (featurep 'xemacs)) (vm-setup-fsfemacs-folder-coding-system)) ;; [6] Safeguards @@ -1472,10 +1472,10 @@ (defun vm-check-emacs-version () "Checks the version of Emacs and gives an error if it is unsupported." - (cond ((and vm-xemacs-p (< emacs-major-version 21)) + (cond ((and (featurep 'xemacs) (< emacs-major-version 21)) (error "VM %s must be run on XEmacs 21 or a later version." (vm-version))) - ((and vm-fsfemacs-p (< emacs-major-version 21)) + ((and (not (featurep 'xemacs)) (< emacs-major-version 21)) (error "VM %s must be run on GNU Emacs 21 or a later version." (vm-version))))) @@ -1575,15 +1575,15 @@ (setq vm-buffers-needing-display-update (make-vector 29 0)) (setq vm-buffers-needing-undo-boundaries (make-vector 29 0)) (add-hook 'post-command-hook 'vm-add-undo-boundaries) - (if (if vm-xemacs-p + (if (if (featurep 'xemacs) (find-face 'vm-monochrome-image) (facep 'vm-monochrome-image)) nil (make-face 'vm-monochrome-image) (set-face-background 'vm-monochrome-image "white") (set-face-foreground 'vm-monochrome-image "black")) - (if (or (not vm-fsfemacs-p) - ;; don't need this face under Emacs 21. + (if (or (featurep 'xemacs) + ;; Don't need this face under Emacs 21. (fboundp 'image-type-available-p) (facep 'vm-image-placeholder)) nil