From: yamaoka Date: Thu, 22 Jul 1999 05:04:28 +0000 (+0000) Subject: (mu-cite-load-registration-file): Use `file-coding-system' instead of X-Git-Tag: mu-cite-8_0~24 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c701f1a9bd3532f1a752b58147d0dc175c0a5b8;p=elisp%2Fmu-cite.git (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. --- 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))