commit 10df0310cb8f43818eace6288cadaae62bd82eb6 (HEAD, refs/remotes/origin/master) Author: Michael Sperber Date: Tue Oct 20 06:10:37 2015 +0000 Unbreak `group' option for `mail-sources' * nnml.el (nnml-retrieve-groups, nnml-request-scan): * nnmail.el (nnmail-get-new-mail-per-group): (nnmail-get-new-mail-1): Unbreak `group' option for `mail-sources'. diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 7efb154..f3ba169 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -1792,6 +1792,12 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." "Read new incoming mail." (nnmail-get-new-mail-1 method exit-func temp group nil spool-func)) +(defun nnmail-get-new-mail-per-group () + "Tell us whether the mail-sources specify that `nnmail-get-new-mail' should +be called once per group or once for all groups." + (or (assq 'group mail-sources) + (assq 'directory mail-sources))) + (defun nnmail-get-new-mail-1 (method exit-func temp group in-group spool-func) (let* ((sources mail-sources) @@ -1804,7 +1810,8 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." sources) (while (setq source (pop sources)) ;; Use group's parameter - (when (eq (car source) 'group) + (when (and (eq (car source) 'group) + group) (let ((mail-sources (list (gnus-group-find-parameter diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index c825e09..33eae1c 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el @@ -268,10 +268,35 @@ non-nil.") (max (1+ (- (cdr active) (car active))) 0) (car active) (cdr active) group))))))) +(deffoo nnml-retrieve-groups (groups &optional server) + (when nnml-get-new-mail + (if (nnmail-get-new-mail-per-group) + (dolist (group groups) + (nnml-request-scan group server)) + (nnml-request-scan nil server))) + (with-current-buffer nntp-server-buffer + (erase-buffer) + (dolist (group groups) + (let* ((entry (assoc group nnml-group-alist)) + (active (nth 1 entry))) + (if (consp active) + (insert (format "211 %d %d %d %s\n" + (max (1+ (- (cdr active) (car active))) 0) + (car active) (cdr active) group)))))) + 'group) + (deffoo nnml-request-scan (&optional group server) (setq nnml-article-file-alist nil) (nnml-possibly-change-directory group server) - (nnmail-get-new-mail 'nnml 'nnml-save-incremental-nov nnml-directory group)) + (cond + (group + (nnmail-get-new-mail 'nnml 'nnml-save-incremental-nov nnml-directory group)) + ((nnmail-get-new-mail-per-group) + (nnml-request-list) + (dolist (entry nnml-group-alist) + (nnml-request-scan (car entry) server))) + (t + (nnmail-get-new-mail 'nnml 'nnml-save-incremental-nov nnml-directory nil)))) (deffoo nnml-close-group (group &optional server) (setq nnml-article-file-alist nil) commit 04d604e0553f76ea9ab266cf44c1d3f89f8bd2f0 Author: Nicolas Petton Date: Tue Oct 20 00:11:30 2015 +0200 New function seq-position * lisp/emacs-lisp/seq.el (seq-position): New function. * test/automated/seq-tests.el: New tests for seq-position. * doc/lispref/sequences.texi: Add documentation for `seq-position'. diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 0a6f4c6..8ecae7b 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -743,6 +743,25 @@ it is a function of two arguments to use instead of the default @code{equal}. @end defun +@defun seq-position sequence elt &optional function + This function returns the index of the first element in +@var{sequence} that is equal to @var{elt}. If the optional argument +@var{function} is non-@code{nil}, it is a function of two arguments to +use instead of the default @code{equal}. + +@example +@group +(seq-position '(a b c) 'b) +@result{} 1 +@end group +@group +(seq-position '(a b c) 'd) +@result{} nil +@end group +@end example +@end defun + + @defun seq-uniq sequence &optional function This function returns a list of the elements of @var{sequence} with duplicates removed. If the optional argument @var{function} is non-@code{nil}, diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index ce6645a..f5189c7 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el @@ -4,7 +4,7 @@ ;; Author: Nicolas Petton ;; Keywords: sequences -;; Version: 2.0 +;; Version: 2.1 ;; Package: seq ;; Maintainer: emacs-devel@gnu.org @@ -294,12 +294,23 @@ found or not." count)) (cl-defgeneric seq-contains (seq elt &optional testfn) - "Return the first element in SEQ that equals to ELT. + "Return the first element in SEQ that is equal to ELT. Equality is defined by TESTFN if non-nil or by `equal' if nil." (seq-some (lambda (e) (funcall (or testfn #'equal) elt e)) seq)) +(cl-defgeneric seq-position (seq elt &optional testfn) + "Return the index of the first element in SEQ that is equal to ELT. +Equality is defined by TESTFN if non-nil or by `equal' if nil." + (let ((index 0)) + (catch 'seq--break + (seq-doseq (e seq) + (when (funcall (or testfn #'equal) e elt) + (throw 'seq--break index)) + (setq index (1+ index))) + nil))) + (cl-defgeneric seq-uniq (seq &optional testfn) "Return a list of the elements of SEQ with duplicates removed. TESTFN is used to compare elements, or `equal' if TESTFN is nil." diff --git a/test/automated/seq-tests.el b/test/automated/seq-tests.el index 7023c94..5d93682 100644 --- a/test/automated/seq-tests.el +++ b/test/automated/seq-tests.el @@ -328,5 +328,14 @@ Evaluate BODY for each created sequence. (should (eq seq (seq-into-sequence seq))) (should-error (seq-into-sequence 2)))) +(ert-deftest test-seq-position () + (with-test-sequences (seq '(2 4 6)) + (should (null (seq-position seq 1))) + (should (= (seq-position seq 4) 1))) + (let ((seq '(a b c))) + (should (null (seq-position seq 'd #'eq))) + (should (= (seq-position seq 'a #'eq) 0)) + (should (null (seq-position seq (make-symbol "a") #'eq))))) + (provide 'seq-tests) ;;; seq-tests.el ends here commit b911b4b25db93c8b574a5dc6f1258893b4aa18c4 Author: Ken Brown Date: Mon Oct 19 16:53:22 2015 -0400 Enable --with-wide-int build on 32-bit Cygwin * src/sheap.c (STATIC_HEAP_SIZE): Remove distinction between x86 and x86_64 to enable --with-wide-int build on 32-bit Cygwin. diff --git a/src/sheap.c b/src/sheap.c index 58a6a0b..106b279 100644 --- a/src/sheap.c +++ b/src/sheap.c @@ -25,19 +25,11 @@ along with GNU Emacs. If not, see . */ #include -#ifdef __x86_64__ #ifdef ENABLE_CHECKING #define STATIC_HEAP_SIZE (28 * 1024 * 1024) #else #define STATIC_HEAP_SIZE (19 * 1024 * 1024) #endif -#else /* x86 */ -#ifdef ENABLE_CHECKING -#define STATIC_HEAP_SIZE (18 * 1024 * 1024) -#else -#define STATIC_HEAP_SIZE (13 * 1024 * 1024) -#endif -#endif /* x86 */ int debug_sheap = 0; commit aa3afdbb79c1a13542afd3691957c5231de04b00 Author: Glenn Morris Date: Mon Oct 19 16:35:25 2015 -0400 * doc/emacs/ack.texi (Acknowledgments): Small, sad, update. diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index 3eac9b3..eebab8a 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi @@ -839,7 +839,8 @@ facility. He also wrote @code{ebrowse}, the C@t{++} browser; and @file{rx.el}, a regular expression constructor. @item -Stefan Monnier was the Emacs (co-)maintainer from Emacs 23 onwards. He added +Stefan Monnier was the Emacs (co-)maintainer from Emacs 23 until +late in the development of 25.1. He added support for Arch and Subversion to VC, re-wrote much of the Emacs server to use the built-in networking primitives, and re-wrote the abbrev and minibuffer completion code for Emacs 23. He also wrote @code{PCL-CVS}, commit 52b977006031a32891f4d3eb96971d72c625f780 Author: Eli Zaretskii Date: Mon Oct 19 16:15:30 2015 +0300 Resurrect image loading under auto-image-file-mode * src/image.c (x_find_image_fd): Handle the case of -2 returned by 'openp' specially. This special case was lost in the changes on 2015-08-18. (Bug#21685) diff --git a/src/image.c b/src/image.c index c702782..9970e58 100644 --- a/src/image.c +++ b/src/image.c @@ -2292,7 +2292,19 @@ x_find_image_fd (Lisp_Object file, int *pfd) /* Try to find FILE in data-directory/images, then x-bitmap-file-path. */ fd = openp (search_path, file, Qnil, &file_found, pfd ? Qt : make_number (R_OK), false); - if (fd < 0) + if (fd >= 0 || fd == -2) + { + file_found = ENCODE_FILE (file_found); + if (fd == -2) + { + /* The file exists locally, but has a file handler. (This + happens, e.g., under Auto Image File Mode.) 'openp' + didn't open the file, so we should, because the caller + expects that. */ + fd = emacs_open (SSDATA (file_found), O_RDONLY | O_BINARY, 0); + } + } + else /* fd < 0, but not -2 */ return Qnil; if (pfd) *pfd = fd;