Commit 4d2226bf authored by Gnus developers's avatar Gnus developers Committed by Katsumi Yamaoka

Merge from Gnus git master

2014-03-14 Katsumi Yamaoka <yamaoka@jpl.org>
 * gnus-sum.el (gnus-summary-toggle-header): Display header attachment
 buttons when toggling the header off.

2014-03-07 Daiki Ueno <ueno@gnu.org>
 * mml2015.el (mml2015-use): Don't check the availability of GnuPG
 commands here; instead, only check if epg-config.el is available.

2014-03-06 Lars Ingebrigtsen <larsi@gnus.org>
 * mml.el (mml-expand-html-into-multipart-related): Allow sending HTML
 messages with embedded images.
 (mml-generate-mime): Don't bug out if you don't have libxml.

2014-03-06 Lars Ingebrigtsen <larsi@gnus.org>
 * message.el (message-make-html-message-with-image-files): New command.

2014-03-05 Lars Ingebrigtsen <larsi@gnus.org>
 * mml.el (mml-insert-mime-headers): Allow `recipient-filename'.

2014-02-23 David Engster <deng@randomsample.de>
 * auth-source.el (auth-source-netrc-saver): Do not depend on `cl-lib'
 to stay compatible with older Emacsen, so replace `cl-loop' with
 `loop'.

2014-02-17 Katsumi Yamaoka <yamaoka@jpl.org>
 * gnus-art.el (gnus-article-prepare, gnus-article-prepare-display):
 Display header attachment buttons by gnus-article-prepare-display
 rather than gnus-article-prepare so as to view in mml-preview as well.

2014-02-10 Katsumi Yamaoka <yamaoka@jpl.org>
 * gnus-art.el (gnus-article-goto-part): Find a button in the body first.
 (gnus-mime-buttonize-attachments-in-header): Number hidden buttons.

2014-02-07 Katsumi Yamaoka <yamaoka@jpl.org>
 * gnus-art.el (gnus-mime-buttonize-attachments-in-header): Display
 buttons that are hidden in unselected alternative part as well.
 (gnus-mime-display-alternative): Redraw attachment buttons in header.
 * gmm-utils.el (gmm-labels): Add edebug spec.

2014-02-07 Lars Ingebrigtsen <larsi@gnus.org>
 * gnus-srvr.el (gnus-server-toggle-cloud-server): New command and
 keystroke.
 (gnus-server-toggle-cloud-server): Only allow clouding applicable
 types.

2014-02-05 Katsumi Yamaoka <yamaoka@jpl.org>
 * gnus.el (gnus-copy-overlay, gnus-overlays-at): New functions.
 * gnus-art.el (gnus-mime-display-attachment-buttons-in-header):
 New user option.
 (gnus-mime-buttonize-attachments-in-header): New function.
 (gnus-article-prepare): Use it.
 (gnus-mime-inline-part): Suppress extra newline.
 (gnus-mm-display-part): Save excursion;
 remove useless deleting and adding of buttons.
 (gnus-insert-mime-button): Allow insertion in the middle of a line.
 * gnus-sum.el (gnus-summary-wash-mime-map, gnus-summary-article-menu):
 Add gnus-mime-buttonize-attachments-in-header.

2014-02-05 Lars Ingebrigtsen <larsi@gnus.org>
 * nnimap.el (nnimap-request-articles): New command to download several
 articles at once.
 * gnus.el (gnus-variable-list): Save Cloud variables.

2014-02-01 Lars Ingebrigtsen <larsi@gnus.org>
 * gnus-cloud.el: New file to provide the Emacs Cloud.
 * gravatar.el (gravatar-retrieve-synchronously): XEmacs also has
 `url-retrieve-synchronously', apparently.
 * gnus-notifications.el (gravatar-retrieve-synchronously): Declare for
 XEmacs.
 * nnrss.el (libxml-parse-html-region): Silence compilation error.

2014-02-01 Daniel Dehennin <daniel.dehennin@baby-gnu.org>
 * gnus-mlspl.el (gnus-group-split-fancy): Use `gnus-parameters' in
 `gnus-group-split-fancy'.

2014-02-01 Lars Ingebrigtsen <larsi@gnus.org>
 * message.el (message-remove-header): Doc fix.
 (message-forward-included-headers): New variable.
 (message-remove-ignored-headers): Use it.

2014-01-31 Dave Abrahams <dave@boostpro.com>
 * gnus-sum.el (gnus-summary-open-group-with-article): New command.

2013-09-04 Rasmus Pank Roulund <emacs@pank.eu>
 * gnus-fun.el (gnus-x-face-omit-files): Regexp to omit matched results
 from random face commands.
 (gnus-face-directory): Like `gnus-x-face-directory` for png files and
 Face.
 (gnus-face-omit-files): Like `gnus-x-face-omit-files` for Face.
 (gnus--random-face-with-type): Generic function returning a face-type
 as a string.
 (gnus--insert-random-face-with-type): Generic function inserting a face
 in a message buffer header.
 (gnus-random-x-face): Rewritten to use `gnus--random-face-with-type`.
 (gnus-insert-random-x-face-header): Rewritten to use
 `gnus--insert-random-face-with-type`.
 (gnus-random-face): Return random (png) Face as string.
 (nus-insert-random-face-header): Insert random (png) Face in a message
 buffer.

2014-01-31 Lars Ingebrigtsen <larsi@gnus.org>
 * mm-url.el: Remove all usage of w3.
 * nnrss.el: Ditto.
 * mm-decode.el: Ditto.
 * mm-view.el: Ditto.
 * gnus-setup.el: Remove outdated file.
parent b029599f
2014-03-23 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-sum.el (gnus-summary-toggle-header): Display header attachment
buttons when toggling the header off.
2014-03-23 Daiki Ueno <ueno@gnu.org>
* mml2015.el (mml2015-use): Don't check the availability of GnuPG
commands here; instead, only check if epg-config.el is available.
2014-03-23 Lars Ingebrigtsen <larsi@gnus.org>
* mml.el (mml-expand-html-into-multipart-related): Allow sending HTML
messages with embedded images.
(mml-generate-mime): Don't bug out if you don't have libxml.
2014-03-23 Lars Ingebrigtsen <larsi@gnus.org>
* message.el (message-make-html-message-with-image-files): New command.
2014-03-23 Lars Ingebrigtsen <larsi@gnus.org>
* mml.el (mml-insert-mime-headers): Allow `recipient-filename'.
2014-03-23 David Engster <deng@randomsample.de>
* auth-source.el (auth-source-netrc-saver): Do not depend on `cl-lib'
to stay compatible with older Emacsen, so replace `cl-loop' with
`loop'.
2014-03-23 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-article-prepare, gnus-article-prepare-display):
Display header attachment buttons by gnus-article-prepare-display
rather than gnus-article-prepare so as to view in mml-preview as well.
2014-03-23 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-article-goto-part): Find a button in the body first.
(gnus-mime-buttonize-attachments-in-header): Number hidden buttons.
2014-03-23 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-mime-buttonize-attachments-in-header): Display
buttons that are hidden in unselected alternative part as well.
(gnus-mime-display-alternative): Redraw attachment buttons in header.
* gmm-utils.el (gmm-labels): Add edebug spec.
2014-03-23 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-srvr.el (gnus-server-toggle-cloud-server): New command and
keystroke.
(gnus-server-toggle-cloud-server): Only allow clouding applicable
types.
2014-03-23 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus.el (gnus-copy-overlay, gnus-overlays-at): New functions.
* gnus-art.el (gnus-mime-display-attachment-buttons-in-header):
New user option.
(gnus-mime-buttonize-attachments-in-header): New function.
(gnus-article-prepare): Use it.
(gnus-mime-inline-part): Suppress extra newline.
(gnus-mm-display-part): Save excursion;
remove useless deleting and adding of buttons.
(gnus-insert-mime-button): Allow insertion in the middle of a line.
* gnus-sum.el (gnus-summary-wash-mime-map, gnus-summary-article-menu):
Add gnus-mime-buttonize-attachments-in-header.
2014-03-23 Lars Ingebrigtsen <larsi@gnus.org>
* nnimap.el (nnimap-request-articles): New command to download several
articles at once.
* gnus.el (gnus-variable-list): Save Cloud variables.
2014-03-23 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-cloud.el: New file to provide the Emacs Cloud.
* gravatar.el (gravatar-retrieve-synchronously): XEmacs also has
`url-retrieve-synchronously', apparently.
* gnus-notifications.el (gravatar-retrieve-synchronously): Declare for
XEmacs.
* nnrss.el (libxml-parse-html-region): Silence compilation error.
2014-03-23 Daniel Dehennin <daniel.dehennin@baby-gnu.org>
* gnus-mlspl.el (gnus-group-split-fancy): Use `gnus-parameters' in
`gnus-group-split-fancy'.
2014-03-23 Lars Ingebrigtsen <larsi@gnus.org>
* message.el (message-remove-header): Doc fix.
(message-forward-included-headers): New variable.
(message-remove-ignored-headers): Use it.
2014-03-23 Dave Abrahams <dave@boostpro.com>
* gnus-sum.el (gnus-summary-open-group-with-article): New command.
2014-03-23 Rasmus Pank Roulund <emacs@pank.eu>
* gnus-fun.el (gnus-x-face-omit-files): Regexp to omit matched results
from random face commands.
(gnus-face-directory): Like `gnus-x-face-directory` for png files and
Face.
(gnus-face-omit-files): Like `gnus-x-face-omit-files` for Face.
(gnus--random-face-with-type): Generic function returning a face-type
as a string.
(gnus--insert-random-face-with-type): Generic function inserting a face
in a message buffer header.
(gnus-random-x-face): Rewritten to use `gnus--random-face-with-type`.
(gnus-insert-random-x-face-header): Rewritten to use
`gnus--insert-random-face-with-type`.
(gnus-random-face): Return random (png) Face as string.
(nus-insert-random-face-header): Insert random (png) Face in a message
buffer.
2014-03-23 Lars Ingebrigtsen <larsi@gnus.org>
* mm-url.el: Remove all usage of w3.
* nnrss.el: Ditto.
* mm-decode.el: Ditto.
* mm-view.el: Ditto.
* gnus-setup.el: Remove outdated file.
2014-03-07 Lars Ingebrigtsen <larsi@gnus.org>
* nnimap.el (nnimap-request-accept-article): Make respooling to nnimap
......
......@@ -1524,10 +1524,10 @@ list, it matches the original pattern."
(heads (if (stringp value)
(list (list key value))
(mapcar (lambda (v) (list key v)) value))))
(cl-loop
(loop
for h in heads
nconc
(cl-loop
(loop
for tl in tails
collect (append h tl))))))
......
......@@ -441,6 +441,7 @@ rather than relying on `lexical-binding'.
`(,(progn (require 'cl) (if (fboundp 'cl-labels) 'cl-labels 'labels))
,bindings ,@body))
(put 'gmm-labels 'lisp-indent-function 1)
(put 'gmm-labels 'edebug-form-spec '((&rest (sexp sexp &rest form)) &rest form))
(provide 'gmm-utils)
......
......@@ -24,9 +24,6 @@
;;; Code:
;; For Emacs <22.2 and XEmacs.
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile
(require 'cl))
(defvar tool-bar-map)
......@@ -4728,7 +4725,10 @@ If ALL-HEADERS is non-nil, no headers are hidden."
gnus-article-image-alist nil)
(gnus-run-hooks 'gnus-tmp-internal-hook)
(when gnus-display-mime-function
(funcall gnus-display-mime-function))))
(funcall gnus-display-mime-function))
;; Add attachment buttons to the header.
(when gnus-mime-display-attachment-buttons-in-header
(gnus-mime-buttonize-attachments-in-header))))
;;;
;;; Gnus Sticky Article Mode
......@@ -5331,7 +5331,7 @@ Compressed files like .gz and .bz2 are decompressed."
(mm-read-coding-system "Charset: "))))
((mm-handle-undisplayer handle)
(mm-remove-part handle)))
(forward-line 2)
(forward-line 1)
(mm-display-inline handle)
(goto-char b)))))
......@@ -5656,33 +5656,32 @@ all parts."
(if (mm-handle-displayed-p handle)
;; This will remove the part.
(mm-display-part handle)
(save-restriction
(narrow-to-region (point)
(if (eobp) (point) (1+ (point))))
(gnus-bind-safe-url-regexp (mm-display-part handle))
;; We narrow to the part itself and
;; then call the treatment functions.
(goto-char (point-min))
(forward-line 1)
(narrow-to-region (point) (point-max))
(gnus-treat-article
nil id
(gnus-article-mime-total-parts)
(mm-handle-media-type handle)))))
(save-window-excursion
(save-restriction
(narrow-to-region (point)
(if (eobp) (point) (1+ (point))))
(gnus-bind-safe-url-regexp (mm-display-part handle))
;; We narrow to the part itself and
;; then call the treatment functions.
(goto-char (point-min))
(forward-line 1)
(narrow-to-region (point) (point-max))
(gnus-treat-article
nil id
(gnus-article-mime-total-parts)
(mm-handle-media-type handle))))))
(if (window-live-p window)
(select-window window)))))
(goto-char point)
(gnus-delete-line)
(gnus-insert-mime-button
handle id (list (mm-handle-displayed-p handle)))
(goto-char point))))
(select-window window))))))))
(defun gnus-article-goto-part (n)
"Go to MIME part N."
(when gnus-break-pages
(widen))
(article-goto-body)
(prog1
(let ((start (text-property-any (point-min) (point-max) 'gnus-part n))
(let ((start (or (text-property-any (point) (point-max) 'gnus-part n)
;; There may be header buttons.
(text-property-any (point-min) (point) 'gnus-part n)))
part handle end next handles)
(when start
(goto-char start)
......@@ -5736,8 +5735,6 @@ all parts."
(concat "; " gnus-tmp-name))))
(unless (equal gnus-tmp-description "")
(setq gnus-tmp-type-long (concat " --- " gnus-tmp-type-long)))
(unless (bolp)
(insert "\n"))
(setq b (point))
(gnus-eval-format
gnus-mime-button-line-format gnus-mime-button-line-format-alist
......@@ -5862,6 +5859,16 @@ If displaying \"text/html\" is discouraged \(see
:group 'gnus-article-mime
:type 'boolean)
(defcustom gnus-mime-display-attachment-buttons-in-header t
"Add attachment buttons in the end of the header of an article.
Since MIME attachments tend to be put at the end of an article, we may
overlook them if there is a huge body. This option offers you a copy
of all non-inlinable MIME parts as buttons shown in front of an article.
If nil, don't show those extra buttons."
:version "24.5"
:group 'gnus-article
:type 'boolean)
(defun gnus-mime-display-part (handle)
(cond
;; Maybe a broken MIME message.
......@@ -5884,14 +5891,6 @@ If displaying \"text/html\" is discouraged \(see
((and (equal (car handle) "multipart/related")
(not (or gnus-mime-display-multipart-as-mixed
gnus-mime-display-multipart-related-as-mixed)))
;;;!!!We should find the start part, but we just default
;;;!!!to the first part.
;;(gnus-mime-display-part (cadr handle))
;;;!!! Most multipart/related is an HTML message plus images.
;;;!!! Unfortunately we are unable to let W3 display those
;;;!!! included images, so we just display it as a mixed multipart.
;;(gnus-mime-display-mixed (cdr handle))
;;;!!! No, w3 can display everything just fine.
(gnus-mime-display-part (cadr handle)))
((equal (car handle) "multipart/signed")
(gnus-add-wash-type 'signed)
......@@ -6110,7 +6109,10 @@ If displaying \"text/html\" is discouraged \(see
(goto-char (point-max))
(setcdr begend (point-marker)))))
(when ibegend
(goto-char point))))
(goto-char point)))
;; Redraw attachment buttons in the header.
(when gnus-mime-display-attachment-buttons-in-header
(gnus-mime-buttonize-attachments-in-header)))
(defconst gnus-article-wash-status-strings
(let ((alist '((cite "c" "Possible hidden citation text"
......@@ -6216,6 +6218,104 @@ Provided for backwards compatibility."
(when image
(gnus-add-image 'shr image))))
(defun gnus-mime-buttonize-attachments-in-header (&optional interactive)
"Show attachments as buttons in the end of the header of an article.
This function toggles the display when called interactively. Note that
buttons to be added to the header are only the ones that aren't inlined
in the body. Use `gnus-header-face-alist' to highlight buttons."
(interactive (list t))
(gnus-with-article-buffer
(gmm-labels
;; Function that returns a flattened version of
;; `gnus-article-mime-handle-alist'.
((flattened-alist
(&optional alist id all)
(if alist
(let ((i 1) newid flat)
(dolist (handle alist flat)
(setq newid (append id (list i))
i (1+ i))
(if (stringp (car handle))
(setq flat (nconc flat (flattened-alist (cdr handle)
newid all)))
(delq (rassq handle all) all)
(setq flat (nconc flat (list (cons newid handle)))))))
(let ((flat (list nil)))
;; Assume that elements of `gnus-article-mime-handle-alist'
;; are in the decreasing order, but unnumbered subsidiaries
;; in each element are in the increasing order.
(dolist (handle (reverse gnus-article-mime-handle-alist))
(if (stringp (cadr handle))
(setq flat (nconc flat (flattened-alist (cddr handle)
(list (car handle))
flat)))
(delq (rassq (cdr handle) flat) flat)
(setq flat (nconc flat (list (cons (list (car handle))
(cdr handle)))))))
(setq flat (cdr flat))
(mapc (lambda (handle)
(if (cdar handle)
;; This is a hidden (i.e. unnumbered) handle.
(progn
(setcar handle
(1+ (caar gnus-article-mime-handle-alist)))
(push handle gnus-article-mime-handle-alist))
(setcar handle (caar handle))))
flat)
flat))))
(let ((case-fold-search t) buttons st)
(save-excursion
(save-restriction
(widen)
(article-narrow-to-head)
;; Header buttons exist?
(while (and (not buttons)
(re-search-forward "^attachments?:[\n ]+" nil t))
(when (get-char-property (match-end 0)
'gnus-button-attachment-extra)
(setq buttons (match-beginning 0))))
(widen)
(when buttons
;; Delete header buttons.
(delete-region buttons (if (re-search-forward "^[^ ]" nil t)
(match-beginning 0)
(point-max))))
(unless (and interactive buttons)
;; Find buttons.
(setq buttons nil)
(dolist (handle (flattened-alist))
(when (and (not (stringp (cadr handle)))
(or (equal (car (mm-handle-disposition
(cdr handle)))
"attachment")
(not (and (mm-inlinable-p (cdr handle))
(mm-inlined-p (cdr handle))))))
(push handle buttons)))
(when buttons
;; Add header buttons.
(article-goto-body)
(forward-line -1)
(narrow-to-region (point) (point))
(insert "Attachment" (if (cdr buttons) "s" "") ":")
(dolist (button (nreverse buttons))
(setq st (point))
(insert " ")
(gnus-insert-mime-button (cdr button) (car button))
(skip-chars-backward "\t\n ")
(delete-region (point) (point-max))
(when (> (current-column) (window-width))
(goto-char st)
(insert "\n")
(end-of-line)))
(insert "\n")
(dolist (ovl (gnus-overlays-in (point-min) (point)))
(gnus-overlay-put ovl 'gnus-button-attachment-extra t)
(gnus-overlay-put ovl 'face nil))
(let ((gnus-treatment-function-alist
'((gnus-treat-highlight-headers
gnus-article-highlight-headers))))
(gnus-treat-article 'head))))))))))
;;; Article savers.
(defun gnus-output-to-file (file-name)
......
......@@ -24,10 +24,6 @@
;;; Code:
;; For Emacs <22.2 and XEmacs.
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile (require 'cl))
(require 'gnus)
......
......@@ -24,10 +24,6 @@
;;; Code:
;; For Emacs <22.2 and XEmacs.
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile
(require 'cl))
......@@ -44,6 +40,24 @@
:group 'gnus-fun
:type 'directory)
(defcustom gnus-x-face-omit-files nil
"Regexp to match faces in `gnus-x-face-directory' to be omitted."
:version "24.5"
:group 'gnus-fun
:type 'string)
(defcustom gnus-face-directory (expand-file-name "faces" gnus-directory)
"*Directory where Face PNG files are stored."
:version "24.5"
:group 'gnus-fun
:type 'directory)
(defcustom gnus-face-omit-files nil
"Regexp to match faces in `gnus-face-directory' to be omitted."
:version "24.5"
:group 'gnus-fun
:type 'string)
(defcustom gnus-convert-pbm-to-x-face-command "pbmtoxbm %s | compface"
"Command for converting a PBM to an X-Face."
:version "22.1"
......@@ -86,35 +100,57 @@ PNG format."
nil shell-command-switch command)))
;;;###autoload
(defun gnus-random-x-face ()
"Return X-Face header data chosen randomly from `gnus-x-face-directory'."
(interactive)
(when (file-exists-p gnus-x-face-directory)
(let* ((files (directory-files gnus-x-face-directory t "\\.pbm$"))
(file (nth (random (length files)) files)))
(defun gnus--random-face-with-type (dir ext omit fun)
"Return file from DIR with extension EXT, omitting matches of OMIT, processed by FUN."
(when (file-exists-p dir)
(let* ((files
(remove nil (mapcar
(lambda (f) (unless (string-match (or omit "^$") f) f))
(directory-files dir t ext))))
(file (nth (random (length files)) files)))
(when file
(gnus-shell-command-to-string
(format gnus-convert-pbm-to-x-face-command
(shell-quote-argument file)))))))
(funcall fun file)))))
;;;###autoload
(autoload 'message-goto-eoh "message" nil t)
(autoload 'message-insert-header "message" nil t)
(defun gnus--insert-random-face-with-type (fun type)
"Get a random face using FUN and insert it as a header TYPE.
For instance, to insert an X-Face use `gnus-random-x-face' as FUN
and \"X-Face\" as TYPE."
(let ((data (funcall fun)))
(save-excursion
(if data
(progn (message-goto-eoh)
(insert type ": " data "\n"))
(message
"No face returned by the function %s." (symbol-name fun))))))
;;;###autoload
(defun gnus-random-x-face ()
"Return X-Face header data chosen randomly from `gnus-x-face-directory'.
Files matching `gnus-x-face-omit-files' are not considered."
(interactive)
(gnus--random-face-with-type gnus-x-face-directory "\\.pbm$" gnus-x-face-omit-files
(lambda (file)
(gnus-shell-command-to-string
(format gnus-convert-pbm-to-x-face-command
(shell-quote-argument file))))))
;;;###autoload
(defun gnus-insert-random-x-face-header ()
"Insert a random X-Face header from `gnus-x-face-directory'."
(interactive)
(let ((data (gnus-random-x-face)))
(save-excursion
(message-goto-eoh)
(if data
(insert "X-Face: " data)
(message
"No face returned by `gnus-random-x-face'. Does %s/*.pbm exist?"
gnus-x-face-directory)))))
(gnus--insert-random-face-with-type 'gnus-random-x-face 'X-Face))
;;;###autoload
(defun gnus-x-face-from-file (file)
"Insert an X-Face header based on an image file.
"Insert an X-Face header based on an image FILE.
Depending on `gnus-convert-image-to-x-face-command' it may accept
different input formats."
......@@ -126,7 +162,7 @@ different input formats."
;;;###autoload
(defun gnus-face-from-file (file)
"Return a Face header based on an image file.
"Return a Face header based on an image FILE.
Depending on `gnus-convert-image-to-face-command' it may accept
different input formats."
......@@ -191,6 +227,21 @@ FILE should be a PNG file that's 48x48 and smaller than or equal to
(buffer-size)))
(gnus-face-encode)))
;;;###autoload
(defun gnus-random-face ()
"Return randomly chosen Face from `gnus-face-directory'.
Files matching `gnus-face-omit-files' are not considered."
(interactive)
(gnus--random-face-with-type gnus-face-directory "\\.png$"
gnus-face-omit-files
'gnus-convert-png-to-face))
;;;###autoload
(defun gnus-insert-random-face-header ()
"Insert a randome Face header from `gnus-face-directory'."
(gnus--insert-random-face-with-type 'gnus-random-face 'Face))
(defface gnus-x-face '((t (:foreground "black" :background "white")))
"Face to show X-Face.
The colors from this face are used as the foreground and background
......
......@@ -24,10 +24,6 @@
;;; Code:
;; For Emacs <22.2 and XEmacs.
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile
(require 'cl))
(defvar tool-bar-mode)
......
......@@ -28,10 +28,6 @@
;;; Code:
;; For Emacs <22.2 and XEmacs.
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile (require 'cl))
(require 'gnus-art)
......
......@@ -146,20 +146,27 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns:
(any \"\\\\(foo@nowhere\\\\.gov\\\\|foo@localhost\\\\|foo-redist@home\\\\)\"
- \"bugs-foo\" - \"rambling-foo\" \"mail.foo\"))
\"mail.others\")"
(let* ((newsrc (cdr gnus-newsrc-alist))
split)
(dolist (info newsrc)
(let ((group (gnus-info-group info))
(params (gnus-info-params info)))
;; For all GROUPs that match the specified GROUPS
(when (or (not groups)
(and (listp groups)
(memq group groups))
(and (stringp groups)
(string-match groups group)))
(let ((split-spec (assoc 'split-spec params)) group-clean)
;; Remove backend from group name
(setq group-clean (string-match ":" group))
(let ((group-names (if (and (listp groups)
(not (null groups)))
groups
(delete-dups
(delq nil
(mapcar
(lambda (info)
(let ((group (gnus-info-group info)))
(if (or (not groups)
(and (stringp groups)
(string-match groups group)))
group)))
(append gnus-newsrc-alist gnus-parameters))))))
split)
(dolist (group group-names)
(let ((params (gnus-group-find-parameter group)))
;; Skip groups without param (or nonexistent)
(when (not (null params))
(let ((split-spec (assoc 'split-spec params)) group-clean)
;; Remove backend from group name
(setq group-clean (string-match ":" group))
(setq group-clean
(if group-clean
(substring group (1+ group-clean))
......
......@@ -102,6 +102,9 @@ Return a notification id if any, or t on success."
;; Don't return an id
t))
(declare-function gravatar-retrieve-synchronously "gravatar.el"
(mail-address))
(defun gnus-notifications-get-photo (mail-address)
"Get photo for mail address."
(let ((google-photo (when (and gnus-notifications-use-google-contacts
......
......@@ -37,10 +37,6 @@
;;
;;; Code:
;; For Emacs <22.2 and XEmacs.
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile (require 'cl))
(require 'gnus)
......
;;; gnus-setup.el --- Initialization & Setup for Gnus 5
;; Copyright (C) 1995-1996, 2000-2014 Free Software Foundation, Inc.
;; Author: Steven L. Baur <steve@miranova.com>
;; Keywords: news
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or