Importing Pterodactyl Gnus v0.68.
[elisp/gnus.git-] / lisp / gnus-xmas.el
index b323db1..ea31969 100644 (file)
@@ -181,7 +181,9 @@ displayed, no centering will be performed."
                     (- (window-height) 2)))
           (top (cond ((< height 4) 0)
                      ((< height 7) 1)
-                     (t 2)))
+                     (t (if (numberp gnus-auto-center-summary)
+                            gnus-auto-center-summary
+                          2))))
           (bottom (save-excursion (goto-char (point-max))
                                   (forward-line (- height))
                                   (point)))
@@ -793,7 +795,10 @@ XEmacs compatibility workaround."
     (gnus-splash)))
 
 (defun gnus-xmas-annotation-in-region-p (b e)
-  (map-extents (lambda (e u) t) nil b e nil nil 'mm t))
+  (or (map-extents (lambda (e u) t) nil b e nil nil 'mm t)
+      (if (= b e)
+         (eq (cadr (memq 'gnus-undeletable (text-properties-at b))) t) 
+       (text-property-any b e 'gnus-undeletable t))))
 
 (defun gnus-xmas-mime-button-menu (event)
   "Construct a context-sensitive menu of MIME commands."