unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ken Olum <kdo@cosmos.phy.tufts.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 17560@debbugs.gnu.org
Subject: bug#17560: 24.4.50; wrong type argument if rmail-delete-after-output set
Date: Fri, 23 May 2014 14:48:25 -0400	[thread overview]
Message-ID: <q52zji8jpqe.fsf@cosmos.phy.tufts.edu> (raw)
In-Reply-To: <83k39cl7kj.fsf@gnu.org> (message from Eli Zaretskii on Fri, 23 May 2014 20:37:48 +0300)

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

OK.  Here is a patch, including NEWS and ChangeLog entries.  I made the
argument to rmail-delete-forward not optional, and fixed callers.

                                        Ken


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rmail-delete.patch --]
[-- Type: text/x-diff, Size: 3107 bytes --]

=== modified file 'etc/NEWS'
--- etc/NEWS	2014-05-17 08:11:31 +0000
+++ etc/NEWS	2014-05-23 18:14:27 +0000
@@ -130,6 +130,9 @@
 
 ** You can access the slots of structures using `cl-struct-slot-value'.
 
+** Functions `rmail-delete-forward' and `rmail-delete-backward' take a
+repeat-count argument.
+
 \f
 * Changes in Emacs 24.5 on Non-Free Operating Systems
 

=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2014-05-23 15:54:44 +0000
+++ lisp/ChangeLog	2014-05-23 18:26:24 +0000
@@ -1,3 +1,12 @@
+2014-05-23  Ken Olum  <kdo@cosmos.phy.tufts.edu>
+
+	* mail/rmail.el: (rmail-delete-forward) make `count' arg not optional.
+	(rmail-auto-file):
+	* mail/rmailout.el: (rmail-output, rmail-output-as-seen)
+	(rmail-output-body-to-file): 
+	* mail/rmailout.el: (undigestify-rmail-message):
+	Supply `count' arg to rmail-delete-forward.
+
 2014-05-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* minibuffer.el (completion--sreverse): Remove.

=== modified file 'lisp/mail/rmail.el'
--- lisp/mail/rmail.el	2014-05-05 01:08:54 +0000
+++ lisp/mail/rmail.el	2014-05-23 18:22:56 +0000
@@ -3078,7 +3078,7 @@
 	;; If there are no directives left, then it was a complete match.
 	(if (null directive-loop)
 	    (if (null folder)
-		(rmail-delete-forward)
+		(rmail-delete-forward 1)
 	      (if (string= "/dev/null" folder)
 		  (rmail-delete-message)
 		(rmail-output folder 1)
@@ -3474,7 +3474,7 @@
 		(rmail-summary-mark-undeleted msg))))))
     (rmail-maybe-display-summary)))
 
-(defun rmail-delete-forward (&optional count)
+(defun rmail-delete-forward (count)
   "Delete this message and move to next nondeleted one.
 Deleted messages stay in the file until the \\[rmail-expunge] command is given.
 A prefix argument is a repeat count;

=== modified file 'lisp/mail/rmailout.el'
--- lisp/mail/rmailout.el	2014-02-10 01:34:22 +0000
+++ lisp/mail/rmailout.el	2014-05-23 18:03:25 +0000
@@ -514,7 +514,7 @@
 	  (setq count (1- count))
 	  (let ((next-message-p
 		 (if rmail-delete-after-output
-		     (rmail-delete-forward)
+		     (rmail-delete-forward 1)
 		   (if (> count 0)
 		       (rmail-next-undeleted-message 1))))
 		(num-appended (- orig-count count)))
@@ -581,7 +581,7 @@
 	(setq count (1- count))
 	(let ((next-message-p
 	       (if rmail-delete-after-output
-		   (rmail-delete-forward)
+		   (rmail-delete-forward 1)
 		 (if (> count 0)
 		     (rmail-next-undeleted-message 1))))
 	      (num-appended (- orig-count count)))
@@ -630,6 +630,6 @@
 	 (error "Operation aborted"))
     (write-region (point) (point-max) file-name))
   (if rmail-delete-after-output
-      (rmail-delete-forward)))
+      (rmail-delete-forward 1)))
 
 ;;; rmailout.el ends here

=== modified file 'lisp/mail/undigest.el'
--- lisp/mail/undigest.el	2014-02-10 01:34:22 +0000
+++ lisp/mail/undigest.el	2014-05-23 18:02:49 +0000
@@ -217,7 +217,7 @@
 	    (rmail-set-message-counters)
 	    (set-buffer-modified-p t)
 	    (rmail-show-message current)
-	    (rmail-delete-forward)
+	    (rmail-delete-forward 1)
 	    (if (rmail-summary-exists)
 		(rmail-select-summary (rmail-update-summary))))
 	(when error


  reply	other threads:[~2014-05-23 18:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23 15:02 bug#17560: 24.4.50; wrong type argument if rmail-delete-after-output set Ken Olum
2014-05-23 15:31 ` Eli Zaretskii
2014-05-23 15:50   ` Ken Olum
2014-05-23 17:37     ` Eli Zaretskii
2014-05-23 18:48       ` Ken Olum [this message]
2014-05-23 19:53         ` Eli Zaretskii
2014-05-23 20:04           ` Ken Olum
2014-05-24  6:54             ` Eli Zaretskii
2014-05-27 15:08               ` Ken Olum
2014-05-30  9:35                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=q52zji8jpqe.fsf@cosmos.phy.tufts.edu \
    --to=kdo@cosmos.phy.tufts.edu \
    --cc=17560@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).