+(put 'gnus-search-or-regist-spec 'lisp-indent-function 1)
+(defmacro gnus-search-or-regist-spec (mspec &rest body)
+ (let ((specs (nth 0 mspec)) (type (nth 1 mspec)) (format (nth 2 mspec))
+ (spec (nth 3 mspec)) (entry (nth 4 mspec)) (elem (nth 5 mspec)))
+ `(let* ((,entry (assq ,type ,specs))
+ (,elem (assoc ,format (cdr ,entry))))
+ (or (cdr ,elem)
+ (when (progn ,@body)
+ (if ,entry
+ (if ,elem
+ (setcdr ,elem ,spec)
+ (setcdr ,entry (cons (cons ,format ,spec) (cdr ,entry))))
+ (push (list ,type (cons ,format ,spec)) ,specs))
+ (gnus-product-variable-touch (quote ,specs)))
+ ,spec))))
+
+(defun gnus-update-format-specification-1 (type format val)
+ (set (intern (format "gnus-%s-line-format-spec" type))
+ (gnus-search-or-regist-spec (gnus-format-specs-compiled
+ type format val entry elem)
+ (when (and gnus-compile-user-specs val)
+ (setq val (prog1
+ (progn
+ (fset 'gnus-tmp-func `(lambda () ,val))
+ (require 'bytecomp)
+ (let (byte-compile-warnings)
+ (byte-compile 'gnus-tmp-func))
+ (gnus-byte-code 'gnus-tmp-func))
+ (when (get-buffer "*Compile-Log*")
+ (bury-buffer "*Compile-Log*"))
+ (when (get-buffer "*Compile-Log-Show*")
+ (bury-buffer "*Compile-Log-Show*"))))))))
+