;;; prv-xemacs.el --- XEmacs support for preview-latex
-;; Copyright (C) 2001, 02, 03, 04, 05,
-;; 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2006, 2017 Free Software Foundation, Inc.
;; Author: David Kastrup
;; Keywords: convenience, tex, wp
"List of macros only present when compiling/loading uncompiled.")
(defmacro preview-defmacro (name &rest rest)
- (push
- (if (fboundp name)
- (cons name (symbol-function name))
- name)
- preview-compatibility-macros)
- `(eval-when-compile (defmacro ,name ,@rest)))
+ (when (featurep 'xemacs)
+ (push
+ (if (fboundp name)
+ (cons name (symbol-function name))
+ name)
+ preview-compatibility-macros)
+ `(eval-when-compile (defmacro ,name ,@rest))))
(push 'preview-defmacro preview-compatibility-macros))
(preview-defmacro assoc-default (key alist test)
21.4 is rather bad at preserving incomplete multibyte characters
in that process. This variable makes it possible to use a
reconstructable coding system in the run buffer instead. Specify
-an alist of base coding system names here, which you can get
-using
+an alist of coding system names here, which you can get using
- \(coding-system-name (coding-system-base buffer-file-coding-system))
+ \(coding-system-name buffer-file-coding-system)
in properly detected buffers."
:group 'preview-latex
preview-buffer-recoding-alist))
base))
+(if (and (featurep 'mule)
+ (= emacs-major-version 21)
+ (< emacs-minor-version 5))
+ (defadvice coding-system-change-eol-conversion
+ (after fallback activate)
+ "Return CODING-SYSTEM as-is if the result is nil.
+XEmacs 21.4 mule-ucs fails to define utf-8 to respond properly to
+this function."
+ (unless ad-return-value
+ (setq ad-return-value (ad-get-arg 0)))))
+
(defun preview-mode-setup ()
"Setup proper buffer hooks and behavior for previews."
(set (make-local-variable 'desktop-save-buffer)
(nth 1 image)
(nth 2 image)))))
+(if (eq system-type 'windows-nt)
+ (defadvice preview-ps-quote-filename (around path-sep-to-slash)
+ "Make path separator to slash so that the function will not be confused."
+ (let ((directory-sep-char ?/))
+ ad-do-it)))
+
(provide 'prv-xemacs)
;;; Local variables: