From 6c701f1a9bd3532f1a752b58147d0dc175c0a5b8 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 22 Jul 1999 05:04:28 +0000 Subject: [PATCH] (mu-cite-load-registration-file): Use `file-coding-system' instead of `buffer-file-coding-system' for old Emacsen. (mu-cite-load-registration-file): Use `insert-file-contents' instead of `insert-file-contents-as-coding-system' if the value of `mu-registration-file-coding-system-for-read' is nil. --- mu-register.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/mu-register.el b/mu-register.el index 6b1c0b7..b3a5023 100644 --- a/mu-register.el +++ b/mu-register.el @@ -29,6 +29,8 @@ (require 'mu-cite) +(eval-when-compile (require 'static)) + ;;; @ variables ;;; @@ -60,8 +62,6 @@ (defvar mu-register-history nil) -(eval-when-compile (require 'static)) - (static-when (featurep 'xemacs) (define-obsolete-variable-alias 'mu-cite/registration-file 'mu-registration-file) @@ -81,11 +81,15 @@ (defun mu-cite-load-registration-file () (if (file-readable-p mu-registration-file) (with-temp-buffer - (insert-file-contents-as-coding-system - mu-registration-file-coding-system-for-read - mu-registration-file) + (if mu-registration-file-coding-system-for-read + (insert-file-contents-as-coding-system + mu-registration-file-coding-system-for-read + mu-registration-file) + (insert-file-contents mu-registration-file)) (setq mu-registration-file-coding-system - buffer-file-coding-system) + (static-if (<= emacs-major-version 19) + file-coding-system + buffer-file-coding-system)) (let ((exp (read (current-buffer)))) (or (eq (car (cdr exp)) mu-registration-symbol) (setcar (cdr exp) mu-registration-symbol)) -- 1.7.10.4