(smiley-update-cache): Use general image functions.
(smiley-region): Use general functions.
* gnus-util.el (gnus-graphic-display-p): New function.
* nnmail.el (nnmail-article-group): Allow outputting traces of
non-strings.
* nndoc.el (nndoc-type-alist): Rules for exim bounces.
(nndoc-exim-bounce-type-p): New function.
2002-01-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * smiley-ems.el (smiley-region): Use new function.
+ (smiley-update-cache): Use general image functions.
+ (smiley-region): Use general functions.
+
+ * gnus-util.el (gnus-graphic-display-p): New function.
+
+ * nnmail.el (nnmail-article-group): Allow outputting traces of
+ non-strings.
+
+ * nndoc.el (nndoc-type-alist): Rules for exim bounces.
+ (nndoc-exim-bounce-type-p): New function.
+
+ * message.el (message-dont-send): Doc fix.
+
* gnus-util.el (gnus-completing-read): Remove
inherit-input-method.
(autoload 'gnus-xmas-redefine "gnus-xmas")
(autoload 'appt-select-lowest-window "appt"))
-(if (featurep 'xemacs)
- (autoload 'smiley-region "smiley")
- (autoload 'smiley-region "smiley-ems")) ; override XEmacs version
+(autoload 'smiley-region "smiley-ems")
(defun gnus-kill-all-overlays ()
"Delete all overlays in the current buffer."
history
(car (symbol-value history))))
+(defun gnus-graphic-display-p ()
+ (or (and (fboundp 'display-graphic-p)
+ (display-graphic-p))
+ ;;;!!!This is bogus. Fixme!
+ (and (featurep 'xemacs)
+ t)))
+
(provide 'gnus-util)
;;; gnus-util.el ends here
t)))
(defun message-dont-send ()
- "Don't send the message you have been editing."
+ "Don't send the message you have been editing.
+Instead, just auto-save the buffer and then bury it."
(interactive)
(set-buffer-modified-p t)
(save-buffer)
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
`rfc934', `rfc822-forward', `mime-parts', `standard-digest',
`slack-digest', `clari-briefs', `nsmail', `outlook', `oe-dbx',
-`mailman' or `guess'.")
+`mailman', `exim-bounce', or `guess'.")
(defvoo nndoc-post-type 'mail
"*Whether the nndoc group is `mail' or `post'.")
`((mmdf
(article-begin . "^\^A\^A\^A\^A\n")
(body-end . "^\^A\^A\^A\^A\n"))
+ (exim-bounce
+ (article-begin . "^------ This is a copy of the message, including all the headers. ------\n\n")
+ (body-end-function . nndoc-exim-bounce-body-end-function))
(nsmail
(article-begin . "^From - "))
(news
(insert "From: " "clari@clari.net (" (or from "unknown") ")"
"\nSubject: " (or subject "(no subject)") "\n")))
+(defun nndoc-exim-bounce-type-p ()
+ (and (re-search-forward "^------ This is a copy of the message, including all the headers. ------" nil t)
+ t))
+
+(defun nndoc-exim-bounce-body-end-function ()
+ (goto-char (point-max)))
+
(defun nndoc-mime-digest-type-p ()
(let ((case-fold-search t)
(not (assoc gname nnkiboze-newsrc)) ; It isn't registered
(numberp (car (symbol-value group))) ; It is active
(or (> nnkiboze-level 7)
- (and (setq glevel (nth 1 (nth 2 (gnus-gethash
- gname gnus-newsrc-hashtb))))
+ (and (setq glevel
+ (nth 1 (nth 2 (gnus-gethash
+ gname gnus-newsrc-hashtb))))
(>= nnkiboze-level glevel)))
(not (string-match "^nnkiboze:" gname)) ; Exclude kibozes
(push (cons gname (1- (car (symbol-value group))))
(while newsrc
(if (not (setq active (gnus-gethash
(caar newsrc) gnus-active-hashtb)))
- ;; This group isn't active after all, so we remove it from
+ ;; This group isn't active after all, so we remove it from
;; the list of component groups.
(setq nnkiboze-newsrc (delq (car newsrc) nnkiboze-newsrc))
(setq lowest (cdar newsrc))
(nnheader-set-temp-buffer "*Split Trace*")
(gnus-add-buffer)
(dolist (trace (nreverse nnmail-split-trace))
- (insert trace "\n"))
+ (prin1 trace (current-buffer))
+ (insert "\n"))
(goto-char (point-min))
(gnus-configure-windows 'split-trace)
(set-buffer restore)))
;; A group name. Do the \& and \N subs into the string.
((stringp split)
(when nnmail-split-tracing
- (push (format "\"%s\"" split) nnmail-split-trace))
+ (push split nnmail-split-trace))
(list (nnmail-expand-newtext split)))
;; Junk the message.
(while (and (goto-char end-point)
(re-search-backward (cdr cached-pair) nil t))
(when nnmail-split-tracing
- (push (cdr cached-pair) nnmail-split-trace))
+ (push split nnmail-split-trace))
(let ((split-rest (cddr split))
(end (match-end 0))
;; The searched regexp is \(\(FIELD\).*\)\(VALUE\).
smiley-data-directory)))
(setq file nil)))
(when type
- (let ((image (find-image (list (list :type (intern type)
- :file file
- :ascent 'center)))))
+ (let ((image (gnus-create-image file (intern type) nil
+ :ascent 'center)))
(when image
(push (list (car elt) (cadr elt) image)
smiley-cached-regexp-alist)))))))
"Replace in the region `smiley-regexp-alist' matches with corresponding images.
A list of images is returned."
(interactive "r")
- (when (and (fboundp 'display-graphic-p)
- (display-graphic-p))
- (mapcar (lambda (o)
- (if (eq 'smiley (overlay-get o 'smiley))
- (delete-overlay o)))
- (overlays-in start end))
+ (when (gnus-graphic-display-p)
(unless smiley-cached-regexp-alist
(smiley-update-cache))
(save-excursion
(let ((beg (or start (point-min)))
- group overlay image images)
+ group image images string)
(dolist (entry smiley-cached-regexp-alist)
(setq group (nth 1 entry)
image (nth 2 entry))
(goto-char beg)
(while (re-search-forward (car entry) end t)
+ (setq string (match-string group))
+ (goto-char (match-end group))
+ (delete-region (match-beginning group) (match-end group))
(when image
(push image images)
(gnus-add-wash-type 'smiley)
(gnus-add-image 'smiley image)
- (add-text-properties
- (match-beginning group) (match-end group)
- `(display ,image
- mouse-face highlight
- smiley t
- help-echo "mouse-2: toggle smilies in buffer"
- keymap smiley-mouse-map)))))
+ (gnus-put-image image string))))
images))))
(defun smiley-toggle-buffer (&optional arg)