commit 8f1df3c40da276e129af4404bfba94defbfa5cae (HEAD, refs/remotes/origin/master) Author: Nikolaus Rath Date: Sat Jul 11 06:01:43 2015 +0000 nnimap.el: Fix IMAP message size parsing * lisp/gnus/nnimap.el (nnimap-transform-headers): Don't assume that UID comes before RFC822.SIZE. diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 5f3f6be..70480ad 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -182,7 +182,7 @@ textual parts.") params) (format "%s" (nreverse params)))) -(deffoo nnimap-retrieve-headers (articles &optional group server _fetch-old) +(deffoo nnimap-retrieve-headers (articles &optional group server fetch-old) (when group (setq group (nnimap-decode-gnus-group group))) (with-current-buffer nntp-server-buffer @@ -235,6 +235,7 @@ textual parts.") t) (match-string 1))) (setq lines nil) + (beginning-of-line) (setq size (and (re-search-forward "RFC822.SIZE \\([0-9]+\\)" (line-end-position) @@ -330,8 +331,6 @@ textual parts.") (push (current-buffer) nnimap-process-buffers) (current-buffer))) -(defvar auth-source-creation-prompts) - (defun nnimap-credentials (address ports user) (let* ((auth-source-creation-prompts '((user . "IMAP user at %h: ") @@ -587,7 +586,7 @@ textual parts.") (gnus-buffer-live-p nntp-server-buffer) (nnimap-find-connection nntp-server-buffer))) -(deffoo nnimap-status-message (&optional _server) +(deffoo nnimap-status-message (&optional server) nnimap-status-string) (deffoo nnimap-request-article (article &optional group server to-buffer) @@ -860,13 +859,13 @@ textual parts.") "211 %d %d %d %S\n" (1+ (- high low)) low high group)) t)))) -(deffoo nnimap-request-create-group (group &optional server _args) +(deffoo nnimap-request-create-group (group &optional server args) (setq group (nnimap-decode-gnus-group group)) (when (nnimap-change-group nil server) (with-current-buffer (nnimap-buffer) (car (nnimap-command "CREATE %S" (utf7-encode group t)))))) -(deffoo nnimap-request-delete-group (group &optional _force server) +(deffoo nnimap-request-delete-group (group &optional force server) (setq group (nnimap-decode-gnus-group group)) (when (nnimap-change-group nil server) (with-current-buffer (nnimap-buffer) @@ -911,11 +910,11 @@ textual parts.") articles))) (nreverse articles))) -(deffoo nnimap-close-group (_group &optional _server) +(deffoo nnimap-close-group (group &optional server) t) (deffoo nnimap-request-move-article (article group server accept-form - &optional _last internal-move-group) + &optional last internal-move-group) (setq group (nnimap-decode-gnus-group group)) (when internal-move-group (setq internal-move-group (nnimap-decode-gnus-group internal-move-group))) @@ -1146,7 +1145,7 @@ If LIMIT, first try to limit the search to the N last articles." (when sequence (nnimap-wait-for-response sequence)))))) -(deffoo nnimap-request-accept-article (group &optional server _last) +(deffoo nnimap-request-accept-article (group &optional server last) (unless group ;; We're respooling. Find out where mail splitting would place ;; this article. @@ -1264,7 +1263,7 @@ If LIMIT, first try to limit the search to the N last articles." (goto-char (point-min)) (while (search-forward "* LIST " nil t) (let ((flags (read (current-buffer))) - (_separator (read (current-buffer))) + (separator (read (current-buffer))) (group (buffer-substring-no-properties (progn (skip-chars-forward " \"") (point)) @@ -1274,8 +1273,7 @@ If LIMIT, first try to limit the search to the N last articles." (unless (member '%NoSelect flags) (push (utf7-decode (if (stringp group) group - (format "%s" group)) - t) + (format "%s" group)) t) groups)))) (nreverse groups))) @@ -1335,7 +1333,7 @@ If LIMIT, first try to limit the search to the N last articles." (or highest exists))))))))) t))))) -(deffoo nnimap-request-newgroups (_date &optional server) +(deffoo nnimap-request-newgroups (date &optional server) (when (nnimap-change-group nil server) (with-current-buffer nntp-server-buffer (erase-buffer) @@ -1354,7 +1352,7 @@ If LIMIT, first try to limit the search to the N last articles." (setf (nnimap-group nnimap-object) nil) (setf (nnimap-initial-resync nnimap-object) 0) (let ((qresyncp (nnimap-capability "QRESYNC")) - params sequences active uidvalidity modseq group + params groups sequences active uidvalidity modseq group unexist) ;; Go through the infos and gather the data needed to know ;; what and how to request the data. @@ -1668,7 +1666,7 @@ If LIMIT, first try to limit the search to the N last articles." (push (list group info active) nnimap-current-infos)))) (defun nnimap-flags-to-marks (groups) - (let (data group uidnext articles start-article mark permanent-flags + (let (data group totalp uidnext articles start-article mark permanent-flags uidvalidity vanished highestmodseq) (dolist (elem groups) (setq group (car elem) @@ -1759,7 +1757,7 @@ If LIMIT, first try to limit the search to the N last articles." (setq start (point)) (goto-char end)) (while (re-search-forward "^\\* [0-9]+ FETCH " start t) - (progn + (let ((p (point))) (setq elems (read (current-buffer))) (push (cons (cadr (memq 'UID elems)) (cadr (memq 'FLAGS elems))) @@ -1777,7 +1775,7 @@ If LIMIT, first try to limit the search to the N last articles." (defun nnimap-find-process-buffer (buffer) (cadr (assoc buffer nnimap-connection-alist))) -(deffoo nnimap-request-post (&optional _server) +(deffoo nnimap-request-post (&optional server) (setq nnimap-status-string "Read-only server") nil) @@ -2179,10 +2177,10 @@ Return the server's response to the SELECT or EXAMINE command." (forward-char (1+ bytes)) (delete-region (line-beginning-position) (line-end-position))))))) -(defun nnimap-dummy-active-number (_group &optional _server) +(defun nnimap-dummy-active-number (group &optional server) 1) -(defun nnimap-save-mail-spec (group-art &optional _server _full-nov) +(defun nnimap-save-mail-spec (group-art &optional server full-nov) (let (article) (goto-char (point-min)) (if (not (re-search-forward "X-nnimap-article: \\([0-9]+\\)" nil t)) commit 83d824bc4041332f338ad7e5e830f443535aa300 Author: Stefan Monnier Date: Fri Jul 10 16:17:13 2015 -0400 * lisp/gnus/nnimap.el: Clean up "unused var" warnings (auth-source-creation-prompts): Declare. (nnimap-retrieve-headers, nnimap-status-message) (nnimap-request-create-group, nnimap-request-delete-group) (nnimap-close-group, nnimap-request-move-article) (nnimap-request-accept-article, nnimap-request-newgroups) (nnimap-request-post, nnimap-dummy-active-number) (nnimap-save-mail-spec, nnimap-get-groups): Add _ to unused vars. (nnimap-parse-flags): Remove unused var `p'. (nnimap-retrieve-group-data-early): Remove unused var `groups'. (nnimap-flags-to-marks): Remove unused var `totalp'. diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 8eb6268..5f3f6be 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -182,7 +182,7 @@ textual parts.") params) (format "%s" (nreverse params)))) -(deffoo nnimap-retrieve-headers (articles &optional group server fetch-old) +(deffoo nnimap-retrieve-headers (articles &optional group server _fetch-old) (when group (setq group (nnimap-decode-gnus-group group))) (with-current-buffer nntp-server-buffer @@ -330,6 +330,8 @@ textual parts.") (push (current-buffer) nnimap-process-buffers) (current-buffer))) +(defvar auth-source-creation-prompts) + (defun nnimap-credentials (address ports user) (let* ((auth-source-creation-prompts '((user . "IMAP user at %h: ") @@ -585,7 +587,7 @@ textual parts.") (gnus-buffer-live-p nntp-server-buffer) (nnimap-find-connection nntp-server-buffer))) -(deffoo nnimap-status-message (&optional server) +(deffoo nnimap-status-message (&optional _server) nnimap-status-string) (deffoo nnimap-request-article (article &optional group server to-buffer) @@ -858,13 +860,13 @@ textual parts.") "211 %d %d %d %S\n" (1+ (- high low)) low high group)) t)))) -(deffoo nnimap-request-create-group (group &optional server args) +(deffoo nnimap-request-create-group (group &optional server _args) (setq group (nnimap-decode-gnus-group group)) (when (nnimap-change-group nil server) (with-current-buffer (nnimap-buffer) (car (nnimap-command "CREATE %S" (utf7-encode group t)))))) -(deffoo nnimap-request-delete-group (group &optional force server) +(deffoo nnimap-request-delete-group (group &optional _force server) (setq group (nnimap-decode-gnus-group group)) (when (nnimap-change-group nil server) (with-current-buffer (nnimap-buffer) @@ -909,11 +911,11 @@ textual parts.") articles))) (nreverse articles))) -(deffoo nnimap-close-group (group &optional server) +(deffoo nnimap-close-group (_group &optional _server) t) (deffoo nnimap-request-move-article (article group server accept-form - &optional last internal-move-group) + &optional _last internal-move-group) (setq group (nnimap-decode-gnus-group group)) (when internal-move-group (setq internal-move-group (nnimap-decode-gnus-group internal-move-group))) @@ -1144,7 +1146,7 @@ If LIMIT, first try to limit the search to the N last articles." (when sequence (nnimap-wait-for-response sequence)))))) -(deffoo nnimap-request-accept-article (group &optional server last) +(deffoo nnimap-request-accept-article (group &optional server _last) (unless group ;; We're respooling. Find out where mail splitting would place ;; this article. @@ -1262,7 +1264,7 @@ If LIMIT, first try to limit the search to the N last articles." (goto-char (point-min)) (while (search-forward "* LIST " nil t) (let ((flags (read (current-buffer))) - (separator (read (current-buffer))) + (_separator (read (current-buffer))) (group (buffer-substring-no-properties (progn (skip-chars-forward " \"") (point)) @@ -1272,7 +1274,8 @@ If LIMIT, first try to limit the search to the N last articles." (unless (member '%NoSelect flags) (push (utf7-decode (if (stringp group) group - (format "%s" group)) t) + (format "%s" group)) + t) groups)))) (nreverse groups))) @@ -1332,7 +1335,7 @@ If LIMIT, first try to limit the search to the N last articles." (or highest exists))))))))) t))))) -(deffoo nnimap-request-newgroups (date &optional server) +(deffoo nnimap-request-newgroups (_date &optional server) (when (nnimap-change-group nil server) (with-current-buffer nntp-server-buffer (erase-buffer) @@ -1351,7 +1354,7 @@ If LIMIT, first try to limit the search to the N last articles." (setf (nnimap-group nnimap-object) nil) (setf (nnimap-initial-resync nnimap-object) 0) (let ((qresyncp (nnimap-capability "QRESYNC")) - params groups sequences active uidvalidity modseq group + params sequences active uidvalidity modseq group unexist) ;; Go through the infos and gather the data needed to know ;; what and how to request the data. @@ -1665,7 +1668,7 @@ If LIMIT, first try to limit the search to the N last articles." (push (list group info active) nnimap-current-infos)))) (defun nnimap-flags-to-marks (groups) - (let (data group totalp uidnext articles start-article mark permanent-flags + (let (data group uidnext articles start-article mark permanent-flags uidvalidity vanished highestmodseq) (dolist (elem groups) (setq group (car elem) @@ -1756,7 +1759,7 @@ If LIMIT, first try to limit the search to the N last articles." (setq start (point)) (goto-char end)) (while (re-search-forward "^\\* [0-9]+ FETCH " start t) - (let ((p (point))) + (progn (setq elems (read (current-buffer))) (push (cons (cadr (memq 'UID elems)) (cadr (memq 'FLAGS elems))) @@ -1774,7 +1777,7 @@ If LIMIT, first try to limit the search to the N last articles." (defun nnimap-find-process-buffer (buffer) (cadr (assoc buffer nnimap-connection-alist))) -(deffoo nnimap-request-post (&optional server) +(deffoo nnimap-request-post (&optional _server) (setq nnimap-status-string "Read-only server") nil) @@ -2176,10 +2179,10 @@ Return the server's response to the SELECT or EXAMINE command." (forward-char (1+ bytes)) (delete-region (line-beginning-position) (line-end-position))))))) -(defun nnimap-dummy-active-number (group &optional server) +(defun nnimap-dummy-active-number (_group &optional _server) 1) -(defun nnimap-save-mail-spec (group-art &optional server full-nov) +(defun nnimap-save-mail-spec (group-art &optional _server _full-nov) (let (article) (goto-char (point-min)) (if (not (re-search-forward "X-nnimap-article: \\([0-9]+\\)" nil t)) commit 8badbad184c75d6a9b17b72900ca091a1bd11397 Author: Andy Moreton Date: Fri Jul 10 15:48:11 2015 +0300 * src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 20MB. Copyright-paperwork-exempt: yes diff --git a/src/w32heap.c b/src/w32heap.c index 47ffec1..ec5b041 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -115,7 +115,7 @@ typedef struct _RTL_HEAP_PARAMETERS { to build only the first bootstrap-emacs.exe with the large size, and reset that to a lower value afterwards. */ #if defined _WIN64 || defined WIDE_EMACS_INT -# define DUMPED_HEAP_SIZE (19*1024*1024) +# define DUMPED_HEAP_SIZE (20*1024*1024) #else # define DUMPED_HEAP_SIZE (12*1024*1024) #endif commit 4e81398f1c12d63c5b4c465beba22150bba11dae Author: YAMAMOTO Mitsuharu Date: Fri Jul 10 18:04:34 2015 +0900 * src/macfont.m (macfont_list): Ignore font families lacking font descriptors. diff --git a/src/macfont.m b/src/macfont.m index cbf1b07..cbf1ab8 100644 --- a/src/macfont.m +++ b/src/macfont.m @@ -2198,7 +2198,7 @@ macfont_list (struct frame *f, Lisp_Object spec) } CFRelease (pat_desc); if (! descs) - goto err; + continue; descs_count = CFArrayGetCount (descs); if (descs_count == 0