+2002-01-11 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lisp/gnus.el (gnus-product-variable-file-list): Add a check for
+ the value of `gnus-use-correct-string-widths' in the forms.
+
+ * lisp/gnus-start.el (gnus-product-quick-file-format): Include the
+ value of `gnus-use-correct-string-widths' in the file form.
+ (gnus-product-read-variable-file-1): Check for the equality in the
+ value of `gnus-use-correct-string-widths' as well.
+
2002-01-10 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus-vers.el (gnus-revision-number): Increment to 01 in
(defun gnus-product-read-variable-file-1 (file checking-methods coding
&rest variables)
(let (error gnus-product-file-version method file-ver)
- (when (or
- (condition-case err
- (let ((coding-system-for-read coding)
- (input-coding-system coding))
- (load (expand-file-name file gnus-product-directory) t nil t)
- nil)
- (error
- (message "%s" err)
- (setq error t)))
- (and (assq 'emacs-version checking-methods)
- (not (string= emacs-version
+ (when (or (condition-case err
+ (let ((coding-system-for-read coding)
+ (input-coding-system coding))
+ (load (expand-file-name file gnus-product-directory)
+ nil nil t)
+ nil)
+ (error
+ (message "Error while reading %s: %s"
+ (expand-file-name file gnus-product-directory)
+ (error-message-string err))
+ (setq error t)))
+ (and (setq method (assq 'product-version checking-methods))
+ (not (and (setq file-ver
+ (cdr (assq 'product-version
+ gnus-product-file-version)))
+ (zerop (product-version-compare file-ver
+ (cadr method))))))
+ (and (assq 'emacs-version checking-methods)
+ (not (and (assq 'emacs-version gnus-product-file-version)
+ (string-equal
+ emacs-version
(cdr (assq 'emacs-version
- gnus-product-file-version)))))
- (and (setq method (assq 'product-version checking-methods))
- (or (not (setq file-ver
- (cdr (assq 'product-version
- gnus-product-file-version))))
- (< (product-version-compare file-ver (cadr method)) 0))))
+ gnus-product-file-version))))))
+ (and (assq 'correct-string-widths checking-methods)
+ (not (and (assq 'correct-string-widths
+ gnus-product-file-version)
+ (eq (and gnus-use-correct-string-widths t)
+ (and (cdr (assq 'correct-string-widths
+ gnus-product-file-version))
+ t))))))
(unless error
(message "\"%s\" seems to have mismatched contents, updating..."
file))
"Insert gnus product depend variables in lisp format."
(let ((print-quoted t)
(print-escape-newlines t)
- variable param)
+ print-length print-level variable param)
(insert (format ";; -*- Mode: emacs-lisp; coding: %s -*-\n" coding))
(insert (format ";; %s startup file.\n" (product-name product)))
(when (setq param (cdr (assq 'product-version checking-methods)))
(insert "(setq gnus-product-file-version \n"
" '((product-version . "
(prin1-to-string (product-version product)) ")\n"
- "\t(emacs-version . " (prin1-to-string emacs-version) ")))\n")
+ "\t(emacs-version . "
+ (prin1-to-string emacs-version) ")\n"
+ "\t(correct-string-widths . "
+ (if gnus-use-correct-string-widths "t" "nil")
+ ")))\n")
(while variables
(when (and (boundp (setq variable (pop variables)))
(symbol-value variable))
(defvar gnus-product-variable-file-list
(let ((version (product-version (product-find 'gnus-vers)))
(codesys (static-if (boundp 'MULE) '*ctext* 'ctext)))
- `(("strict-cache" ((product-version ,version) (emacs-version))
+ `(("strict-cache"
+ ((product-version ,version)
+ (emacs-version)
+ (correct-string-widths))
binary
gnus-format-specs-compiled)
- ("cache" ((product-version ,version) (emacs-version))
+ ("cache"
+ ((product-version ,version)
+ (emacs-version)
+ (correct-string-widths))
,codesys
gnus-format-specs)))
- "Gnus variables are saved in the produce depend quick startup files.")
+ "Alist of the methods for checking whether the contents of the T-gnus
+quick startup files are valid. One is for the byte-compiled format
+specifications, the other is for the source form. Each element should
+be a list which looks like follows:
+
+\(\"FILE_NAME\"
+ ((VARIABLE EXPECTED_VALUE_or_NIL)
+ (VARIABLE EXPECTED_VALUE_or_NIL)
+ ...)
+ CODING-SYSTEM_FOR_READING_FILE
+ SYMBOL_OF_FORMAT_SPECS)")
(defcustom gnus-compile-user-specs t
"If non-nil, the user-defined format specs will be byte-compiled