(eval-and-compile
(autoload 'gnus-xmas-define "gnus-xmas")
(autoload 'gnus-xmas-redefine "gnus-xmas")
- (autoload 'appt-select-lowest-window "appt")
(autoload 'gnus-get-buffer-create "gnus")
(autoload 'nnheader-find-etc-directory "nnheader"))
(gnus-truncate-string val (string-width val) ,cut))))))
))
+;; Clone of `appt-select-lowest-window' in appt.el.
+(defun gnus-select-lowest-window ()
+"Select the lowest window on the frame."
+ (let ((lowest-window (selected-window))
+ (bottom-edge (nth 3 (window-edges))))
+ (walk-windows (lambda (w)
+ (let ((next-bottom-edge (nth 3 (window-edges w))))
+ (when (< bottom-edge next-bottom-edge)
+ (setq bottom-edge next-bottom-edge
+ lowest-window w)))))
+ (select-window lowest-window)))
+
(defun gnus-region-active-p ()
"Say whether the region is active."
(and (boundp 'transient-mark-mode)
glyph))
(defun gnus-remove-image (image &optional category)
- (dolist (position (message-text-with-property 'display))
- (when (and (equal (get-text-property position 'display) image)
- (equal (get-text-property position 'gnus-image-category)
- category))
- (put-text-property position (1+ position) 'display nil)
- (when (get-text-property position 'gnus-image-text-deletable)
- (delete-region position (1+ position))))))
+ (let ((regions (message-text-with-property 'display))
+ start end)
+ (while regions
+ (setq start (caar regions)
+ end (cdar regions)
+ regions (cdr regions))
+ (when (and (equal (get-text-property start 'display) image)
+ (equal (get-text-property start 'gnus-image-category)
+ category))
+ (put-text-property start end 'display nil)
+ (when (get-text-property start 'gnus-image-text-deletable)
+ (delete-region start end))))))
(defun-maybe assoc-ignore-case (key alist)
"Like `assoc', but assumes KEY is a string and ignores case when comparing."