* lisp/gnus/mm-view.el (mm-inline-image-xemacs): Remove.
(mm-inline-image): Rename from mm-inline-image-emacs.
* lisp/gnus/mml.el: Remove XEmacs compat code.
* lisp/gnus/nnheader.el: Remove XEmacs compat code.
* lisp/gnus/nnimap.el (nnimap-open-connection-1): Remove
XEmacs compat code.
* lisp/gnus/nnir.el (nnir-run-gmane): Remove XEmacs compat code.
* lisp/gnus/nnmail.el (nnmail-pathname-coding-system): Remove
XEmacs compat code.
* lisp/gnus/nnmairix.el: Remove XEmacs compat code.
* lisp/gnus/nnrss.el: Remove XEmacs compat code.
* lisp/gnus/nntp.el: Remove XEmacs compat code.
(defsubst mm-uu-function-2 (entry)
(nth 5 entry))
-;; In Emacs 22, we could use `min-colors' in the face definition. But Emacs
-;; 21 and XEmacs don't support it.
-(defcustom mm-uu-hide-markers
- (< 16 (or (and (fboundp 'defined-colors)
- (length (defined-colors)))
- (and (fboundp 'device-color-cells)
- (device-color-cells))
- 0))
+(defcustom mm-uu-hide-markers (< 16 (length (defined-colors)))
"If non-nil, hide verbatim markers.
The value should be nil on displays where the face
`mm-uu-extract' isn't distinguishable to the face `default'."
(let ((obuf (current-buffer))
(multi (and (boundp 'enable-multibyte-characters)
enable-multibyte-characters))
- (coding-system
- ;; Might not exist in non-MULE XEmacs
- (when (boundp 'buffer-file-coding-system)
- buffer-file-coding-system)))
+ (coding-system buffer-file-coding-system))
(with-current-buffer (generate-new-buffer " *mm-uu*")
(if multi (mm-enable-multibyte) (mm-disable-multibyte))
(setq buffer-file-coding-system coding-system)
(autoload 'gnus-rescale-image "gnus-util")
-(defun mm-inline-image-emacs (handle)
+(defun mm-inline-image (handle)
(let ((b (point-marker))
(inhibit-read-only t))
(put-image
(remove-images b b)
(delete-region b (1+ b)))))))
-(defun mm-inline-image-xemacs (handle)
- (when (featurep 'xemacs)
- (insert "\n")
- (forward-char -1)
- (let ((annot (make-annotation (mm-get-image handle) nil 'text))
- (inhibit-read-only t))
- (mm-handle-set-undisplayer
- handle
- `(lambda ()
- (let ((b ,(point-marker))
- (inhibit-read-only t))
- (delete-annotation ,annot)
- (delete-region (1- b) b))))
- (set-extent-property annot 'mm t)
- (set-extent-property annot 'duplicable t))))
-
-(eval-and-compile
- (if (featurep 'xemacs)
- (defalias 'mm-inline-image 'mm-inline-image-xemacs)
- (defalias 'mm-inline-image 'mm-inline-image-emacs)))
-
(defvar mm-w3m-setup nil
"Whether gnus-article-mode has been setup to use emacs-w3m.")
handle
`(lambda ()
(let ((inhibit-read-only t))
- (if (fboundp 'remove-specifier)
- ;; This is only valid on XEmacs.
- (dolist (prop '(background background-pixmap foreground))
- (remove-specifier
- (face-property 'default prop) (current-buffer))))
(delete-region ,(point-min-marker) ,(point-max-marker)))))))))
;; Shut up byte-compiler.
(if (fboundp 'font-lock-ensure)
(font-lock-ensure)
(font-lock-fontify-buffer)))))
- ;; By default, XEmacs font-lock uses non-duplicable text
- ;; properties. This code forces all the text properties
- ;; to be copied along with the text.
- (when (featurep 'xemacs)
- (map-extents (lambda (ext ignored)
- (set-extent-property ext 'duplicable t)
- nil)
- nil nil nil nil nil 'text-prop))
(setq text (buffer-string))
;; Set buffer unmodified to avoid confirmation when killing the
;; buffer.
(mm-insert-inline handle text)))
;; Shouldn't these functions check whether the user even wants to use
-;; font-lock? At least under XEmacs, this fontification is pretty
-;; much unconditional. Also, it would be nice to change for the size
-;; of the fontified region.
+;; font-lock? Also, it would be nice to change for the size of the
+;; fontified region.
(defun mm-display-patch-inline (handle)
(mm-display-inline-fontify handle 'diff-mode))
(require 'mml-sec)
(eval-when-compile (require 'cl))
(eval-when-compile (require 'url))
-(eval-when-compile
- (when (featurep 'xemacs)
- (require 'easy-mmode))) ; for `define-minor-mode'
(autoload 'message-make-message-id "message")
(declare-function gnus-setup-posting-charset "gnus-msg" (group))
filename)))))
(t
(let ((contents (cdr (assq 'contents cont))))
- (if (if (featurep 'xemacs)
- (string-match "[^\000-\377]" contents)
- (multibyte-string-p contents))
+ (if (multibyte-string-p contents)
(progn
(mm-enable-multibyte)
(insert contents)
(easy-menu-define
mml-menu mml-mode-map ""
`("Attachments"
- ["Attach File..." mml-attach-file
- ,@(if (featurep 'xemacs) '(t)
- '(:help "Attach a file at point"))]
+ ["Attach File..." mml-attach-file :help "Attach a file at point"]
["Attach Buffer..." mml-attach-buffer
- ,@(if (featurep 'xemacs) '(t)
- '(:help "Attach a buffer to the outgoing message"))]
+ :help "Attach a buffer to the outgoing message"]
["Attach External..." mml-attach-external
- ,@(if (featurep 'xemacs) '(t)
- '(:help "Attach reference to an external file"))]
+ :help "Attach reference to an external file"]
;; FIXME: Is it possible to do this without using
;; `gnus-gcc-externalize-attachments'?
["Externalize Attachments"
(lambda ()
(interactive)
- (if (not (and (boundp 'gnus-gcc-externalize-attachments)
- (memq gnus-gcc-externalize-attachments
- '(all t nil))))
- ;; Stupid workaround for XEmacs not honoring :visible.
- (message "Can't handle this value of `gnus-gcc-externalize-attachments'")
- (setq gnus-gcc-externalize-attachments
- (not gnus-gcc-externalize-attachments))
- (message "gnus-gcc-externalize-attachments is `%s'."
- gnus-gcc-externalize-attachments)))
- ;; XEmacs barfs on :visible.
- ,@(if (featurep 'xemacs) nil
- '(:visible (and (boundp 'gnus-gcc-externalize-attachments)
- (memq gnus-gcc-externalize-attachments
- '(all t nil)))))
+ (setq gnus-gcc-externalize-attachments
+ (not gnus-gcc-externalize-attachments))
+ (message "gnus-gcc-externalize-attachments is `%s'."
+ gnus-gcc-externalize-attachments))
+ :visible (and (boundp 'gnus-gcc-externalize-attachments)
+ (memq gnus-gcc-externalize-attachments
+ '(all t nil)))
:style toggle
:selected gnus-gcc-externalize-attachments
- ,@(if (featurep 'xemacs) nil
- '(:help "Save attachments as external parts in Gcc copies"))]
+ :help "Save attachments as external parts in Gcc copies"]
"----"
;;
("Change Security Method"
["PGP/MIME"
(lambda () (interactive) (setq mml-secure-method "pgpmime"))
- ,@(if (featurep 'xemacs) nil
- '(:help "Set Security Method to PGP/MIME"))
+ :help "Set Security Method to PGP/MIME"
:style radio
:selected (equal mml-secure-method "pgpmime") ]
["S/MIME"
(lambda () (interactive) (setq mml-secure-method "smime"))
- ,@(if (featurep 'xemacs) nil
- '(:help "Set Security Method to S/MIME"))
+ :help "Set Security Method to S/MIME"
:style radio
:selected (equal mml-secure-method "smime") ]
["Inline PGP"
(lambda () (interactive) (setq mml-secure-method "pgp"))
- ,@(if (featurep 'xemacs) nil
- '(:help "Set Security Method to inline PGP"))
+ :help "Set Security Method to inline PGP"
:style radio
:selected (equal mml-secure-method "pgp") ] )
;;
["Encrypt Message" mml-secure-message-encrypt t]
["Sign and Encrypt Message" mml-secure-message-sign-encrypt t]
["Encrypt/Sign off" mml-unsecure-message
- ,@(if (featurep 'xemacs) '(t)
- '(:help "Don't Encrypt/Sign Message"))]
+ :help "Don't Encrypt/Sign Message"]
;; Do we have separate encrypt and encrypt/sign commands for parts?
["Sign Part" mml-secure-sign t]
["Encrypt Part" mml-secure-encrypt t]
;;["Narrow" mml-narrow-to-part t]
["Quote MML in region" mml-quote-region
:active (message-mark-active-p)
- ,@(if (featurep 'xemacs) nil
- '(:help "Quote MML tags in region"))]
+ :help "Quote MML tags in region"]
["Validate MML" mml-validate t]
["Preview" mml-preview t]
"----"
["Emacs MIME manual" (lambda () (interactive) (message-info 4))
- ,@(if (featurep 'xemacs) '(t)
- '(:help "Display the Emacs MIME manual"))]
+ :help "Display the Emacs MIME manual"]
["PGG manual" (lambda () (interactive) (message-info mml2015-use))
- ;; XEmacs barfs on :visible.
- ,@(if (featurep 'xemacs) nil
- '(:visible (and (boundp 'mml2015-use) (equal mml2015-use 'pgg))))
- ,@(if (featurep 'xemacs) '(t)
- '(:help "Display the PGG manual"))]
+ :visible (and (boundp 'mml2015-use) (equal mml2015-use 'pgg))
+ :help "Display the PGG manual"]
["EasyPG manual" (lambda () (interactive) (require 'mml2015) (message-info mml2015-use))
- ;; XEmacs barfs on :visible.
- ,@(if (featurep 'xemacs) nil
- '(:visible (and (boundp 'mml2015-use) (equal mml2015-use 'epg))))
- ,@(if (featurep 'xemacs) '(t)
- '(:help "Display the EasyPG manual"))]))
+ :visible (and (boundp 'mml2015-use) (equal mml2015-use 'epg))
+ :help "Display the EasyPG manual"]))
(define-minor-mode mml-mode
"Minor mode for editing MML.
(string-match nnheader-numerical-short-files file)
(string-to-number (match-string 0 file))))
-(defvar nnheader-directory-files-is-safe
- (or (eq system-type 'windows-nt)
- (not (featurep 'xemacs)))
+(defvar nnheader-directory-files-is-safe (not (eq system-type 'windows-nt))
"If non-nil, Gnus believes `directory-files' is safe.
It has been reported numerous times that `directory-files' fails with
an alarming frequency on NFS mounted file systems. If it is nil,
2 0))
;; We translate -- but only the file name. We leave the directory
;; alone.
- (if (and (featurep 'xemacs)
- (memq system-type '(windows-nt cygwin)))
- ;; This is needed on NT and stuff, because
- ;; file-name-nondirectory is not enough to split
- ;; file names, containing ':', e.g.
- ;; "d:\\Work\\News\\nntp+news.fido7.ru:fido7.ru.gnu.SCORE"
- ;;
- ;; we are trying to correctly split such names:
- ;; "d:file.name" -> "a:" "file.name"
- ;; "aaa:bbb.ccc" -> "" "aaa:bbb.ccc"
- ;; "d:aaa\\bbb:ccc" -> "d:aaa\\" "bbb:ccc"
- ;; etc.
- ;; to translate then only the file name part.
- (progn
- (setq leaf file
- path "")
- (if (string-match "\\(^\\w:\\|[/\\]\\)\\([^/\\]+\\)$" file)
- (setq leaf (substring file (match-beginning 2))
- path (substring file 0 (match-beginning 2)))))
- ;; Emacs DTRT, says andrewi.
- (setq leaf (file-name-nondirectory file)
- path (file-name-directory file))))
+ (setq leaf (file-name-nondirectory file)
+ path (file-name-directory file)))
(setq len (length leaf))
(while (< i len)
(when (setq trans (cdr (assq (aref leaf i)
(defmacro nnheader-insert-buffer-substring (buffer &optional start end)
"Copy string from unibyte buffer to multibyte current buffer."
- (if (featurep 'xemacs)
- `(insert-buffer-substring ,buffer ,start ,end)
- `(if enable-multibyte-characters
- (insert (with-current-buffer ,buffer
- (string-to-multibyte
- ,(if (or start end)
- `(buffer-substring (or ,start (point-min))
- (or ,end (point-max)))
- '(buffer-string)))))
- (insert-buffer-substring ,buffer ,start ,end))))
+ `(if enable-multibyte-characters
+ (insert (with-current-buffer ,buffer
+ (string-to-multibyte
+ ,(if (or start end)
+ `(buffer-substring (or ,start (point-min))
+ (or ,end (point-max)))
+ '(buffer-string)))))
+ (insert-buffer-substring ,buffer ,start ,end)))
(defvar nnheader-last-message-time '(0 0))
(defun nnheader-message-maybe (&rest args)
(setq nnheader-last-message-time now)
(apply 'nnheader-message args))))
-(when (featurep 'xemacs)
- (require 'nnheaderxm))
-
(run-hooks 'nnheader-load-hook)
(provide 'nnheader)
(when (and stream (not (memq (process-status stream) '(open run))))
(setq stream nil))
- (when (and (fboundp 'set-network-process-option) ;; Not in XEmacs.
- (fboundp 'process-type) ;; Emacs 22 doesn't provide it.
- (eq (process-type stream) 'network))
+ (when (eq (process-type stream) 'network)
;; Use TCP-keepalive so that connections that pass through a NAT
;; router don't hang when left idle.
(set-network-process-option stream :keepalive t))
(mm-url-encode-www-form-urlencoded
`(("query" . ,search)
("HITSPERPAGE" . "999")))))
- (unless (featurep 'xemacs) (set-buffer-multibyte t))
+ (set-buffer-multibyte t)
(decode-coding-region (point-min) (point-max) 'utf-8)
(goto-char (point-min))
(forward-line 1)
mm-text-coding-system
"Coding system used in reading inbox")
-(defvar nnmail-pathname-coding-system
- ;; This causes Emacs 22.2 and 22.3 to issue a useless warning.
- ;;(if (and (featurep 'xemacs) (featurep 'file-coding))
- (if (featurep 'xemacs)
- (if (featurep 'file-coding)
- ;; Work around a bug in many XEmacs 21.5 betas.
- ;; Cf. http://thread.gmane.org/gmane.emacs.gnus.general/68134
- (setq file-name-coding-system (coding-system-aliasee 'file-name))))
+(defvar nnmail-pathname-coding-system nil
"*Coding system for file name.")
(defun nnmail-find-file (file)
;;; === Keymaps
-(eval-when-compile
- (when (featurep 'xemacs)
- ;; The `kbd' macro requires that the `read-kbd-macro' macro is available.
- (require 'edmacro)))
-
;; Group mode
(defun nnmairix-group-mode-hook ()
"Nnmairix group mode keymap."
(max 1 (/ (* (window-width window) 7) 8))))
(fill-region (point) (point-max))
(goto-char (point-max))
- ;; XEmacs version of `fill-region' inserts newline.
(unless (bolp)
(insert "\n"))))
(when (or link enclosure)
(defvoo nntp-connection-timeout nil
"*Number of seconds to wait before an nntp connection times out.
-If this variable is nil, which is the default, no timers are set.
-NOTE: This variable is never seen to work in Emacs 20 and XEmacs 21.")
+If this variable is nil, which is the default, no timers are set.")
(defvoo nntp-prepare-post-hook nil
"*Hook run just before posting an article. It is supposed to be used
(defmacro nntp-copy-to-buffer (buffer start end)
"Copy string from unibyte current buffer to multibyte buffer."
- (if (featurep 'xemacs)
- `(copy-to-buffer ,buffer ,start ,end)
- `(let ((string (buffer-substring ,start ,end)))
- (with-current-buffer ,buffer
- (erase-buffer)
- (insert (if enable-multibyte-characters
- (string-to-multibyte string)
- string))
- (goto-char (point-min))
- nil))))
+ `(let ((string (buffer-substring ,start ,end)))
+ (with-current-buffer ,buffer
+ (erase-buffer)
+ (insert (if enable-multibyte-characters
+ (string-to-multibyte string)
+ string))
+ (goto-char (point-min))
+ nil)))
(defsubst nntp-wait-for (process wait-for buffer &optional decode discard)
"Wait for WAIT-FOR to arrive from PROCESS."
(nntp-kill-buffer pbuffer))
(when (and (buffer-name pbuffer)
process)
- (when (and (fboundp 'set-network-process-option) ;; Unavailable in XEmacs.
- (fboundp 'process-type) ;; Emacs 22 doesn't provide it.
- (eq (process-type process) 'network))
+ (when (eq (process-type process) 'network)
;; Use TCP-keepalive so that connections that pass through a NAT router
;; don't hang when left idle.
(set-network-process-option process :keepalive t))
;;("TOPDOC" . "1000")
))))
(setq buffer-file-name nil)
- (unless (featurep 'xemacs) (set-buffer-multibyte t))
+ (set-buffer-multibyte t)
(decode-coding-region (point-min) (point-max) 'utf-8)
t)