(gnus-adaptive-pretty-print): New variable.
authorReiner Steib <Reiner.Steib@gmx.de>
Fri, 15 Oct 2004 17:18:41 +0000 (17:18 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Fri, 15 Oct 2004 17:18:41 +0000 (17:18 +0000)
(gnus-score-save): Use it.

lisp/ChangeLog
lisp/gnus-score.el

index fccb371..29ccdaf 100644 (file)
@@ -1,5 +1,8 @@
 2004-10-15  Reiner Steib  <Reiner.Steib@gmx.de>
 
+       * gnus-score.el (gnus-adaptive-pretty-print): New variable.
+       (gnus-score-save): Use it.
+
        * message.el (message-bury): Use `window-dedicated-p'.
 
 2004-10-15  Simon Josefsson  <jas@extundo.com>
index e2b33c9..7f5047a 100644 (file)
@@ -306,6 +306,13 @@ If this variable is nil, exact matching will always be used."
   :group 'gnus-score-files
   :type 'regexp)
 
+(defcustom gnus-adaptive-pretty-print nil
+  "If non-nil, adaptive score files fill are pretty printed."
+  :group 'gnus-score-files
+  :group 'gnus-score-adapt
+  :version "22.0" ;; No Gnus
+  :type 'boolean)
+
 (defcustom gnus-score-default-header nil
   "Default header when entering new scores.
 
@@ -1405,12 +1412,13 @@ If FORMAT, also format the current score file."
          (setq score (setcdr entry (gnus-delete-alist 'touched score)))
          (erase-buffer)
          (let (emacs-lisp-mode-hook)
-           (if (string-match
-                (concat (regexp-quote gnus-adaptive-file-suffix) "$")
-                file)
-               ;; This is an adaptive score file, so we do not run
-               ;; it through `pp'.  These files can get huge, and
-               ;; are not meant to be edited by human hands.
+           (if (and (not gnus-adaptive-pretty-print)
+                    (string-match
+                     (concat (regexp-quote gnus-adaptive-file-suffix) "$")
+                     file))
+               ;; This is an adaptive score file, so we do not run it through
+               ;; `pp' unless requested.  These files can get huge, and are
+               ;; not meant to be edited by human hands.
                (gnus-prin1 score)
              ;; This is a normal score file, so we print it very
              ;; prettily.