From: yamaoka Date: Thu, 2 Mar 2006 22:08:14 +0000 (+0000) Subject: Synch to No Gnus 200603022104. X-Git-Tag: t-gnus-6_17_4-quimby-~61 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58fcffd9f6fd916da73b457b70d815848442cd60;p=elisp%2Fgnus.git- Synch to No Gnus 200603022104. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 56ff6d0..96c62b0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,36 @@ +2006-03-02 Reiner Steib + + * gnus-art.el (gnus-article-browse-html-temp-list): Rename from + gnus-article-browse-html-temp. + (gnus-article-browse-delete-temp): Make it customizable. Add + `file'. Adjust doc string. + (gnus-article-browse-delete-temp-files): Add argument. Allow + query for each file. Adjust doc string. + (gnus-article-browse-html-parts): Add + `gnus-article-browse-delete-temp-files' to + `gnus-summary-prepare-exit-hook' and `gnus-exit-gnus-hook'. + +2006-03-02 Hynek Schlawack + + * gnus-art.el (gnus-article-browse-html-temp) + (gnus-article-browse-delete-temp): New variables. + (gnus-article-browse-delete-temp-files): New function. + (gnus-article-browse-html-parts): Use it. + +2006-03-02 Reiner Steib + + * gnus-group.el (gnus-group-redraw-check): Remove redundant tests. + + * gmm-utils.el (gmm-image-load-path): Mention ../etc search in doc + string. + + * gnus-sum.el (gnus-summary-tool-bar-gnome): Don't use + gnus-summary-insert-new-articles when unplugged. Remove + gnus-summary-search-article-forward. + + * gmm-utils.el (gmm-tool-bar-style): Test tool-bar-mode and + display-visual-class instead of display-color-cells. + 2006-03-02 Katsumi Yamaoka * dgnushack.el: Autoload customize-group for XEmacs. diff --git a/lisp/gmm-utils.el b/lisp/gmm-utils.el index 03e416e..b0b25d1 100644 --- a/lisp/gmm-utils.el +++ b/lisp/gmm-utils.el @@ -176,9 +176,30 @@ This is copy of the `lazy' widget in Emacs 22.1 provided for compatibility." :tag "Other" (symbol :tag "Icon item"))))) -(defcustom gmm-tool-bar-style (if (> (display-color-cells) 256) - 'gnome - 'retro) +;; (defun gmm-color-cells (&optional display) +;; "Return the number of color cells supported by DISPLAY. +;; Compatibility function." +;; ;; `display-color-cells' doesn't return more than 256 even if color depth is +;; ;; > 8 in Emacs 21. +;; ;; +;; ;; Feel free to add proper XEmacs support. +;; (let* ((cells (and (fboundp 'display-color-cells) +;; (display-color-cells display))) +;; (plane (and (fboundp 'x-display-planes) +;; (ash 1 (x-display-planes)))) +;; (none -1)) +;; (max (if (integerp cells) cells none) +;; (if (integerp plane) plane none)))) + +(defcustom gmm-tool-bar-style + (if (and (boundp 'tool-bar-mode) + tool-bar-mode + (and (fboundp 'display-visual-class) + (not (memq (display-visual-class) + (list 'static-gray 'gray-scale + 'static-color 'pseudo-color))))) + 'gnome + 'retro) "Prefered tool bar style." :type '(choice (const :tag "GNOME style" 'gnome) (const :tag "Retro look" 'retro)) @@ -284,9 +305,9 @@ See the function `gmm-image-load-path'.") (defun gmm-image-load-path (library image &optional path) "Return a suitable search path for images of LIBRARY. -Images for LIBRARY are found in \"../../etc/images\" relative to -the files in \"lisp/LIBRARY\", in `image-load-path', or in -`load-path'. +Images for LIBRARY are searched for in \"../../etc/images\" and +\"../etc/images\" relative to the files in \"lisp/LIBRARY\", in +`image-load-path', or in `load-path'. This function returns value of `load-path' augmented with the path to IMAGE. If PATH is given, it is used instead of @@ -348,7 +369,6 @@ path to IMAGE. If PATH is given, it is used instead of (delete gmm-image-directory (copy-sequence load-path)))))) - (defun gmm-customize-mode (&optional mode) "Customize customization group for MODE. If mode is nil, use `major-mode' of the curent buffer." diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index fd6cade..9bcad71 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2721,6 +2721,45 @@ charset defined in `gnus-summary-show-article-charset-alist' is used." "-I" (symbol-name charset) "-O" (symbol-name charset)))) (mm-inline-wash-with-stdin nil "w3m" "-dump" "-T" "text/html"))) +(defvar gnus-article-browse-html-temp-list nil + "List of temporary files created by `gnus-article-browse-html-parts'. +Internal variable.") + +(defcustom gnus-article-browse-delete-temp 'ask + "What to do with temporary files from `gnus-article-browse-html-parts'. +If nil, don't delete temporary files. If it is t, delete them on +exit from the summary buffer. If it is the symbol `file', query +on each file, if it is `ask' ask once when exiting from the +summary buffer." + :group 'gnus-article + :type '(choice (const :tag "Don't delete" nil) + (const :tag "Don't ask" t) + (const :tag "Ask" ask) + (const :tag "Ask for each file" file))) + +(defun gnus-article-browse-delete-temp-files (&optional how) + "Delete temp-files created by `gnus-article-browse-html-parts'." + (unless how + (setq how gnus-article-browse-delete-temp)) + (when (and gnus-article-browse-html-temp-list how) + (when (and (eq how 'ask) + (y-or-n-p (format + "Delete all %s temporary HTML file(s)? " + (length gnus-article-browse-html-temp-list))) + (setq how t))) + (dolist (file gnus-article-browse-html-temp-list) + (when (and (file-exists-p file) + (or (eq how t) + ;; `how' is neither `nil', `ask' nor `t' (i.e. `file'): + (gnus-y-or-n-p + (format "Delete temporary HTML file `%s'? " file)))) + (delete-file file)) + ;; Also remove file from the list when not deleted or if file doesn't + ;; exist anymore. + (setq gnus-article-browse-html-temp-list + (delete file gnus-article-browse-html-temp-list)))) + gnus-article-browse-html-temp-list) + (defun gnus-article-browse-html-parts (list) "View all \"text/html\" parts from LIST. Recurse into multiparts." @@ -2736,6 +2775,12 @@ Recurse into multiparts." ;; Do we need to care for 8.3 filenames? "mm-" nil ".html"))) (mm-save-part-to-file handle tmp-file) + (add-to-list 'gnus-article-browse-html-temp-list tmp-file) + (add-hook 'gnus-summary-prepare-exit-hook + 'gnus-article-browse-delete-temp-files) + (add-hook 'gnus-exit-gnus-hook + (lambda () + (gnus-article-browse-delete-temp-files t))) (browse-url tmp-file) (setq showed t))) ;; If multipart, recurse @@ -2746,7 +2791,7 @@ Recurse into multiparts." (gnus-article-browse-html-parts handle)))))))) showed)) -;; TODO: Key binding; Remove temp files. +;; TODO: Key binding (defun gnus-article-browse-html-article () "View \"text/html\" parts of the current article with a WWW browser." (interactive) diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index aa42b83..c8f149a 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -1009,24 +1009,18 @@ simple manner.") (defvar gnus-group-tool-bar-map nil) -;; Work around for Emacs not updating the tool bar, see +;; Work around for Emacs not updating the tool bar automatically, see ; http://www.google.com/groups?as_umsgid=v9u0an3hti.fsf@marauder.physik.uni-ulm.de +;; Don't make this customizable yet. (defvar gnus-group-redraw-when-idle 2 "When non-nil, redraw the Group buffer frame when idle. Internal variable.") -;; Don't make this customizable yet. (defun gnus-group-redraw-check () "Check if we need to redraw the frame." - (when (and gnus-group-redraw-when-idle - (not (featurep 'xemacs)) - (boundp 'tool-bar-mode) - tool-bar-mode) - ;;(run-with-idle-timer gnus-group-redraw-when-idle - ;; nil 'redraw-frame (selected-frame)) + (when gnus-group-redraw-when-idle (run-with-idle-timer gnus-group-redraw-when-idle - nil 'force-window-update) - t)) + nil 'force-window-update))) (defun gnus-group-tool-bar-update (&optional symbol value) "Update group buffer toolbar. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 7ab3259..e88b214 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2653,15 +2653,16 @@ Pre-defined symbols include `gnus-summary-tool-bar-gnome' and (defcustom gnus-summary-tool-bar-gnome '((gnus-summary-post-news "mail/compose" nil) - (gnus-summary-insert-new-articles "mail/inbox") - ;; + (gnus-summary-insert-new-articles "mail/inbox" nil + :visible (or (not gnus-agent) + gnus-plugged)) (gnus-summary-reply-with-original "mail/reply") (gnus-summary-reply "mail/reply" nil :visible nil) (gnus-summary-followup-with-original "mail/reply-all") (gnus-summary-followup "mail/reply-all" nil :visible nil) (gnus-summary-mail-forward "mail/forward") (gnus-summary-save-article "mail/save") - (gnus-summary-search-article-forward "search") + (gnus-summary-search-article-forward "search" nil :visible nil) (gnus-summary-print-article "print") (gnus-summary-tick-article-forward "flag-followup" nil :visible nil) ;; Some new commands that may need more suitable icons: