1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Update Gnus to No Gnus 0.7 from the Gnus CVS trunk

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-911
This commit is contained in:
Miles Bader 2007-10-28 09:18:39 +00:00
parent ccae01a639
commit 01c52d3165
166 changed files with 27871 additions and 9376 deletions

View file

@ -38,21 +38,17 @@
(defvar gnus-down-mouse-2 [down-mouse-2])
(defvar gnus-widget-button-keymap nil)
(defvar gnus-mode-line-modified
(if (or (featurep 'xemacs)
(< emacs-major-version 20))
(if (featurep 'xemacs)
'("--**-" . "-----")
'("**" "--")))
(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"))
(autoload 'smiley-region "smiley")
;; Fixme: shouldn't require message
(autoload 'message-text-with-property "message")
(defun gnus-kill-all-overlays ()
"Delete all overlays in the current buffer."
@ -72,12 +68,6 @@
(truncate-string-to-width valstr ,max-width)
valstr)))
(eval-and-compile
(defalias 'gnus-char-width
(if (fboundp 'char-width)
'char-width
(lambda (ch) 1)))) ;; A simple hack.
(eval-and-compile
(if (featurep 'xemacs)
(gnus-xmas-define)
@ -149,6 +139,18 @@
gnus-mouse-face-prop gnus-mouse-face)
(insert " " gnus-tmp-subject-or-nil "\n")))))
;; 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)
@ -160,16 +162,6 @@
"Non-nil means the mark and region are currently active in this buffer."
mark-active) ; aliased to region-exists-p in XEmacs.
(if (fboundp 'add-minor-mode)
(defalias 'gnus-add-minor-mode 'add-minor-mode)
(defun gnus-add-minor-mode (mode name map &rest rest)
(set (make-local-variable mode) t)
(unless (assq mode minor-mode-alist)
(push `(,mode ,name) minor-mode-alist))
(unless (assq mode minor-mode-map-alist)
(push (cons mode map)
minor-mode-map-alist))))
(defun gnus-x-splash ()
"Show a splash screen using a pixmap in the current buffer."
(interactive)
@ -289,13 +281,26 @@
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)
"Remove the image matching IMAGE and CATEGORY found first."
(let ((start (point-min))
val end)
(while (and (not end)
(or (setq val (get-text-property start 'display))
(and (setq start
(next-single-property-change start 'display))
(setq val (get-text-property start 'display)))))
(setq end (or (next-single-property-change start 'display)
(point-max)))
(if (and (equal val image)
(equal (get-text-property start '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))))))
(progn
(put-text-property start end 'display nil)
(when (get-text-property start 'gnus-image-text-deletable)
(delete-region start end)))
(unless (= end (point-max))
(setq start end
end nil))))))
(provide 'gnus-ems)