* smiley-ems.el (smiley-region): Use new function.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 20 Jan 2002 18:00:07 +0000 (18:00 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 20 Jan 2002 18:00:07 +0000 (18:00 +0000)
(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.

lisp/ChangeLog
lisp/gnus-ems.el
lisp/gnus-util.el
lisp/message.el
lisp/nndoc.el
lisp/nnkiboze.el
lisp/nnmail.el
lisp/smiley-ems.el

index 3dac606..7e800c2 100644 (file)
@@ -1,5 +1,19 @@
 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.
 
index f3fd5a9..3c19c0e 100644 (file)
@@ -47,9 +47,7 @@
   (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."
index e95aca6..a5cab1f 100644 (file)
@@ -1253,6 +1253,13 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
    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
index 2365e6d..090a505 100644 (file)
@@ -2511,7 +2511,8 @@ The text will also be indented the normal way."
       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)
index 0f73e10..0d8dc43 100644 (file)
@@ -44,7 +44,7 @@
 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'.")
@@ -58,6 +58,9 @@ from the document.")
   `((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
@@ -547,6 +550,13 @@ from the document.")
     (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)
index bc33cf9..9bdfe43 100644 (file)
@@ -266,8 +266,9 @@ Finds out what articles are to be part of the nnkiboze groups."
                (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))))
@@ -281,7 +282,7 @@ Finds out what articles are to be part of the nnkiboze groups."
        (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))
index 334d37f..ca5d36f 100644 (file)
@@ -1075,7 +1075,8 @@ FUNC will be called with the group name to determine the article number."
            (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)))
@@ -1222,7 +1223,7 @@ See the documentation for the variable `nnmail-split-fancy' for documentation."
      ;; 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.
@@ -1261,7 +1262,7 @@ See the documentation for the variable `nnmail-split-fancy' for documentation."
        (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\).
index 1cb263d..294cdd4 100644 (file)
@@ -96,9 +96,8 @@ regexp to replace with IMAGE.  IMAGE is the name of a PBM file in
                                              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)))))))
@@ -115,33 +114,25 @@ regexp to replace with IMAGE.  IMAGE is the name of a PBM file in
   "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)