+2000-12-22 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lisp/gnus-art.el (article-treat-dumbquotes): Quote backslashes in
+ doc-string.
+
+ * lisp/dgnushack.el
+ (byte-compile-file-form-custom-declare-variable): Use `defvar'
+ instead of `custom-declare-variable' to make the variable
+ uncustomizable if the arguments has the keyword `:version'.
+
2000-12-22 Katsuhiro Hermit Endo <hermit@koka-in.org>
* README.semi.ja: Fix typo.
(put 'custom-declare-group 'byte-optimizer
'byte-optimize-ignore-unsupported-custom-keywords)
(defun byte-optimize-ignore-unsupported-custom-keywords (form)
- (let ((args (nthcdr 4 form)))
- (if (or (memq ':version args)
- (memq ':set-after args))
- (let ((newform (list (car form) (nth 1 form)
- (nth 2 form) (nth 3 form))))
- (while args
- (or (memq (car args) '(:version :set-after))
- (setq newform (nconc newform (list (car args)
- (car (cdr args))))))
- (setq args (cdr (cdr args))))
- newform)
- form)))
+ (if (or (memq ':version (nthcdr 4 form))
+ (memq ':set-after (nthcdr 4 form)))
+ (let ((newform (list (car form) (nth 1 form)
+ (nth 2 form) (nth 3 form)))
+ (args (nthcdr 4 form)))
+ (while args
+ (or (memq (car args) '(:version :set-after))
+ (setq newform (nconc newform (list (car args)
+ (car (cdr args))))))
+ (setq args (cdr (cdr args))))
+ newform)
+ form))
(put 'custom-declare-variable 'byte-hunk-handler
'byte-compile-file-form-custom-declare-variable)
(if (memq 'free-vars byte-compile-warnings)
(setq byte-compile-bound-variables
(cons (nth 1 (nth 1 form)) byte-compile-bound-variables)))
- (byte-optimize-ignore-unsupported-custom-keywords form)))
+ (if (memq ':version (nthcdr 4 form))
+ ;; Make the variable uncustomizable.
+ `(defvar ,(nth 1 (nth 1 form)) ,(nth 1 (nth 2 form))
+ ,(substring (nth 3 form) (if (string-match "^[\t *]+" (nth 3 form))
+ (match-end 0)
+ 0)))
+ ;; Ignore unsupported keyword(s).
+ (if (memq ':set-after (nthcdr 4 form))
+ (let ((newform (list (car form) (nth 1 form)
+ (nth 2 form) (nth 3 form)))
+ (args (nthcdr 4 form)))
+ (while args
+ (or (eq (car args) ':set-after)
+ (setq newform (nconc newform (list (car args)
+ (car (cdr args))))))
+ (setq args (cdr (cdr args))))
+ newform)
+ form))))
;; Unknown variables and functions.
(unless (boundp 'buffer-file-coding-system)
Sm*rtq**t*s are M****s***'s unilateral extension to the character map
in an attempt to provide more quoting characters. If you see
-something like \222 or \264 where you're expecting some kind of
+something like \\222 or \\264 where you're expecting some kind of
apostrophe or quotation mark, then try this wash."
(interactive)
(article-translate-strings gnus-article-dumbquotes-map))