Now on revision 113269. ------------------------------------------------------------ revno: 113269 committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2013-07-03 04:15:38 +0000 message: gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): Revert 2013-01-14 change diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-07-02 10:38:58 +0000 +++ lisp/gnus/ChangeLog 2013-07-03 04:15:38 +0000 @@ -1,3 +1,8 @@ +2013-07-03 Katsumi Yamaoka + + * gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): + Revert 2013-01-14 change. + 2013-07-02 David Engster * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2013-07-02 10:38:58 +0000 +++ lisp/gnus/gnus-sum.el 2013-07-03 04:15:38 +0000 @@ -3657,18 +3657,17 @@ (or (car (funcall gnus-extract-address-components from)) from)) -(defun gnus-summary-from-or-to-or-newsgroups (header from) +(defun gnus-summary-from-or-to-or-newsgroups (header gnus-tmp-from) (let ((mail-parse-charset gnus-newsgroup-charset) - (ignored-from-addresses (gnus-ignored-from-addresses)) - ;; Is it really necessary to do this next part for each summary line? - ;; Luckily, doesn't seem to slow things down much. - (mail-parse-ignored-charsets - (with-current-buffer gnus-summary-buffer - gnus-newsgroup-ignored-charsets)) - (address (cadr (gnus-extract-address-components from)))) + (ignored-from-addresses (gnus-ignored-from-addresses)) + ;; Is it really necessary to do this next part for each summary line? + ;; Luckily, doesn't seem to slow things down much. + (mail-parse-ignored-charsets + (with-current-buffer gnus-summary-buffer + gnus-newsgroup-ignored-charsets))) (or (and ignored-from-addresses - (string-match ignored-from-addresses address) + (string-match ignored-from-addresses gnus-tmp-from) (let ((extra-headers (mail-header-extra header)) to newsgroups) @@ -3683,11 +3682,13 @@ (cdr (assq 'Newsgroups extra-headers)) (and (memq 'Newsgroups gnus-extra-headers) - (eq (car (gnus-find-method-for-group - gnus-newsgroup-name)) 'nntp) + (eq (car (gnus-find-method-for-group + gnus-newsgroup-name)) 'nntp) (gnus-group-real-name gnus-newsgroup-name)))) (concat gnus-summary-newsgroup-prefix newsgroups))))) - (gnus-string-mark-left-to-right (gnus-summary-extract-address-component from))))) + (gnus-string-mark-left-to-right + (inline + (gnus-summary-extract-address-component gnus-tmp-from)))))) (defun gnus-summary-insert-line (gnus-tmp-header gnus-tmp-level gnus-tmp-current ------------------------------------------------------------ revno: 113268 [merge] committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-07-02 20:20:04 -0700 message: Merge from emacs-24; up to r111368 diff: === modified file 'ChangeLog' --- ChangeLog 2013-07-02 16:56:29 +0000 +++ ChangeLog 2013-07-03 03:20:04 +0000 @@ -1,3 +1,8 @@ +2013-07-03 Christoph Egger (tiny change) + + * configure.ac (emacs_broken_SIGIO): Set on gnu-kfreebsd to avoid hang. + http://bugs.debian.org/712974 + 2013-07-02 Paul Eggert Remove some unused macros from 'configure'. === modified file 'configure.ac' --- configure.ac 2013-07-02 16:56:29 +0000 +++ configure.ac 2013-07-03 03:20:04 +0000 @@ -3762,7 +3762,7 @@ case $opsys in dnl SIGIO exists, but the feature doesn't work in the way Emacs needs. dnl See eg . - hpux* | irix6-5 | openbsd | sol2* | unixware ) + hpux* | irix6-5 | openbsd | sol2* | unixware | gnu-kfreebsd ) emacs_broken_SIGIO=yes ;; === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-06-29 13:36:19 +0000 +++ doc/emacs/ChangeLog 2013-07-03 03:20:04 +0000 @@ -1,3 +1,11 @@ +2013-07-03 Glenn Morris + + * maintaining.texi (EDE): Fix cross-reference. + + * programs.texi (Program Modes): Fix emacs-xtra reference. + + * help.texi (Misc Help): Index describe-syntax. + 2013-06-29 Eli Zaretskii * basic.texi (Moving Point): Document visual-order-cursor-movement === modified file 'doc/emacs/help.texi' --- doc/emacs/help.texi 2013-01-07 22:00:55 +0000 +++ doc/emacs/help.texi 2013-07-03 03:20:04 +0000 @@ -535,6 +535,8 @@ @kindex C-h b @findex describe-bindings +@kindex C-h s +@findex describe-syntax @kbd{C-h b} (@code{describe-bindings}) and @kbd{C-h s} (@code{describe-syntax}) show other information about the current environment within Emacs. @kbd{C-h b} displays a list of all the key === modified file 'doc/emacs/maintaining.texi' --- doc/emacs/maintaining.texi 2013-06-11 06:42:15 +0000 +++ doc/emacs/maintaining.texi 2013-07-03 03:20:04 +0000 @@ -2346,7 +2346,7 @@ project. To define a new project, visit a file in the desired project root and type @kbd{M-x ede-new}. This command prompts for a @dfn{project type}, which refers to the underlying method that EDE -will use to manage the project (@pxref{Creating a Project, EDE,, ede, +will use to manage the project (@pxref{Creating a project, EDE,, ede, Emacs Development Environment}). The most common project types are @samp{Make}, which uses Makefiles, and @samp{Automake}, which uses GNU Automake (@pxref{Top, Automake,, automake, Automake}). In both cases, === modified file 'doc/emacs/programs.texi' --- doc/emacs/programs.texi 2013-05-23 19:12:10 +0000 +++ doc/emacs/programs.texi 2013-07-02 07:42:34 +0000 @@ -119,17 +119,17 @@ For instance, entering C mode runs the hooks @code{prog-mode-hook} and @code{c-mode-hook}. @xref{Hooks}, for information about hooks. -@ifinfo +@ifnottex Separate manuals are available for the modes for Ada (@pxref{Top,, Ada Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK (@pxref{Top, , CC Mode, ccmode, CC Mode}), and IDLWAVE (@pxref{Top,, IDLWAVE, idlwave, IDLWAVE User Manual}). -@end ifinfo -@ifnotinfo +@end ifnottex +@iftex The Emacs distribution contains Info manuals for the major modes for Ada, C/C++/Objective C/Java/Corba IDL/Pike/AWK, and IDLWAVE@. For Fortran mode, @pxref{Fortran,,, emacs-xtra, Specialized Emacs Features}. -@end ifnotinfo +@end iftex @node Defuns @section Top-Level Definitions, or Defuns === modified file 'doc/lispintro/ChangeLog' --- doc/lispintro/ChangeLog 2013-06-19 20:10:57 +0000 +++ doc/lispintro/ChangeLog 2013-07-03 03:20:04 +0000 @@ -1,3 +1,7 @@ +2013-07-03 Glenn Morris + + * emacs-lisp-intro.texi (edebug): Fix cross-references. + 2013-06-19 Glenn Morris * Makefile.in (dist): Edit more configure variables. (Bug#14660) === modified file 'doc/lispintro/emacs-lisp-intro.texi' --- doc/lispintro/emacs-lisp-intro.texi 2013-06-21 02:17:37 +0000 +++ doc/lispintro/emacs-lisp-intro.texi 2013-07-03 03:20:04 +0000 @@ -18483,7 +18483,7 @@ You can walk through the execution of a function, line by line, or run quickly until reaching a @dfn{breakpoint} where execution stops. -Edebug is described in @ref{edebug, , Edebug, elisp, The GNU Emacs +Edebug is described in @ref{Edebug, , , elisp, The GNU Emacs Lisp Reference Manual}. @need 1250 @@ -18610,7 +18610,7 @@ changing values of various expressions; you can find out how many times a function is called, and more. -Edebug is described in @ref{edebug, , Edebug, elisp, The GNU Emacs +Edebug is described in @ref{Edebug, , , elisp, The GNU Emacs Lisp Reference Manual}. @need 1500 === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-06-29 13:36:19 +0000 +++ doc/lispref/ChangeLog 2013-07-03 03:20:04 +0000 @@ -1,3 +1,12 @@ +2013-07-03 Glenn Morris + + * debugging.texi (Debugging): + * files.texi (File Attributes, Changing Files): Fix cross-references. + + * package.texi (Package Archives): Fix @url call. + + * syntax.texi (Syntax Table Functions): Mention describe-syntax. + 2013-06-29 Eli Zaretskii * display.texi (Bidirectional Display): Document move-point-visually. === modified file 'doc/lispref/debugging.texi' --- doc/lispref/debugging.texi 2013-01-01 09:11:05 +0000 +++ doc/lispref/debugging.texi 2013-07-03 03:03:47 +0000 @@ -32,7 +32,7 @@ @item You can use the ERT package to write regression tests for the program. -@xref{Top,the ERT manual,, ERT, ERT: Emacs Lisp Regression Testing}. +@xref{Top,the ERT manual,, ert, ERT: Emacs Lisp Regression Testing}. @item You can profile the program to get hints about how to make it more efficient. === modified file 'doc/lispref/files.texi' --- doc/lispref/files.texi 2013-06-11 11:37:56 +0000 +++ doc/lispref/files.texi 2013-07-03 03:20:04 +0000 @@ -1115,7 +1115,7 @@ symbolic links in @var{filename} at all levels. If @var{filename} does not exist, the return value is @code{nil}. -@xref{File Permissions,,, coreutils, The @sc{gnu} @code{Coreutils} +@xref{File permissions,,, coreutils, The @sc{gnu} @code{Coreutils} Manual}, for a description of mode bits. If the low-order bit is 1, then the file is executable by all users, if the second-lowest-order bit is 1, then the file is writable by all users, etc. The highest @@ -1625,7 +1625,7 @@ @noindent specifies that the file should be readable and writable for its owner, readable for group members, and readable for all other users. -@xref{File Permissions,,, coreutils, The @sc{gnu} @code{Coreutils} +@xref{File permissions,,, coreutils, The @sc{gnu} @code{Coreutils} Manual}, for a description of mode bit specifications. Interactively, @var{mode} is read from the minibuffer using @@ -1676,7 +1676,7 @@ mode bits of @var{base-file}. If @var{base-file} is omitted or @code{nil}, the function uses @code{0} as the base mode bits. The complete and relative specifications can be combined, as in -@code{"u+r,g+rx,o+r,g-w"}. @xref{File Permissions,,, coreutils, The +@code{"u+r,g+rx,o+r,g-w"}. @xref{File permissions,,, coreutils, The @sc{gnu} @code{Coreutils} Manual}, for a description of file mode specifications. @end defun === modified file 'doc/lispref/package.texi' --- doc/lispref/package.texi 2013-01-01 09:11:05 +0000 +++ doc/lispref/package.texi 2013-07-03 03:03:47 +0000 @@ -265,7 +265,7 @@ Via the Package Menu, users may download packages from @dfn{package archives}. Such archives are specified by the variable @code{package-archives}, whose default value contains a single entry: -the archive hosted by the GNU project at @url{elpa.gnu.org}. This +the archive hosted by the GNU project at @url{http://elpa.gnu.org}. This section describes how to set up and maintain a package archive. @cindex base location, package archive === modified file 'doc/lispref/syntax.texi' --- doc/lispref/syntax.texi 2013-01-03 02:23:39 +0000 +++ doc/lispref/syntax.texi 2013-06-26 07:16:20 +0000 @@ -506,6 +506,11 @@ the current buffer. @end defun +@deffn Command describe-syntax &optional buffer +This command displays the contents of the syntax table of +@var{buffer} (by default, the current buffer) in a help buffer. +@end deffn + @defmac with-syntax-table table body@dots{} This macro executes @var{body} using @var{table} as the current syntax table. It returns the value of the last form in @var{body}, after === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-07-02 10:38:58 +0000 +++ doc/misc/ChangeLog 2013-07-03 03:20:04 +0000 @@ -1,3 +1,10 @@ +2013-07-03 Glenn Morris + + * bovine.texi (top): + * cc-mode.texi (AWK Mode Font Locking): + * mh-e.texi (Preface): + * url.texi (URI Parsing): Fix cross-references to other manuals. + 2013-07-02 Lars Magne Ingebrigtsen * gnus.texi (Client-Side IMAP Splitting): === modified file 'doc/misc/bovine.texi' --- doc/misc/bovine.texi 2013-02-12 17:36:54 +0000 +++ doc/misc/bovine.texi 2013-07-03 03:03:47 +0000 @@ -76,7 +76,7 @@ implementation of an @acronym{LL} parser. It is good for simple languages. It has many conveniences making grammar writing easy. The conveniences make it less powerful than a Bison-like @acronym{LALR} -parser. For more information, @inforef{top, the Wisent Parser Manual, +parser. For more information, @inforef{Top, The Wisent Parser Manual, wisent}. Bovine @acronym{LL} grammars are stored in files with a @file{.by} === modified file 'doc/misc/cc-mode.texi' --- doc/misc/cc-mode.texi 2013-03-06 14:24:39 +0000 +++ doc/misc/cc-mode.texi 2013-07-03 03:20:04 +0000 @@ -2111,7 +2111,7 @@ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The general appearance of font-locking in AWK mode is much like in any -other programming mode. @xref{Faces For Font Lock,,,elisp, GNU Emacs +other programming mode. @xref{Faces for Font Lock,,,elisp, GNU Emacs Lisp Reference Manual}. The following faces are, however, used in a non-standard fashion in === modified file 'doc/misc/mh-e.texi' --- doc/misc/mh-e.texi 2013-03-04 08:45:03 +0000 +++ doc/misc/mh-e.texi 2013-07-03 03:20:04 +0000 @@ -233,7 +233,7 @@ @cite{GNU Emacs Manual}, @end iftex @ifinfo -@ref{top, , GNU Emacs Manual, emacs, GNU Emacs Manual}, +@ref{Top, , GNU Emacs Manual, emacs, GNU Emacs Manual}, @end ifinfo @ifhtml @uref{http://www.gnu.org/software/emacs/manual/html_node/emacs/, === modified file 'doc/misc/url.texi' --- doc/misc/url.texi 2013-02-13 04:31:09 +0000 +++ doc/misc/url.texi 2013-07-03 03:20:04 +0000 @@ -138,7 +138,7 @@ The return value of @code{url-generic-parse-url}, and the argument expected by @code{url-recreate-url}, is a @dfn{parsed URI}: a CL structure whose slots hold the various components of the URI@. -@xref{top,the CL Manual,,cl,GNU Emacs Common Lisp Emulation}, for +@xref{Top,the CL Manual,,cl,GNU Emacs Common Lisp Emulation}, for details about CL structures. Most of the other functions in the @code{url} library act on parsed URIs. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-03 03:09:38 +0000 +++ lisp/ChangeLog 2013-07-03 03:20:04 +0000 @@ -1,5 +1,7 @@ 2013-07-03 Glenn Morris + * subr.el (y-or-n-p): Handle empty prompts. (Bug#14770) + Make info-xref checks case-sensitive by default * info.el (Info-find-node, Info-find-in-tag-table) (Info-find-node-in-buffer, Info-find-node-2, Info-goto-node): === modified file 'lisp/subr.el' --- lisp/subr.el 2013-06-20 14:15:42 +0000 +++ lisp/subr.el 2013-07-03 03:20:04 +0000 @@ -2240,7 +2240,8 @@ (cond (noninteractive (setq prompt (concat prompt - (if (eq ?\s (aref prompt (1- (length prompt)))) + (if (or (zerop (length prompt)) + (eq ?\s (aref prompt (1- (length prompt))))) "" " ") "(y or n) ")) (let ((temp-prompt prompt)) @@ -2257,7 +2258,8 @@ (x-popup-dialog t `(,prompt ("Yes" . act) ("No" . skip))))) (t (setq prompt (concat prompt - (if (eq ?\s (aref prompt (1- (length prompt)))) + (if (or (zerop (length prompt)) + (eq ?\s (aref prompt (1- (length prompt))))) "" " ") "(y or n) ")) (while ------------------------------------------------------------ revno: 113267 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-07-02 20:09:38 -0700 message: Make info-xref checks case-sensitive by default * lisp/info.el (Info-find-node, Info-find-in-tag-table) (Info-find-node-in-buffer, Info-find-node-2, Info-goto-node): Add option for exact case matching of nodes. * lisp/info-xref.el (info-xref): New custom group. (info-xref-case-fold): New option. (info-xref-goto-node-p): Pass info-xref-case-fold to Info-goto-node. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-03 03:01:34 +0000 +++ lisp/ChangeLog 2013-07-03 03:09:38 +0000 @@ -1,3 +1,13 @@ +2013-07-03 Glenn Morris + + Make info-xref checks case-sensitive by default + * info.el (Info-find-node, Info-find-in-tag-table) + (Info-find-node-in-buffer, Info-find-node-2, Info-goto-node): + Add option for exact case matching of nodes. + * info-xref.el (info-xref): New custom group. + (info-xref-case-fold): New option. + (info-xref-goto-node-p): Pass info-xref-case-fold to Info-goto-node. + 2013-07-03 Leo Liu * ido.el (ido-delete-file-at-head): Respect delete-by-moving-to-trash. === modified file 'lisp/info-xref.el' --- lisp/info-xref.el 2013-06-26 01:52:09 +0000 +++ lisp/info-xref.el 2013-07-03 03:09:38 +0000 @@ -45,7 +45,25 @@ ;;; Code: (require 'info) -(eval-when-compile (require 'cl-lib)) ;; for `incf' +(eval-when-compile (require 'cl-lib)) ; for `cl-incf' + +(defgroup info-xref nil + "Check external cross-references in Info documents." + :group 'docs) ; FIXME right parent? + +;; Should this even be an option? +(defcustom info-xref-case-fold nil + "Non-nil means node checks should ignore case. +When following cross-references, the Emacs Info reader first tries a +case-sensitive match, then if that fails a case-insensitive one. +The standalone Info reader does not do this, nor does this work +for links in the html versions of Texinfo manuals. Therefore +to ensure your cross-references work on the widest range of platforms, +you should set this variable to nil." + :group 'info-xref + :type 'boolean + :version "24.4") + ;;----------------------------------------------------------------------------- ;; vaguely generic @@ -204,7 +222,8 @@ (Info-goto-node node (when (get-buffer "*info*") (set-buffer "*info*") - "xref - temporary")) + "xref - temporary") + (not info-xref-case-fold)) t) (error nil)) (unless (equal (current-buffer) oldbuf) === modified file 'lisp/info.el' --- lisp/info.el 2013-06-27 09:20:04 +0000 +++ lisp/info.el 2013-07-03 03:09:38 +0000 @@ -920,10 +920,14 @@ (error "Info file %s does not exist" filename))) filename)))) -(defun Info-find-node (filename nodename &optional no-going-back) +(defun Info-find-node (filename nodename &optional no-going-back strict-case) "Go to an Info node specified as separate FILENAME and NODENAME. NO-GOING-BACK is non-nil if recovering from an error in this function; -it says do not attempt further (recursive) error recovery." +it says do not attempt further (recursive) error recovery. + +This function first looks for a case-sensitive match for NODENAME; +if none is found it then tries a case-insensitive match (unless +STRICT-CASE is non-nil)." (info-initialize) (setq filename (Info-find-file filename)) ;; Go into Info buffer. @@ -933,7 +937,7 @@ Info-current-file (push (list Info-current-file Info-current-node (point)) Info-history)) - (Info-find-node-2 filename nodename no-going-back)) + (Info-find-node-2 filename nodename no-going-back strict-case)) ;;;###autoload (defun Info-on-current-buffer (&optional nodename) @@ -1010,7 +1014,7 @@ (+ (point-min) (read (current-buffer))) major-mode))))) -(defun Info-find-in-tag-table (marker regexp) +(defun Info-find-in-tag-table (marker regexp &optional strict-case) "Find a node in a tag table. MARKER specifies the buffer and position to start searching at. REGEXP is a regular expression matching nodes or references. Its first @@ -1020,10 +1024,11 @@ where the match was found, and MODE is `major-mode' of the buffer in which the match was found. This function tries to find a case-sensitive match first, then a -case-insensitive match is tried." +case-insensitive match is tried (unless optional argument STRICT-CASE +is non-nil)." (let ((result (Info-find-in-tag-table-1 marker regexp nil))) - (when (null (car result)) - (setq result (Info-find-in-tag-table-1 marker regexp t))) + (or strict-case (car result) + (setq result (Info-find-in-tag-table-1 marker regexp t))) result)) (defun Info-find-node-in-buffer-1 (regexp case-fold) @@ -1046,17 +1051,19 @@ (setq found (line-beginning-position))))))) found)) -(defun Info-find-node-in-buffer (regexp) +(defun Info-find-node-in-buffer (regexp &optional strict-case) "Find a node or anchor in the current buffer. REGEXP is a regular expression matching nodes or references. Its first group should match `Node:' or `Ref:'. Value is the position at which a match was found, or nil if not found. This function looks for a case-sensitive match first. If none is found, -a case-insensitive match is tried." +a case-insensitive match is tried (unless optional argument STRICT-CASE +is non-nil)." (or (Info-find-node-in-buffer-1 regexp nil) - (Info-find-node-in-buffer-1 regexp t))) + (and (not strict-case) + (Info-find-node-in-buffer-1 regexp t)))) -(defun Info-find-node-2 (filename nodename &optional no-going-back) +(defun Info-find-node-2 (filename nodename &optional no-going-back strict-case) (buffer-disable-undo (current-buffer)) (or (eq major-mode 'Info-mode) (Info-mode)) @@ -1167,7 +1174,7 @@ ;; First, search a tag table, if any (when (marker-position Info-tag-table-marker) (let* ((m Info-tag-table-marker) - (found (Info-find-in-tag-table m regexp))) + (found (Info-find-in-tag-table m regexp strict-case))) (when found ;; FOUND is (ANCHOR POS MODE). @@ -1194,7 +1201,7 @@ ;; buffer) to find the actual node. First, check ;; whether the node is right where we are, in case the ;; buffer begins with a node. - (let ((pos (Info-find-node-in-buffer regexp))) + (let ((pos (Info-find-node-in-buffer regexp strict-case))) (when pos (goto-char pos) (throw 'foo t))) @@ -1701,7 +1708,7 @@ ;; Don't autoload this function: the correct entry point for other packages ;; to use is `info'. --Stef ;; ;;;###autoload -(defun Info-goto-node (nodename &optional fork) +(defun Info-goto-node (nodename &optional fork strict-case) "Go to Info node named NODENAME. Give just NODENAME or (FILENAME)NODENAME. If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file FILENAME; otherwise, NODENAME should be in the current Info file (or one of @@ -1711,7 +1718,11 @@ Empty NODENAME in (FILENAME) defaults to the Top node. If FORK is non-nil (interactively with a prefix arg), show the node in a new Info buffer. -If FORK is a string, it is the name to use for the new buffer." +If FORK is a string, it is the name to use for the new buffer. + +This function first looks for a case-sensitive match for the node part +of NODENAME; if none is found it then tries a case-insensitive match +\(unless STRICT-CASE is non-nil)." (interactive (list (Info-read-node-name "Go to node: ") current-prefix-arg)) (info-initialize) (if fork @@ -1730,7 +1741,7 @@ (if trim (setq nodename (substring nodename 0 trim)))) (if transient-mark-mode (deactivate-mark)) (Info-find-node (if (equal filename "") nil filename) - (if (equal nodename "") "Top" nodename)))) + (if (equal nodename "") "Top" nodename) nil strict-case))) (defvar Info-read-node-completion-table) ------------------------------------------------------------ revno: 113266 committer: Leo Liu branch nick: trunk timestamp: Wed 2013-07-03 11:01:34 +0800 message: * ido.el (ido-delete-file-at-head): Respect delete-by-moving-to-trash. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-03 01:02:18 +0000 +++ lisp/ChangeLog 2013-07-03 03:01:34 +0000 @@ -1,3 +1,7 @@ +2013-07-03 Leo Liu + + * ido.el (ido-delete-file-at-head): Respect delete-by-moving-to-trash. + 2013-07-03 Dmitry Gutov * progmodes/ruby-mode.el (ruby-move-to-block): When we're at a === modified file 'lisp/ido.el' --- lisp/ido.el 2013-06-25 01:04:06 +0000 +++ lisp/ido.el 2013-07-03 03:01:34 +0000 @@ -3986,6 +3986,7 @@ ;;; DELETE CURRENT FILE (defun ido-delete-file-at-head () "Delete the file at the head of `ido-matches'. +Trash the file if `delete-by-moving-to-trash' is non-nil. If cursor is not at the end of the user input, delete to end of input." (interactive) (if (not (eobp)) @@ -3998,8 +3999,9 @@ (file-exists-p file) (not (file-directory-p file)) (file-writable-p ido-current-directory) - (yes-or-no-p (concat "Delete " file "? "))) - (delete-file file) + (or delete-by-moving-to-trash + (yes-or-no-p (concat "Delete " file "? ")))) + (delete-file file 'trash) ;; Check if file still exists. (if (file-exists-p file) ;; file could not be deleted ------------------------------------------------------------ revno: 113265 committer: Dmitry Gutov branch nick: trunk timestamp: Wed 2013-07-03 05:02:18 +0400 message: * lisp/progmodes/ruby-mode.el (ruby-move-to-block): When we're at a middle of block statement initially, lower the depth. Remove FIXME comment, not longer valid. Remove middle of block statement detection, no need to do that anymore since we've been using `ruby-parse-region' here. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-02 18:16:09 +0000 +++ lisp/ChangeLog 2013-07-03 01:02:18 +0000 @@ -1,3 +1,11 @@ +2013-07-03 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-move-to-block): When we're at a + middle of block statement initially, lower the depth. Remove + FIXME comment, not longer valid. Remove middle of block statement + detection, no need to do that anymore since we've been using + `ruby-parse-region' here. + 2013-07-02 Jan Djärv * term/ns-win.el (display-format-alist): Use .* (Bug#14765). === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-06-30 02:23:10 +0000 +++ lisp/progmodes/ruby-mode.el 2013-07-03 01:02:18 +0000 @@ -990,13 +990,14 @@ (defun ruby-move-to-block (n) "Move to the beginning (N < 0) or the end (N > 0) of the current block, a sibling block, or an outer block. Do that (abs N) times." + (back-to-indentation) (let ((signum (if (> n 0) 1 -1)) (backward (< n 0)) - (depth (or (nth 2 (ruby-parse-region (line-beginning-position) - (line-end-position))) - 0)) + (depth (or (nth 2 (ruby-parse-region (point) (line-end-position))) 0)) case-fold-search down done) + (when (looking-at ruby-block-mid-re) + (setq depth (+ depth signum))) (when (< (* depth signum) 0) ;; Moving end -> end or beginning -> beginning. (setq depth 0)) @@ -1033,22 +1034,16 @@ (unless (car state) ; Line ends with unfinished string. (setq depth (+ (nth 2 state) depth)))) (cond - ;; Deeper indentation, we found a block. - ;; FIXME: We can't recognize empty blocks this way. + ;; Increased depth, we found a block. ((> (* signum depth) 0) (setq down t)) - ;; Block found, and same indentation as when started, stop. + ;; We're at the same depth as when we started, and we've + ;; encountered a block before. Stop. ((and down (zerop depth)) (setq done t)) - ;; Shallower indentation, means outer block, can stop now. + ;; Lower depth, means outer block, can stop now. ((< (* signum depth) 0) - (setq done t))))) - (if done - (save-excursion - (back-to-indentation) - ;; Not really at the first or last line of the block, move on. - (if (looking-at (concat "\\<\\(" ruby-block-mid-re "\\)\\>")) - (setq done nil)))))) + (setq done t))))))) (back-to-indentation))) (defun ruby-beginning-of-block (&optional arg) === modified file 'test/automated/ruby-mode-tests.el' --- test/automated/ruby-mode-tests.el 2013-06-30 02:23:10 +0000 +++ test/automated/ruby-mode-tests.el 2013-07-03 01:02:18 +0000 @@ -546,6 +546,17 @@ (ruby-beginning-of-block)) (should (= 1 (line-number-at-pos))))) +(ert-deftest ruby-move-to-block-moves-from-else-to-if () + (ruby-with-temp-buffer (ruby-test-string + "if true + | nested_block do + | end + |else + |end") + (goto-line 4) + (ruby-beginning-of-block) + (should (= 1 (line-number-at-pos))))) + (ert-deftest ruby-beginning-of-defun-does-not-fold-case () (ruby-with-temp-buffer (ruby-test-string ------------------------------------------------------------ revno: 113264 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-07-02 15:14:42 -0700 message: * src/sysdep.c (sys_siglist): Fix typo in previous commit. diff: === modified file 'src/sysdep.c' --- src/sysdep.c 2013-07-02 16:56:29 +0000 +++ src/sysdep.c 2013-07-02 22:14:42 +0000 @@ -1630,7 +1630,7 @@ # undef sys_siglist # ifdef _sys_siglist # define sys_siglist _sys_siglist -# elif defined HAVE_DECL___SYS_SIGLIST +# elif HAVE_DECL___SYS_SIGLIST # define sys_siglist __sys_siglist # else # define sys_siglist my_sys_siglist ------------------------------------------------------------ revno: 113263 fixes bug: http://debbugs.gnu.org/14765 committer: Jan D. branch nick: trunk timestamp: Tue 2013-07-02 20:16:09 +0200 message: * term/ns-win.el (display-format-alist): Use .*. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-01 05:01:42 +0000 +++ lisp/ChangeLog 2013-07-02 18:16:09 +0000 @@ -1,3 +1,7 @@ +2013-07-02 Jan Djärv + + * term/ns-win.el (display-format-alist): Use .* (Bug#14765). + 2013-07-01 Katsumi Yamaoka * wid-edit.el (widget-default-get): Don't modify widget (Bug#14738). === modified file 'lisp/term/ns-win.el' --- lisp/term/ns-win.el 2013-06-01 22:35:54 +0000 +++ lisp/term/ns-win.el 2013-07-02 18:16:09 +0000 @@ -940,7 +940,8 @@ (x-apply-session-resources) (setq ns-initialized t)) -(add-to-list 'display-format-alist '("\\`ns\\'" . ns)) +;; Any display name is OK. +(add-to-list 'display-format-alist '(".*" . ns)) (add-to-list 'handle-args-function-alist '(ns . x-handle-args)) (add-to-list 'frame-creation-function-alist '(ns . x-create-frame-with-faces)) (add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system)) ------------------------------------------------------------ revno: 113262 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-07-02 09:56:29 -0700 message: Remove some unused macros from 'configure'. * configure.ac (HAVE_SOUNDCARD_H, HAVE_LINUX_VERSION_H, HAVE_SPEED_T) (HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY) (HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION, HAVE_UTIMES) (HAVE_LIBHESIOD, HAVE_LIBRESOLV, HAVE_LIBCOM_ERR, HAVE_LIBCRYPTO) (HAVE_LIBK5CRYPTO, HAVE_LIBKRB5, HAVE_LIBDES425, HAVE_LIBDES) (HAVE_LIBKRB4, HAVE_LIBKRB, HAVE_DES_H, HAVE_KERBEROSIV_DES_H) (HAVE_DEV_PTMX, DEVICE_SEP, USG5): Remove these macros, as they are not used. (sys_siglist): Remove macro; src/sysdep.c now does this. * src/sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]: Define to __sys_siglist. diff: === modified file 'ChangeLog' --- ChangeLog 2013-07-02 02:17:12 +0000 +++ ChangeLog 2013-07-02 16:56:29 +0000 @@ -1,5 +1,16 @@ 2013-07-02 Paul Eggert + Remove some unused macros from 'configure'. + * configure.ac (HAVE_SOUNDCARD_H, HAVE_LINUX_VERSION_H, HAVE_SPEED_T) + (HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY) + (HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION, HAVE_UTIMES) + (HAVE_LIBHESIOD, HAVE_LIBRESOLV, HAVE_LIBCOM_ERR, HAVE_LIBCRYPTO) + (HAVE_LIBK5CRYPTO, HAVE_LIBKRB5, HAVE_LIBDES425, HAVE_LIBDES) + (HAVE_LIBKRB4, HAVE_LIBKRB, HAVE_DES_H, HAVE_KERBEROSIV_DES_H) + (HAVE_DEV_PTMX, DEVICE_SEP, USG5): + Remove these macros, as they are not used. + (sys_siglist): Remove macro; src/sysdep.c now does this. + * configure.ac (GTK_COMPILES): Check API a bit more carefully. Also check that it links. Say whether it compiled and linked. === modified file 'admin/CPP-DEFINES' --- admin/CPP-DEFINES 2013-03-27 05:13:31 +0000 +++ admin/CPP-DEFINES 2013-07-02 16:56:29 +0000 @@ -24,7 +24,6 @@ DARWIN_OS Compiling on Mac OS X or pure Darwin (and using s/darwin.h). SOLARIS2 USG -USG5 USG5_4 ** Distinguishing GUIs ** @@ -135,8 +134,6 @@ HAVE_DECL_SYS_SIGLIST HAVE_DECL_TZNAME HAVE_DECL___SYS_SIGLIST -HAVE_DES_H -HAVE_DEV_PTMX HAVE_DIALOGS HAVE_DIFFTIME HAVE_DUP2 @@ -174,8 +171,6 @@ HAVE_GHOSTSCRIPT HAVE_GIF HAVE_GNUTLS -HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY -HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION HAVE_GPM HAVE_GRANTPT HAVE_GSETTINGS @@ -198,26 +193,15 @@ HAVE_INET_SOCKETS HAVE_INTTYPES_H HAVE_JPEG -HAVE_KERBEROSIV_DES_H HAVE_KERBEROSIV_KRB_H -HAVE_KERBEROS_DES_H HAVE_KERBEROS_KRB_H HAVE_KRB5_ERROR_E_TEXT HAVE_KRB5_ERROR_TEXT HAVE_KRB5_H HAVE_KRB_H HAVE_LANGINFO_CODESET -HAVE_LIBCOM_ERR -HAVE_LIBCRYPTO -HAVE_LIBDES -HAVE_LIBDES425 HAVE_LIBDGC HAVE_LIBDNET -HAVE_LIBHESIOD -HAVE_LIBK5CRYPTO -HAVE_LIBKRB -HAVE_LIBKRB4 -HAVE_LIBKRB5 HAVE_LIBKSTAT HAVE_LIBLOCKFILE HAVE_LIBM @@ -226,12 +210,10 @@ HAVE_LIBPERFSTAT HAVE_LIBPNG_PNG_H HAVE_LIBPTHREADS -HAVE_LIBRESOLV HAVE_LIBSELINUX HAVE_LIBXEXT HAVE_LIBXML2 HAVE_LIBXMU -HAVE_LINUX_VERSION_H HAVE_LOCALTIME_R HAVE_LOCAL_SOCKETS HAVE_LONG_FILE_NAMES @@ -298,7 +280,6 @@ HAVE_SOCKETS HAVE_SOUND HAVE_SOUNDCARD_H -HAVE_SPEED_T HAVE_STDINT_H HAVE_STDIO_EXT_H HAVE_STDLIB_H === modified file 'configure.ac' --- configure.ac 2013-07-02 02:17:12 +0000 +++ configure.ac 2013-07-02 16:56:29 +0000 @@ -1254,7 +1254,7 @@ if test "${with_sound}" != "no"; then # Sound support for GNU/Linux, the free BSDs, and MinGW. - AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h mmsystem.h, + AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h soundcard.h], have_sound_header=yes, [], [ #ifdef __MINGW32__ #define WIN32_LEAN_AND_MEAN @@ -1311,7 +1311,7 @@ dnl checks for header files AC_CHECK_HEADERS_ONCE( - linux/version.h sys/systeminfo.h + sys/systeminfo.h coff.h pty.h sys/resource.h sys/utsname.h pwd.h utmp.h util.h) @@ -1337,22 +1337,9 @@ # For Tru64, at least: AC_CHECK_DECLS([__sys_siglist], [], [], [[#include ]]) - if test $ac_cv_have_decl___sys_siglist = yes; then - AC_DEFINE(sys_siglist, __sys_siglist, - [Define to any substitute for sys_siglist.]) - fi fi AC_HEADER_SYS_WAIT -dnl Check for speed_t typedef. -AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[speed_t x = 1;]])], - emacs_cv_speed_t=yes, emacs_cv_speed_t=no)]) -if test $emacs_cv_speed_t = yes; then - AC_DEFINE(HAVE_SPEED_T, 1, - [Define to 1 if `speed_t' is declared by .]) -fi - AC_CHECK_HEADERS_ONCE(sys/socket.h) AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT #if HAVE_SYS_SOCKET_H @@ -1870,8 +1857,7 @@ LIBS="$LIBS_SYSTEM $LIBS" -dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks, -dnl and also adds -ldnet to LIBS, which Autoconf uses for checks. +dnl If found, this adds -ldnet to LIBS, which Autoconf uses for checks. AC_CHECK_LIB(dnet, dnet_ntoa) dnl This causes -lresolv to get used in subsequent tests, dnl which causes failures on some systems such as HPUX 9. @@ -2305,28 +2291,18 @@ AC_SUBST(LIBSELINUX_LIBS) HAVE_GNUTLS=no -HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no if test "${with_gnutls}" = "yes" ; then PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.6.6], HAVE_GNUTLS=yes, HAVE_GNUTLS=no) if test "${HAVE_GNUTLS}" = "yes"; then AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.]) fi - OLD_CFLAGS=$CFLAGS - OLD_LIBS=$LIBS - CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" - LIBS="$LIBGNUTLS_LIBS $LIBS" - AC_CHECK_FUNCS(gnutls_certificate_set_verify_function, HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes) - - if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then - AC_DEFINE(HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY, 1, [Define if using GnuTLS certificate verification callbacks.]) - fi - # Windows loads GnuTLS dynamically if test "${opsys}" = "mingw32"; then - CFLAGS=$OLD_CFLAGS - LIBS=$OLD_LIBS LIBGNUTLS_LIBS= + else + CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" + LIBS="$LIBGNUTLS_LIBS $LIBS" fi fi @@ -3265,7 +3241,7 @@ getrusage get_current_dir_name \ lrand48 \ select getpagesize setlocale \ -utimes getrlimit setrlimit shutdown getaddrinfo \ +getrlimit setrlimit shutdown getaddrinfo \ strsignal setitimer \ sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ gai_strerror mkstemp getline getdelim sync \ @@ -3477,8 +3453,6 @@ hesiod=yes, :, $RESOLVLIB)]) if test x"$hesiod" = xyes; then - AC_DEFINE(HAVE_LIBHESIOD, 1, - [Define to 1 if you have the hesiod library (-lhesiod).]) LIBHESIOD=-lhesiod fi fi @@ -3486,8 +3460,6 @@ # Do we need libresolv (due to res_init or Hesiod)? if test "$resolv" = yes && test $opsys != darwin; then - AC_DEFINE(HAVE_LIBRESOLV, 1, - [Define to 1 if you have the resolv library (-lresolv).]) LIBRESOLV=-lresolv else LIBRESOLV= @@ -3506,25 +3478,21 @@ if test $have_com_err = yes; then COM_ERRLIB=-lcom_err LIBS="$COM_ERRLIB $LIBS" - AC_DEFINE(HAVE_LIBCOM_ERR, 1, [Define to 1 if you have the `com_err' library (-lcom_err).]) fi AC_CHECK_LIB(crypto, mit_des_cbc_encrypt, have_crypto=yes, have_crypto=no) if test $have_crypto = yes; then CRYPTOLIB=-lcrypto LIBS="$CRYPTOLIB $LIBS" - AC_DEFINE(HAVE_LIBCRYPTO, 1, [Define to 1 if you have the `crypto' library (-lcrypto).]) fi AC_CHECK_LIB(k5crypto, mit_des_cbc_encrypt, have_k5crypto=yes, have_k5crypto=no) if test $have_k5crypto = yes; then CRYPTOLIB=-lk5crypto LIBS="$CRYPTOLIB $LIBS" - AC_DEFINE(HAVE_LIBK5CRYPTO, 1, [Define to 1 if you have the `k5crypto' library (-lk5crypto).]) fi AC_CHECK_LIB(krb5, krb5_init_context, have_krb5=yes, have_krb5=no) if test $have_krb5=yes; then KRB5LIB=-lkrb5 LIBS="$KRB5LIB $LIBS" - AC_DEFINE(HAVE_LIBKRB5, 1, [Define to 1 if you have the `krb5' library (-lkrb5).]) fi dnl FIXME Simplify. Does not match 22 logic, thanks to default_off? if test "${with_kerberos5}" = no; then @@ -3532,26 +3500,22 @@ if test $have_des425 = yes; then DESLIB=-ldes425 LIBS="$DESLIB $LIBS" - AC_DEFINE(HAVE_LIBDES425, 1, [Define to 1 if you have the `des425' library (-ldes425).]) else AC_CHECK_LIB(des, des_cbc_encrypt, have_des=yes, have_des=no) if test $have_des = yes; then DESLIB=-ldes LIBS="$DESLIB $LIBS" - AC_DEFINE(HAVE_LIBDES, 1, [Define to 1 if you have the `des' library (-ldes).]) fi fi AC_CHECK_LIB(krb4, krb_get_cred, have_krb4=yes, have_krb4=no) if test $have_krb4 = yes; then KRB4LIB=-lkrb4 LIBS="$KRB4LIB $LIBS" - AC_DEFINE(HAVE_LIBKRB4, 1, [Define to 1 if you have the `krb4' library (-lkrb4).]) else AC_CHECK_LIB(krb, krb_get_cred, have_krb=yes, have_krb=no) if test $have_krb = yes; then KRB4LIB=-lkrb LIBS="$KRB4LIB $LIBS" - AC_DEFINE(HAVE_LIBKRB, 1, [Define to 1 if you have the `krb' library (-lkrb).]) fi fi fi @@ -3561,9 +3525,6 @@ [AC_CHECK_MEMBERS([krb5_error.text, krb5_error.e_text],,, [#include ])]) else - AC_CHECK_HEADERS(des.h,, - [AC_CHECK_HEADERS(kerberosIV/des.h,, - [AC_CHECK_HEADERS(kerberos/des.h)])]) AC_CHECK_HEADERS(krb.h,, [AC_CHECK_HEADERS(kerberosIV/krb.h,, [AC_CHECK_HEADERS(kerberos/krb.h)])]) @@ -3629,19 +3590,6 @@ [Define to 1 if you have inet sockets.]) fi -if test -f /usr/lpp/X11/bin/smt.exp; then - AC_DEFINE(HAVE_AIX_SMT_EXP, 1, - [Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists.]) -fi - -AC_MSG_CHECKING(whether system supports dynamic ptys) -if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_DEV_PTMX, 1, [Define to 1 if dynamic ptys are supported.]) -else - AC_MSG_RESULT(no) -fi - dnl Check for a Solaris 2.4 vfork bug that Autoconf misses (through 2.69). dnl This can be removed once we assume Autoconf 2.70. case $canonical in @@ -3761,11 +3709,8 @@ AC_DEFINE(DIRECTORY_SEP, ['/'], [Character that separates directories in a file name.]) -AH_TEMPLATE(DEVICE_SEP, [Character that separates a device in a file name.]) if test "${opsys}" = "mingw32"; then - dnl Only used on MS platforms. - AC_DEFINE(DEVICE_SEP, ':') - AC_DEFINE(IS_DEVICE_SEP(_c_), [((_c_) == DEVICE_SEP)], + AC_DEFINE(IS_DEVICE_SEP(_c_), [((_c_) == ':')], [Returns true if character is a device separator.]) AC_DEFINE(IS_DIRECTORY_SEP(_c_), [((_c_) == '/' || (_c_) == '\\')], @@ -4229,13 +4174,11 @@ AH_TEMPLATE(DOS_NT, [Define if the system is MS DOS or MS Windows.]) AH_TEMPLATE(MSDOS, [Define if the system is MS DOS.]) AH_TEMPLATE(USG, [Define if the system is compatible with System III.]) -AH_TEMPLATE(USG5, [Define if the system is compatible with System V.]) AH_TEMPLATE(USG5_4, [Define if the system is compatible with System V Release 4.]) case $opsys in aix4-2) AC_DEFINE(USG, []) - AC_DEFINE(USG5, []) dnl This symbol should be defined on AIX Version 3 ??????? AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ #ifndef _AIX @@ -4262,13 +4205,11 @@ hpux*) AC_DEFINE(USG, []) - AC_DEFINE(USG5, []) AC_DEFINE(HPUX, [], [Define if the system is HPUX.]) ;; irix6-5) AC_DEFINE(USG, []) - AC_DEFINE(USG5, []) AC_DEFINE(USG5_4, []) AC_DEFINE(IRIX6_5, [], [Define if the system is IRIX.]) ;; @@ -4283,14 +4224,12 @@ sol2*) AC_DEFINE(USG, []) - AC_DEFINE(USG5, []) AC_DEFINE(USG5_4, []) AC_DEFINE(SOLARIS2, [], [Define if the system is Solaris.]) ;; unixware) AC_DEFINE(USG, []) - AC_DEFINE(USG5, []) AC_DEFINE(USG5_4, []) ;; esac === modified file 'lib-src/Makefile.in' --- lib-src/Makefile.in 2013-05-29 16:48:42 +0000 +++ lib-src/Makefile.in 2013-07-02 16:56:29 +0000 @@ -146,17 +146,17 @@ ## Empty if either MAIL_USE_FLOCK or MAIL_USE_LOCKF, else need-blessmail. BLESSMAIL_TARGET=@BLESSMAIL_TARGET@ -## -lkrb if HAVE_LIBKRB or -lkrb4 if HAVE_LIBKRB4 +## -lkrb or -lkrb4 if needed KRB4LIB=@KRB4LIB@ -## -ldes if HAVE_LIBDES or -ldes425 if HAVE_LIBDES425 +## -ldes or -ldes425 if needed DESLIB=@DESLIB@ -## -lkrb5 if HAVE_LIBKRB5 +## -lkrb5 if needed KRB5LIB=@KRB5LIB@ -## -lk5crypto if HAVE_LIBK5CRYPTO or -lcrypto if HAVE_LIBCRYPTO +## -lk5crypto or -lcrypto if needed CRYPTOLIB=@CRYPTOLIB@ -## -lcom_err if HAVE_LIBCOM_ERR +## -lcom_err if needed COM_ERRLIB=@COM_ERRLIB@ -## -lhesiod if HAVE_LIBHESIOD +## -lhesiod if needed LIBHESIOD=@LIBHESIOD@ ## -lresolv if HAVE_LIBRESOLV LIBRESOLV=@LIBRESOLV@ === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-02 15:52:07 +0000 +++ src/ChangeLog 2013-07-02 16:56:29 +0000 @@ -1,3 +1,8 @@ +2013-07-02 Paul Eggert + + * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]: + Define to __sys_siglist. + 2013-07-02 Eli Zaretskii * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow === modified file 'src/sysdep.c' --- src/sysdep.c 2013-06-23 18:18:47 +0000 +++ src/sysdep.c 2013-07-02 16:56:29 +0000 @@ -1630,6 +1630,8 @@ # undef sys_siglist # ifdef _sys_siglist # define sys_siglist _sys_siglist +# elif defined HAVE_DECL___SYS_SIGLIST +# define sys_siglist __sys_siglist # else # define sys_siglist my_sys_siglist static char const *sys_siglist[NSIG]; ------------------------------------------------------------ revno: 113261 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-07-02 19:45:28 +0300 message: Improve commentary for glyph.charpos and glyph.object. diff: === modified file 'src/dispextern.h' --- src/dispextern.h 2013-06-28 02:37:23 +0000 +++ src/dispextern.h 2013-07-02 16:45:28 +0000 @@ -365,21 +365,26 @@ struct glyph { /* Position from which this glyph was drawn. If `object' below is a - Lisp string, this is a position in that string. If it is a - buffer, this is a position in that buffer. A value of -1 - together with a null object means glyph is a truncation glyph at - the start of a row. Right truncation and continuation glyphs at - the right edge of a row have their position set to the next - buffer position that is not shown on this row. Glyphs inserted - by redisplay, such as the empty space after the end of a line on - TTYs, or the overlay-arrow on a TTY, have this set to -1. */ + Lisp string, this is an index into that string. If it is a + buffer, this is a position in that buffer. In addition, some + special glyphs have special values for this: + + glyph standing for newline at end of line 0 + empty space after the end of the line -1 + overlay arrow on a TTY -1 + glyph at EOB that ends in a newline -1 + left truncation glyphs: -1 + right truncation/continuation glyphs next buffer position + glyph standing for newline of an empty line buffer position of newline + stretch glyph at left edge of R2L lines buffer position of newline */ ptrdiff_t charpos; /* Lisp object source of this glyph. Currently either a buffer or a string, if the glyph was produced from characters which came from - a buffer or a string; or 0 if the glyph was inserted by redisplay - for its own purposes, such as padding or truncation/continuation - glyphs, or the overlay-arrow glyphs on TTYs. */ + a buffer or a string; or Lisp integer zero (a.k.a. "null object") + if the glyph was inserted by redisplay for its own purposes, such + as padding or truncation/continuation glyphs, or the + overlay-arrow glyphs on TTYs. */ Lisp_Object object; /* Width in pixels. */ ------------------------------------------------------------ revno: 113260 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-07-02 19:32:03 +0300 message: Update commentary in w32notify.c. diff: === modified file 'src/w32notify.c' --- src/w32notify.c 2013-06-07 03:23:57 +0000 +++ src/w32notify.c 2013-07-02 16:32:03 +0000 @@ -59,7 +59,7 @@ When the FILE_NOTIFY_EVENT event is processed by keyboard.c's kbd_buffer_get_event, it is converted to a Lispy event that can be - bound to a command. The default binding is w32notify-handle-event, + bound to a command. The default binding is file-notify-handle-event, defined on subr.el. After w32_read_socket or w32_console_read_socket are done ------------------------------------------------------------ revno: 113259 fixes bug: http://debbugs.gnu.org/2749 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-07-02 18:52:07 +0300 message: Fix bug #2749 with overflow-newline-into-fringe in visual-line-mode. src/xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow word-wrap, so that overflow-newline-into-fringe would work in visual-line-mode. (move_it_in_display_line_to): When the last scanned display element fits exactly on the display line, and overflow-newline-into-fringe is non-nil, but wrap_it is valid, don't return MOVE_NEWLINE_OR_CR, but instead back up to the last wrap point and return MOVE_LINE_CONTINUED. Fixes problems with finding buffer position that corresponds to pixel coordinates, e.g. in buffer_posn_from_coords. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-02 12:46:43 +0000 +++ src/ChangeLog 2013-07-02 15:52:07 +0000 @@ -1,3 +1,16 @@ +2013-07-02 Eli Zaretskii + + * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow + word-wrap, so that overflow-newline-into-fringe would work in + visual-line-mode. (Bug#2749) + (move_it_in_display_line_to): When the last scanned display + element fits exactly on the display line, and + overflow-newline-into-fringe is non-nil, but wrap_it is valid, + don't return MOVE_NEWLINE_OR_CR, but instead back up to the last + wrap point and return MOVE_LINE_CONTINUED. Fixes problems with + finding buffer position that corresponds to pixel coordinates, + e.g. in buffer_posn_from_coords. + 2013-07-02 Jan Djärv * process.c (handle_child_signal): Call catch_child_signal if === modified file 'src/xdisp.c' --- src/xdisp.c 2013-06-30 22:29:23 +0000 +++ src/xdisp.c 2013-07-02 15:52:07 +0000 @@ -378,8 +378,7 @@ && ((IT)->bidi_it.paragraph_dir == R2L \ ? (WINDOW_LEFT_FRINGE_WIDTH ((IT)->w) > 0) \ : (WINDOW_RIGHT_FRINGE_WIDTH ((IT)->w) > 0)) \ - && (IT)->current_x == (IT)->last_visible_x \ - && (IT)->line_wrap != WORD_WRAP) + && (IT)->current_x == (IT)->last_visible_x) #else /* !HAVE_WINDOW_SYSTEM */ #define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it) 0 @@ -8539,7 +8538,9 @@ result = MOVE_LINE_CONTINUED; break; } - if (ITERATOR_AT_END_OF_LINE_P (it)) + if (ITERATOR_AT_END_OF_LINE_P (it) + && (it->line_wrap != WORD_WRAP + || wrap_it.sp < 0)) { result = MOVE_NEWLINE_OR_CR; break; ------------------------------------------------------------ revno: 113258 committer: Jan D. branch nick: trunk timestamp: Tue 2013-07-02 14:46:43 +0200 message: * process.c (handle_child_signal): Call catch_child_signal if NS_IMPL_GNUSTEP. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-02 03:41:16 +0000 +++ src/ChangeLog 2013-07-02 12:46:43 +0000 @@ -1,3 +1,8 @@ +2013-07-02 Jan Djärv + + * process.c (handle_child_signal): Call catch_child_signal if + NS_IMPL_GNUSTEP. + 2013-07-02 Paul Eggert Don't convert function pointers to void * and back. === modified file 'src/process.c' --- src/process.c 2013-07-01 21:06:12 +0000 +++ src/process.c 2013-07-02 12:46:43 +0000 @@ -6210,6 +6210,11 @@ } lib_child_handler (sig); +#ifdef NS_IMPL_GNUSTEP + /* NSTask in GNUStep sets its child handler each time it is called. + So we must re-set ours. */ + catch_child_signal(); +#endif } static void ------------------------------------------------------------ revno: 113257 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2013-07-02 10:38:58 +0000 message: Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-06-24 06:58:52 +0000 +++ doc/misc/ChangeLog 2013-07-02 10:38:58 +0000 @@ -1,3 +1,8 @@ +2013-07-02 Lars Magne Ingebrigtsen + + * gnus.texi (Client-Side IMAP Splitting): + Note that `nnimap-inbox' now can be a list. + 2013-06-24 Glenn Morris * eshell.texi: Fix cross-references to other manuals. === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2013-06-04 08:43:07 +0000 +++ doc/misc/gnus.texi 2013-07-02 10:38:58 +0000 @@ -14240,7 +14240,8 @@ @table @code @item nnimap-inbox -This is the @acronym{IMAP} mail box that will be scanned for new mail. +This is the @acronym{IMAP} mail box that will be scanned for new +mail. This can also be a list of mail box names. @item nnimap-split-methods Uses the same syntax as @code{nnmail-split-methods} (@pxref{Splitting === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-07-02 02:34:12 +0000 +++ lisp/gnus/ChangeLog 2013-07-02 10:38:58 +0000 @@ -1,3 +1,157 @@ +2013-07-02 David Engster + + * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' + ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag + to see whether the group was synced before. + +2013-07-02 Martin Stjernholm + + * nnimap.el (nnimap-request-move-article): Decode the group name when + doing internal moves to avoid charset issues. + +2013-07-02 Julien Danjou + + * nnimap.el (nnimap-request-list): + Revert change that made listing synchronous. + (nnimap-get-responses): Restore. + +2013-07-02 Dave Abrahams + + * nnimap.el (nnimap-change-group): Document result value. + + * nnimap.el (nnimap-find-article-by-message-id): + Account for the fact that nnimap-change-group can return t. + +2013-07-02 Julien Danjou + + * nnimap.el (nnimap-request-head): + Resture to-buffer parameter, used by `nnimap-request-move-article'. + + * nnimap.el (nnimap-request-head): Remove to-buffer argument. + + * gnus-int.el (gnus-request-head): Remove to-buffer argument, only + supported by nnimap actually. Reverts previous change. + + * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter + to mimic `gnus-request-article' and enjoy backends the nn*-request-head + to-buffer argument that is already supported. + +2013-07-02 Julien Danjou + + * nnimap.el (nnimap-get-responses): Remove, unused. + +2013-07-02 Julien Danjou + + * nnimap.el (nnimap-request-articles-find-limit): Rename from + `nnimap-request-move-articles-find-limit' since we do not use it + only for move operations. + (nnimap-request-accept-article): + Use `nnimap-request-articles-find-limit' to limit search by message-id. + +2013-07-02 Julien Danjou + + * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. + + * nnimap.el (nnimap-log-buffer): + Check that `window-point-insertion-type' is boundp, since it's not + available in XEmacs. + +2013-07-02 Michael Welsh Duggan + + * nnimap.el (nnimap-log-buffer): + Add this, setting `window-point-insertion-type' in the buffer to t. + (nnimap-log-command): Use nnimap-log-buffer. + +2013-07-02 Julien Danjou + + * nnimap.el (nnimap-find-article-by-message-id): + Add an optional limit argument to be able to limit the search. + (nnimap-request-move-article): + Use `nnimap-request-move-articles-find-limit'. + (nnimap-request-move-articles-find-limit): + Add this to limit the search by Message-Id after a message move. + (nnimap): Add defgroup. + +2013-07-02 Julien Danjou + + * nnimap.el (nnimap-find-article-by-message-id): + Use `nnimap-possibly-change-group' rather than its own EXAMINE call. + (nnimap-possibly-change-group): Add read-only argument. + (nnimap-request-list): Use nnimap-possibly-change-group rather than + issuing EXAMINE manually. + (nnimap-find-article-by-message-id): + Use `nnimap-possibly-change-group' with read-only argument. + (nnimap-change-group): Rename from `nnimap-possibly-change-group'. + We cannot possibly change because we need to be sure that it's either + read-write or read-only. + +2013-07-02 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-insert-old-articles): + Don't include unexistent messages. + +2013-07-02 Lars Magne Ingebrigtsen + + * gnus-start.el (gnus-clean-old-newsrc): + Remove totally bogus `unexists' entries. + (gnus-clean-old-newsrc): Fix last checkin. + + * nnimap.el (nnimap-update-info): + None of the articles below the active low-water mark exist. + +2013-07-02 Katsumi Yamaoka + + * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. + +2013-07-02 Sergio Martinez (tiny change) + + * nnimap.el (nnimap-request-scan): + Allow `nnimap-inbox' to be a list of inboxes. + +2013-07-02 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-group-expire-articles-1): + Don't try to expire messages that don't exist. + + * gnus-sum.el (gnus-summary-expire-articles): Ditto. + +2013-07-02 Lars Ingebrigtsen + + * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. + +2013-07-02 Lars Ingebrigtsen + + * gnus-start.el (gnus-clean-old-newsrc): + Delete `unexist' from pre-Ma Gnus 0.3. + +2013-07-02 Lars Ingebrigtsen + + * gnus-sum.el (gnus-summary-local-variables): + Make `gnus-newsgroup-unexist' into a local variable. + +2013-07-02 Lars Ingebrigtsen + + * gnus-sum.el (gnus-adjust-marked-articles): + Add to `gnus-newsgroup-unexist'. + + * gnus.el (gnus-article-mark-lists): + Add `unexist' to the list of marks. + (gnus-article-special-mark-lists): + Put the `unexist' in the special marks list instead. + + * gnus-sum.el (gnus-articles-to-read): Don't include unexisting + articles in the list of articles to be selected. + + * nnimap.el (nnimap-retrieve-group-data-early): + Query for unexisting articles. + (nnimap-update-info): Keep track of unexisting articles. + (nnimap-update-qresync-info): Ditto. + +2013-07-02 Lars Ingebrigtsen + + * gnus-start.el (gnus-clean-old-newsrc): New function. + (gnus-read-newsrc-file): Use it. + 2013-07-02 Daiki Ueno * mml2015.el (mml2015-epg-key-image): Use 'gnus-create-image' instead === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2013-06-19 07:23:06 +0000 +++ lisp/gnus/gnus-group.el 2013-07-02 10:38:58 +0000 @@ -3654,6 +3654,10 @@ (expirable (if (gnus-group-total-expirable-p group) (cons nil (gnus-list-of-read-articles group)) (assq 'expire (gnus-info-marks info)))) + (articles-to-expire + (gnus-list-range-difference + (gnus-uncompress-sequence (cdr expirable)) + (cdr (assq 'unexist (gnus-info-marks info))))) (expiry-wait (gnus-group-find-parameter group 'expiry-wait)) (nnmail-expiry-target (or (gnus-group-find-parameter group 'expiry-target) @@ -3668,11 +3672,9 @@ ;; parameter. (let ((nnmail-expiry-wait-function nil) (nnmail-expiry-wait expiry-wait)) - (gnus-request-expire-articles - (gnus-uncompress-sequence (cdr expirable)) group)) + (gnus-request-expire-articles articles-to-expire group)) ;; Just expire using the normal expiry values. - (gnus-request-expire-articles - (gnus-uncompress-sequence (cdr expirable)) group)))) + (gnus-request-expire-articles articles-to-expire group)))) (gnus-close-group group)) (gnus-message 6 "Expiring articles in %s...done" (gnus-group-decoded-name group)) === modified file 'lisp/gnus/gnus-start.el' --- lisp/gnus/gnus-start.el 2013-02-13 04:31:09 +0000 +++ lisp/gnus/gnus-start.el 2013-07-02 10:38:58 +0000 @@ -2301,7 +2301,27 @@ (gnus-message 5 "Reading %s...done" newsrc-file))) ;; Convert old to new. - (gnus-convert-old-newsrc)))) + (gnus-convert-old-newsrc) + (gnus-clean-old-newsrc)))) + +(defun gnus-clean-old-newsrc (&optional force) + (when gnus-newsrc-file-version + ;; Remove totally bogus `unexists' entries. The name is + ;; `unexist'. + (dolist (info (cdr gnus-newsrc-alist)) + (let ((exist (assoc 'unexists (gnus-info-marks info)))) + (when exist + (gnus-info-set-marks + info (delete exist (gnus-info-marks info)))))) + (when (or force + (< (gnus-continuum-version gnus-newsrc-file-version) + (gnus-continuum-version "Ma Gnus v0.03"))) + ;; Remove old `exist' marks from old nnimap groups. + (dolist (info (cdr gnus-newsrc-alist)) + (let ((exist (assoc 'unexist (gnus-info-marks info)))) + (when exist + (gnus-info-set-marks + info (delete exist (gnus-info-marks info))))))))) (defun gnus-convert-old-newsrc () "Convert old newsrc formats into the current format, if needed." === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2013-05-29 02:40:43 +0000 +++ lisp/gnus/gnus-sum.el 2013-07-02 10:38:58 +0000 @@ -1524,6 +1524,9 @@ (defvar gnus-newsgroup-seen nil "Range of seen articles in the current newsgroup.") +(defvar gnus-newsgroup-unexist nil + "Range of unexistent articles in the current newsgroup.") + (defvar gnus-newsgroup-articles nil "List of articles in the current newsgroup.") @@ -1571,6 +1574,7 @@ gnus-newsgroup-killed gnus-newsgroup-unseen gnus-newsgroup-seen + gnus-newsgroup-unexist gnus-newsgroup-cached gnus-newsgroup-downloadable gnus-newsgroup-undownloaded @@ -5789,6 +5793,7 @@ "Find out what articles the user wants to read." (let* ((only-read-p t) (articles + (gnus-list-range-difference ;; Select all articles if `read-all' is non-nil, or if there ;; are no unread articles. (if (or read-all @@ -5815,7 +5820,8 @@ (setq only-read-p nil) (gnus-sorted-nunion (gnus-sorted-union gnus-newsgroup-dormant gnus-newsgroup-marked) - gnus-newsgroup-unreads))) + gnus-newsgroup-unreads)) + (cdr (assq 'unexist (gnus-info-marks (gnus-get-info group)))))) (scored-list (gnus-killed-articles gnus-newsgroup-killed articles)) (scored (length scored-list)) (number (length articles)) @@ -5985,7 +5991,9 @@ (and (numberp (car articles)) (> min (car articles))))) (pop articles)) - (set var articles)))))))) + (set var articles)) + ((eq mark 'unexist) + (set var (cdr marks))))))))) (defun gnus-update-missing-marks (missing) "Go through the list of MISSING articles and remove them from the mark lists." @@ -6061,7 +6069,8 @@ (gnus-active gnus-newsgroup-name) del)) (push (list del 'del (list (cdr type))) delta-marks)))) - (when list + (when (or list + (eq (cdr type) 'unexist)) (push (cons (cdr type) list) newmarked))) (when delta-marks @@ -10305,16 +10314,19 @@ 'request-expire-articles gnus-newsgroup-name)) ;; This backend supports expiry. (let* ((total (gnus-group-total-expirable-p gnus-newsgroup-name)) - (expirable (if total - (progn - ;; We need to update the info for - ;; this group for `gnus-list-of-read-articles' - ;; to give us the right answer. - (gnus-run-hooks 'gnus-exit-group-hook) - (gnus-summary-update-info) - (gnus-list-of-read-articles gnus-newsgroup-name)) - (setq gnus-newsgroup-expirable - (sort gnus-newsgroup-expirable '<)))) + (expirable + (gnus-list-range-difference + (if total + (progn + ;; We need to update the info for + ;; this group for `gnus-list-of-read-articles' + ;; to give us the right answer. + (gnus-run-hooks 'gnus-exit-group-hook) + (gnus-summary-update-info) + (gnus-list-of-read-articles gnus-newsgroup-name)) + (setq gnus-newsgroup-expirable + (sort gnus-newsgroup-expirable '<))) + gnus-newsgroup-unexist)) (expiry-wait (if now 'immediate (gnus-group-find-parameter gnus-newsgroup-name 'expiry-wait))) @@ -12847,7 +12859,9 @@ ;; Some nntp servers lie about their active range. When ;; this happens, the active range can be in the millions. ;; Use a compressed range to avoid creating a huge list. - (gnus-range-difference (list gnus-newsgroup-active) old)) + (gnus-range-difference + (gnus-range-difference (list gnus-newsgroup-active) old) + gnus-newsgroup-unexist)) (setq len (gnus-range-length older)) (cond ((null older) nil) === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2013-05-29 02:40:43 +0000 +++ lisp/gnus/gnus.el 2013-07-02 10:38:58 +0000 @@ -2636,10 +2636,11 @@ (scored . score) (saved . save) (cached . cache) (downloadable . download) (unsendable . unsend) (forwarded . forward) - (seen . seen))) + (seen . seen) (unexist . unexist))) (defconst gnus-article-special-mark-lists '((seen range) + (unexist range) (killed range) (bookmark tuple) (uid tuple) @@ -2654,7 +2655,7 @@ ;; `score' is not a proper mark ;; `bookmark': don't propagated it, or fix the bug in update-mark. (defconst gnus-article-unpropagated-mark-lists - '(seen cache download unsend score bookmark) + '(seen cache download unsend score bookmark unexist) "Marks that shouldn't be propagated to back ends. Typical marks are those that make no sense in a standalone back end, such as a mark that says whether an article is stored in the cache === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2013-05-29 02:40:43 +0000 +++ lisp/gnus/nnimap.el 2013-07-02 10:38:58 +0000 @@ -82,7 +82,8 @@ (defvoo nnimap-inbox nil "The mail box where incoming mail arrives and should be split out of. -For example, \"INBOX\".") +This can be a string or a list of strings +For example, \"INBOX\" or (\"INBOX\" \"SENT\").") (defvoo nnimap-split-methods nil "How mail is split. @@ -123,6 +124,16 @@ likely value would be \"text/\" to automatically fetch all textual parts.") +(defgroup nnimap nil + "IMAP for Gnus." + :group 'gnus) + +(defcustom nnimap-request-articles-find-limit nil + "Limit the number of articles to look for after moving an article." + :type 'integer + :version "24.3" + :group 'nnimap) + (defvar nnimap-process nil) (defvar nnimap-status-string "") @@ -173,7 +184,7 @@ (setq group (nnimap-decode-gnus-group group))) (with-current-buffer nntp-server-buffer (erase-buffer) - (when (nnimap-possibly-change-group group server) + (when (nnimap-change-group group server) (with-current-buffer (nnimap-buffer) (erase-buffer) (nnimap-wait-for-response @@ -567,10 +578,10 @@ (when group (setq group (nnimap-decode-gnus-group group))) (with-current-buffer nntp-server-buffer - (let ((result (nnimap-possibly-change-group group server)) + (let ((result (nnimap-change-group group server)) parts structure) (when (stringp article) - (setq article (nnimap-find-article-by-message-id group article))) + (setq article (nnimap-find-article-by-message-id group server article))) (when (and result article) (erase-buffer) @@ -599,10 +610,10 @@ (deffoo nnimap-request-head (article &optional group server to-buffer) (when group (setq group (nnimap-decode-gnus-group group))) - (when (nnimap-possibly-change-group group server) + (when (nnimap-change-group group server) (with-current-buffer (nnimap-buffer) (when (stringp article) - (setq article (nnimap-find-article-by-message-id group article))) + (setq article (nnimap-find-article-by-message-id group server article))) (if (null article) nil (nnimap-get-whole-article @@ -751,7 +762,7 @@ (deffoo nnimap-request-group (group &optional server dont-check info) (setq group (nnimap-decode-gnus-group group)) - (let ((result (nnimap-possibly-change-group + (let ((result (nnimap-change-group ;; Don't SELECT the group if we're going to select it ;; later, anyway. (if (and (not dont-check) @@ -801,19 +812,19 @@ (deffoo nnimap-request-create-group (group &optional server args) (setq group (nnimap-decode-gnus-group group)) - (when (nnimap-possibly-change-group nil server) + (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) (setq group (nnimap-decode-gnus-group group)) - (when (nnimap-possibly-change-group nil server) + (when (nnimap-change-group nil server) (with-current-buffer (nnimap-buffer) (car (nnimap-command "DELETE %S" (utf7-encode group t)))))) (deffoo nnimap-request-rename-group (group new-name &optional server) (setq group (nnimap-decode-gnus-group group)) - (when (nnimap-possibly-change-group nil server) + (when (nnimap-change-group nil server) (with-current-buffer (nnimap-buffer) (nnimap-unselect-group) (car (nnimap-command "RENAME %S %S" @@ -828,7 +839,7 @@ (deffoo nnimap-request-expunge-group (group &optional server) (setq group (nnimap-decode-gnus-group group)) - (when (nnimap-possibly-change-group group server) + (when (nnimap-change-group group server) (with-current-buffer (nnimap-buffer) (car (nnimap-command "EXPUNGE"))))) @@ -856,6 +867,8 @@ (deffoo nnimap-request-move-article (article group server accept-form &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))) (with-temp-buffer (mm-disable-multibyte) (when (funcall (if internal-move-group @@ -876,11 +889,12 @@ (cons internal-move-group (or (nnimap-find-uid-response "COPYUID" (cadr result)) (nnimap-find-article-by-message-id - internal-move-group message-id))))) + internal-move-group server message-id + nnimap-request-articles-find-limit))))) ;; Move the article to a different method. (let ((result (eval accept-form))) (when result - (nnimap-possibly-change-group group server) + (nnimap-change-group group server) (nnimap-delete-article article) result))))))) @@ -889,7 +903,7 @@ (cond ((null articles) nil) - ((not (nnimap-possibly-change-group group server)) + ((not (nnimap-change-group group server)) articles) ((and force (eq nnmail-expiry-target 'delete)) @@ -926,7 +940,7 @@ (gnus-server-equal (gnus-group-method nnmail-expiry-target) (gnus-server-to-method (format "nnimap:%s" server)))) - (and (nnimap-possibly-change-group group server) + (and (nnimap-change-group group server) (with-current-buffer (nnimap-buffer) (nnheader-message 7 "Expiring articles from %s: %s" group articles) (nnimap-command @@ -956,7 +970,7 @@ (when target (push article deleted-articles)))))))) ;; Change back to the current group again. - (nnimap-possibly-change-group group server) + (nnimap-change-group group server) (setq deleted-articles (nreverse deleted-articles)) (nnimap-delete-article (gnus-compress-sequence deleted-articles)) deleted-articles)) @@ -978,23 +992,37 @@ (cdr (assoc "SEARCH" (cdr result)))))))))) -(defun nnimap-find-article-by-message-id (group message-id) +(defun nnimap-find-article-by-message-id (group server message-id + &optional limit) + "Search for message with MESSAGE-ID in GROUP from SERVER. +If LIMIT, first try to limit the search to the N last articles." (with-current-buffer (nnimap-buffer) (erase-buffer) - (unless (or (not group) (equal group (nnimap-group nnimap-object))) - (setf (nnimap-group nnimap-object) nil) - (setf (nnimap-examined nnimap-object) group) - (nnimap-send-command "EXAMINE %S" (utf7-encode group t))) - (let ((sequence - (nnimap-send-command "UID SEARCH HEADER Message-Id %S" message-id)) - article result) - (setq result (nnimap-wait-for-response sequence)) - (when (and result - (car (setq result (nnimap-parse-response)))) - ;; Select the last instance of the message in the group. - (and (setq article - (car (last (cdr (assoc "SEARCH" (cdr result)))))) - (string-to-number article)))))) + (let* ((change-group-result (nnimap-change-group group server nil t)) + (number-of-article + (and (listp change-group-result) + (catch 'found + (dolist (result (cdr change-group-result)) + (when (equal "EXISTS" (cadr result)) + (throw 'found (car result))))))) + (sequence + (nnimap-send-command + "UID SEARCH%s HEADER Message-Id %S" + (if (and limit number-of-article) + ;; The -1 is because IMAP message + ;; numbers are one-based rather than + ;; zero-based. + (format " %s:*" (- (string-to-number number-of-article) + limit -1)) + "") + message-id))) + (when (nnimap-wait-for-response sequence) + (let ((article (car (last (cdr (assoc "SEARCH" + (nnimap-parse-response))))))) + (if article + (string-to-number article) + (when (and limit number-of-article) + (nnimap-find-article-by-message-id group server message-id)))))))) (defun nnimap-delete-article (articles) (with-current-buffer (nnimap-buffer) @@ -1015,11 +1043,14 @@ (deffoo nnimap-request-scan (&optional group server) (when group (setq group (nnimap-decode-gnus-group group))) - (when (and (nnimap-possibly-change-group nil server) + (when (and (nnimap-change-group nil server) nnimap-inbox nnimap-split-methods) (nnheader-message 7 "nnimap %s splitting mail..." server) - (nnimap-split-incoming-mail) + (if (listp nnimap-inbox) + (dolist (nnimap-inbox nnimap-inbox) + (nnimap-split-incoming-mail)) + (nnimap-split-incoming-mail)) (nnheader-message 7 "nnimap %s splitting mail...done" server))) (defun nnimap-marks-to-flags (marks) @@ -1031,7 +1062,7 @@ (deffoo nnimap-request-update-group-status (group status &optional server) (setq group (nnimap-decode-gnus-group group)) - (when (nnimap-possibly-change-group nil server) + (when (nnimap-change-group nil server) (let ((command (assoc status '((subscribe "SUBSCRIBE") @@ -1042,7 +1073,7 @@ (deffoo nnimap-request-set-mark (group actions &optional server) (setq group (nnimap-decode-gnus-group group)) - (when (nnimap-possibly-change-group group server) + (when (nnimap-change-group group server) (let (sequence) (with-current-buffer (nnimap-buffer) (erase-buffer) @@ -1067,7 +1098,7 @@ (deffoo nnimap-request-accept-article (group &optional server last) (setq group (nnimap-decode-gnus-group group)) - (when (nnimap-possibly-change-group nil server) + (when (nnimap-change-group nil server) (nnmail-check-syntax) (let ((message-id (message-field-value "message-id")) sequence message) @@ -1099,7 +1130,8 @@ (cons group (or (nnimap-find-uid-response "APPENDUID" (car result)) (nnimap-find-article-by-message-id - group message-id)))))))))) + group server message-id + nnimap-request-articles-find-limit)))))))))) (defun nnimap-process-quirk (greeting-match type data) (when (and (nnimap-greeting nnimap-object) @@ -1145,7 +1177,7 @@ (deffoo nnimap-request-replace-article (article group buffer) (setq group (nnimap-decode-gnus-group group)) (let (group-art) - (when (and (nnimap-possibly-change-group group nil) + (when (and (nnimap-change-group group) ;; Put the article into the group. (with-current-buffer buffer (setq group-art @@ -1180,8 +1212,17 @@ groups)))) (nreverse groups))) +(defun nnimap-get-responses (sequences) + (let (responses) + (dolist (sequence sequences) + (goto-char (point-min)) + (when (re-search-forward (format "^%d " sequence) nil t) + (push (list sequence (nnimap-parse-response)) + responses))) + responses)) + (deffoo nnimap-request-list (&optional server) - (when (nnimap-possibly-change-group nil server) + (when (nnimap-change-group nil server) (with-current-buffer nntp-server-buffer (erase-buffer) (let ((groups @@ -1228,7 +1269,7 @@ t))))) (deffoo nnimap-request-newgroups (date &optional server) - (when (nnimap-possibly-change-group nil server) + (when (nnimap-change-group nil server) (with-current-buffer nntp-server-buffer (erase-buffer) (dolist (group (with-current-buffer (nnimap-buffer) @@ -1239,14 +1280,15 @@ t))) (deffoo nnimap-retrieve-group-data-early (server infos) - (when (and (nnimap-possibly-change-group nil server) + (when (and (nnimap-change-group nil server) infos) (with-current-buffer (nnimap-buffer) (erase-buffer) (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 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. (dolist (info infos) @@ -1254,13 +1296,15 @@ group (nnimap-decode-gnus-group (gnus-group-real-name (gnus-info-group info))) active (cdr (assq 'active params)) + unexist (assq 'unexist (gnus-info-marks info)) uidvalidity (cdr (assq 'uidvalidity params)) modseq (cdr (assq 'modseq params))) (setf (nnimap-examined nnimap-object) group) (if (and qresyncp uidvalidity active - modseq) + modseq + unexist) (push (list (nnimap-send-command "EXAMINE %S (%s (%s %s))" (utf7-encode group t) @@ -1279,11 +1323,10 @@ ;; is read-only or not. "SELECT")) start) - (if (and active uidvalidity) + (if (and active uidvalidity unexist) ;; Fetch the last 100 flags. (setq start (max 1 (- (cdr active) 100))) - (setf (nnimap-initial-resync nnimap-object) - (1+ (nnimap-initial-resync nnimap-object))) + (incf (nnimap-initial-resync nnimap-object)) (setq start 1)) (push (list (nnimap-send-command "%s %S" command (utf7-encode group t)) @@ -1303,7 +1346,7 @@ (deffoo nnimap-finish-retrieve-group-infos (server infos sequences) (when (and sequences - (nnimap-possibly-change-group nil server t) + (nnimap-change-group nil server t) ;; Check that the process is still alive. (get-buffer-process (nnimap-buffer)) (memq (process-status (get-buffer-process (nnimap-buffer))) @@ -1462,6 +1505,25 @@ (setq new-marks (gnus-range-nconcat old-marks new-marks))) (when new-marks (push (cons (car type) new-marks) marks))))) + ;; Keep track of non-existing articles. + (let* ((old-unexists (assq 'unexist marks)) + (active (gnus-active group)) + (unexists + (if completep + (gnus-range-difference + active + (gnus-compress-sequence existing)) + (gnus-add-to-range + (cdr old-unexists) + (gnus-list-range-difference + existing (gnus-active group)))))) + (when (> (car active) 1) + (setq unexists (gnus-range-add + (cons 1 (1- (car active))) + unexists))) + (if old-unexists + (setcdr old-unexists unexists) + (push (cons 'unexist unexists) marks))) (gnus-info-set-marks info marks t)))) ;; Tell Gnus whether there are any \Recent messages in any of ;; the groups. @@ -1505,6 +1567,14 @@ (gnus-sorted-complement existing new-marks)))) (when ticks (push (cons (car type) ticks) marks))) + (gnus-info-set-marks info marks t)) + ;; Add vanished to the list of unexisting articles. + (when vanished + (let* ((old-unexists (assq 'unexist marks)) + (unexists (gnus-range-add (cdr old-unexists) vanished))) + (if old-unexists + (setcdr old-unexists unexists) + (push (cons 'unexist unexists) marks))) (gnus-info-set-marks info marks t)))) (defun nnimap-imap-ranges-to-gnus-ranges (irange) @@ -1642,7 +1712,7 @@ (setq nnimap-status-string "Read-only server") nil) -(defvar gnus-refer-thread-use-nnir) ; gnus-sum +(defvar gnus-refer-thread-use-nnir) ;; gnus-sum.el (declare-function gnus-fetch-headers "gnus-sum" (articles &optional limit force-new dependencies)) @@ -1653,7 +1723,7 @@ (setq group (nnimap-decode-gnus-group group))) (if gnus-refer-thread-use-nnir (nnir-search-thread header) - (when (nnimap-possibly-change-group group server) + (when (nnimap-change-group group server) (let* ((cmd (nnimap-make-thread-query header)) (result (with-current-buffer (nnimap-buffer) (nnimap-command "UID SEARCH %s" cmd)))) @@ -1664,7 +1734,14 @@ (cdr (assoc "SEARCH" (cdr result)))))) nil t)))))) -(defun nnimap-possibly-change-group (group server &optional no-reconnect) +(defun nnimap-change-group (group &optional server no-reconnect read-only) + "Change group to GROUP if non-nil. +If SERVER is set, check that server is connected, otherwise retry +to reconnect, unless NO-RECONNECT is set to t. Return nil if +unsuccessful in connecting. +If GROUP is nil, return t. +If READ-ONLY is set, send EXAMINE rather than SELECT to the server. +Return the server's response to the SELECT or EXAMINE command." (let ((open-result t)) (when (and server (not (nnimap-server-opened server))) @@ -1676,13 +1753,15 @@ t) (t (with-current-buffer (nnimap-buffer) - (if (equal group (nnimap-group nnimap-object)) - t - (let ((result (nnimap-command "SELECT %S" (utf7-encode group t)))) - (when (car result) - (setf (nnimap-group nnimap-object) group - (nnimap-select-result nnimap-object) result) - result)))))))) + (let ((result (nnimap-command "%s %S" + (if read-only + "EXAMINE" + "SELECT") + (utf7-encode group t)))) + (when (car result) + (setf (nnimap-group nnimap-object) group + (nnimap-select-result nnimap-object) result) + result))))))) (defun nnimap-find-connection (buffer) "Find the connection delivering to BUFFER." @@ -1718,15 +1797,24 @@ (defvar nnimap-record-commands nil "If non-nil, log commands to the \"*imap log*\" buffer.") +(defun nnimap-log-buffer () + (let ((name "*imap log*")) + (or (get-buffer name) + (with-current-buffer (get-buffer-create name) + (when (boundp 'window-point-insertion-type) + (make-local-variable 'window-point-insertion-type) + (setq window-point-insertion-type t)) + (current-buffer))))) + (defun nnimap-log-command (command) (when nnimap-record-commands - (with-current-buffer (get-buffer-create "*imap log*") + (with-current-buffer (nnimap-log-buffer) (goto-char (point-max)) (insert (format-time-string "%H:%M:%S") - " [" nnimap-address "] " - (if nnimap-inhibit-logging - "(inhibited)\n" - command)))) + " [" nnimap-address "] " + (if nnimap-inhibit-logging + "(inhibited)\n" + command)))) command) (defun nnimap-command (&rest args) @@ -1865,15 +1953,6 @@ (forward-line 1))) (buffer-substring (point) end)))) -(defun nnimap-get-responses (sequences) - (let (responses) - (dolist (sequence sequences) - (goto-char (point-min)) - (when (re-search-forward (format "^%d " sequence) nil t) - (push (list sequence (nnimap-parse-response)) - responses))) - responses)) - (defvar nnimap-incoming-split-list nil) (defun nnimap-fetch-inbox (articles) === modified file 'lisp/gnus/nnir.el' --- lisp/gnus/nnir.el 2013-05-09 01:40:20 +0000 +++ lisp/gnus/nnir.el 2013-07-02 10:38:58 +0000 @@ -288,7 +288,7 @@ (eval-when-compile (autoload 'nnimap-buffer "nnimap") (autoload 'nnimap-command "nnimap") - (autoload 'nnimap-possibly-change-group "nnimap") + (autoload 'nnimap-change-group "nnimap") (autoload 'nnimap-make-thread-query "nnimap") (autoload 'gnus-registry-action "gnus-registry") (autoload 'gnus-registry-get-id-key "gnus-registry") @@ -973,7 +973,7 @@ #'(lambda (group) (let (artlist) (condition-case () - (when (nnimap-possibly-change-group + (when (nnimap-change-group (gnus-group-short-name group) server) (with-current-buffer (nnimap-buffer) (message "Searching %s..." group) ------------------------------------------------------------ revno: 113256 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-07-02 06:17:36 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2013-06-21 10:17:38 +0000 +++ autogen/config.in 2013-07-02 10:17:36 +0000 @@ -590,9 +590,6 @@ /* Define to 1 if you have the `gtk_handle_box_new' function. */ #undef HAVE_GTK_HANDLE_BOX_NEW -/* Define to 1 if you have the `gtk_main' function. */ -#undef HAVE_GTK_MAIN - /* Define to 1 if you have the `gtk_orientable_set_orientation' function. */ #undef HAVE_GTK_ORIENTABLE_SET_ORIENTATION @@ -1703,7 +1700,8 @@ && !defined __APPLE__) # define _GL_INLINE inline # define _GL_EXTERN_INLINE extern inline -#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__ +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined __APPLE__) # if __GNUC_GNU_INLINE__ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) === modified file 'autogen/configure' --- autogen/configure 2013-06-30 18:53:36 +0000 +++ autogen/configure 2013-07-02 10:17:36 +0000 @@ -11455,18 +11455,41 @@ C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" - GTK_COMPILES=no - for ac_func in gtk_main -do : - ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" -if test "x$ac_cv_func_gtk_main" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GTK_MAIN 1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GTK compiles" >&5 +$as_echo_n "checking whether GTK compiles... " >&6; } + GTK_COMPILES=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Check the Gtk and Glib APIs. */ + #include + #include + static void + callback (GObject *go, GParamSpec *spec, gpointer user_data) + {} + +int +main () +{ + + GtkSettings *gs = 0; + /* Use G_CALLBACK to make sure function pointers can be cast to void *; + strict C prohibits this. Use gtk_main_iteration to test that the + libraries are there. */ + if (g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC, + 0, 0, 0, G_CALLBACK (callback), 0)) + gtk_main_iteration (); + + ; + return 0; +} _ACEOF - GTK_COMPILES=yes +if ac_fn_c_try_link "$LINENO"; then : + GTK_COMPILES=yes fi -done - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_COMPILES" >&5 +$as_echo "$GTK_COMPILES" >&6; } if test "${GTK_COMPILES}" != "yes"; then GTK_OBJ= if test "$USE_X_TOOLKIT" != "maybe"; then ------------------------------------------------------------ revno: 113255 author: Paul Eggert committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-07-01 20:41:16 -0700 message: Don't convert function pointers to void * and back. It isn't portable C, and it's easy enough to avoid. * alloc.c: Verify SAVE_FUNCPOINTER bits, too. (make_save_value): Add support for SAVE_FUNCPOINTER. * keymap.c (map_keymap_char_table_item, map_keymap_internal): * print.c (print_object): Distinguish function from object pointers. * lisp.h (SAVE_FUNCPOINTER): New constant. (SAVE_SLOT_BITS): Adjust to it. (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing SAVE_TYPE_PTR_PTR_OBJ. Change the only use. (voidfuncptr): New typedef. (struct Lisp_Save_Value): New member data[0].funcpointer. (XSAVE_FUNCPOINTER): New function. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-02 00:57:46 +0000 +++ src/ChangeLog 2013-07-02 03:41:16 +0000 @@ -1,5 +1,20 @@ 2013-07-02 Paul Eggert + Don't convert function pointers to void * and back. + It isn't portable C, and it's easy enough to avoid. + * alloc.c: Verify SAVE_FUNCPOINTER bits, too. + (make_save_value): Add support for SAVE_FUNCPOINTER. + * keymap.c (map_keymap_char_table_item, map_keymap_internal): + * print.c (print_object): + Distinguish function from object pointers. + * lisp.h (SAVE_FUNCPOINTER): New constant. + (SAVE_SLOT_BITS): Adjust to it. + (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing + SAVE_TYPE_PTR_PTR_OBJ. Change the only use. + (voidfuncptr): New typedef. + (struct Lisp_Save_Value): New member data[0].funcpointer. + (XSAVE_FUNCPOINTER): New function. + Simplify buildobj processing. * Makefile.in (buildobj.h): Make it a sequence of strings each followed by comma, rather than a single string. Put it into a === modified file 'src/alloc.c' --- src/alloc.c 2013-06-21 20:11:44 +0000 +++ src/alloc.c 2013-07-02 03:41:16 +0000 @@ -3352,7 +3352,9 @@ that are assumed here and elsewhere. */ verify (SAVE_UNUSED == 0); -verify ((SAVE_INTEGER | SAVE_POINTER | SAVE_OBJECT) >> SAVE_SLOT_BITS == 0); +verify (((SAVE_INTEGER | SAVE_POINTER | SAVE_FUNCPOINTER | SAVE_OBJECT) + >> SAVE_SLOT_BITS) + == 0); /* Return a Lisp_Save_Value object with the data saved according to DATA_TYPE. DATA_TYPE should be one of SAVE_TYPE_INT_INT, etc. */ @@ -3379,6 +3381,10 @@ p->data[i].pointer = va_arg (ap, void *); break; + case SAVE_FUNCPOINTER: + p->data[i].funcpointer = va_arg (ap, voidfuncptr); + break; + case SAVE_INTEGER: p->data[i].integer = va_arg (ap, ptrdiff_t); break; === modified file 'src/keymap.c' --- src/keymap.c 2013-06-17 06:03:19 +0000 +++ src/keymap.c 2013-07-02 03:41:16 +0000 @@ -572,7 +572,7 @@ if (!NILP (val)) { map_keymap_function_t fun - = (map_keymap_function_t) XSAVE_POINTER (args, 0); + = (map_keymap_function_t) XSAVE_FUNCPOINTER (args, 0); /* If the key is a range, make a copy since map_char_table modifies it in place. */ if (CONSP (key)) @@ -617,8 +617,8 @@ } else if (CHAR_TABLE_P (binding)) map_char_table (map_keymap_char_table_item, Qnil, binding, - make_save_value (SAVE_TYPE_PTR_PTR_OBJ, - fun, data, args)); + make_save_value (SAVE_TYPE_FUNCPTR_PTR_OBJ, + (voidfuncptr) fun, data, args)); } UNGCPRO; return tail; === modified file 'src/lisp.h' --- src/lisp.h 2013-06-21 20:11:44 +0000 +++ src/lisp.h 2013-07-02 03:41:16 +0000 @@ -1777,12 +1777,13 @@ { SAVE_UNUSED, SAVE_INTEGER, + SAVE_FUNCPOINTER, SAVE_POINTER, SAVE_OBJECT }; /* Number of bits needed to store one of the above values. */ -enum { SAVE_SLOT_BITS = 2 }; +enum { SAVE_SLOT_BITS = 3 }; /* Number of slots in a save value where save_type is nonzero. */ enum { SAVE_VALUE_SLOTS = 4 }; @@ -1803,8 +1804,8 @@ SAVE_TYPE_PTR_INT = SAVE_POINTER + (SAVE_INTEGER << SAVE_SLOT_BITS), SAVE_TYPE_PTR_OBJ = SAVE_POINTER + (SAVE_OBJECT << SAVE_SLOT_BITS), SAVE_TYPE_PTR_PTR = SAVE_POINTER + (SAVE_POINTER << SAVE_SLOT_BITS), - SAVE_TYPE_PTR_PTR_OBJ - = SAVE_POINTER + (SAVE_TYPE_PTR_OBJ << SAVE_SLOT_BITS), + SAVE_TYPE_FUNCPTR_PTR_OBJ + = SAVE_FUNCPOINTER + (SAVE_TYPE_PTR_OBJ << SAVE_SLOT_BITS), /* This has an extra bit indicating it's raw memory. */ SAVE_TYPE_MEMORY = SAVE_TYPE_PTR_INT + (1 << (SAVE_TYPE_BITS - 1)) @@ -1813,9 +1814,9 @@ /* Special object used to hold a different values for later use. This is mostly used to package C integers and pointers to call - record_unwind_protect. Typical task is to pass just one C pointer - to unwind function. You should pack pointer with make_save_pointer - and then get it back with XSAVE_POINTER, e.g.: + record_unwind_protect. A typical task is to pass just one C object + pointer to the unwind function. You should pack an object pointer with + make_save_pointer and then get it back with XSAVE_POINTER, e.g.: ... struct my_data *md = get_my_data (); @@ -1828,10 +1829,10 @@ ... } - If yon need to pass more than just one C pointer, you should - use make_save_value. This function allows you to pack up to - SAVE_VALUE_SLOTS integers, pointers or Lisp_Objects and - conveniently get them back with XSAVE_POINTER, XSAVE_INTEGER and + If you need to pass something else you can use make_save_value, + which allows you to pack up to SAVE_VALUE_SLOTS integers, pointers, + function pointers or Lisp_Objects and conveniently get them back + with XSAVE_INTEGER, XSAVE_POINTER, XSAVE_FUNCPOINTER, and XSAVE_OBJECT macros: ... @@ -1854,6 +1855,8 @@ or XSAVE_OBJECT (arg, 0) are wrong because nothing was saved in slot 2 and Lisp_Object was saved in slot 1 of ARG. */ +typedef void (*voidfuncptr) (void); + struct Lisp_Save_Value { ENUM_BF (Lisp_Misc_Type) type : 16; /* = Lisp_Misc_Save_Value */ @@ -1869,6 +1872,7 @@ ENUM_BF (Lisp_Save_Type) save_type : SAVE_TYPE_BITS; union { void *pointer; + voidfuncptr funcpointer; ptrdiff_t integer; Lisp_Object object; } data[SAVE_VALUE_SLOTS]; @@ -1888,7 +1892,7 @@ XSAVE_POINTER (Lisp_Object obj, int n) { eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER); - return XSAVE_VALUE (obj)->data[n].pointer;; + return XSAVE_VALUE (obj)->data[n].pointer; } LISP_INLINE void set_save_pointer (Lisp_Object obj, int n, void *val) @@ -1896,6 +1900,12 @@ eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER); XSAVE_VALUE (obj)->data[n].pointer = val; } +LISP_INLINE voidfuncptr +XSAVE_FUNCPOINTER (Lisp_Object obj, int n) +{ + eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_FUNCPOINTER); + return XSAVE_VALUE (obj)->data[n].funcpointer; +} /* Likewise for the saved integer. */ === modified file 'src/print.c' --- src/print.c 2013-03-28 14:04:49 +0000 +++ src/print.c 2013-07-02 03:41:16 +0000 @@ -2103,6 +2103,12 @@ v->data[index].pointer); break; + case SAVE_FUNCPOINTER: + i = sprintf (buf, "", + ((void *) (intptr_t) + v->data[index].funcpointer)); + break; + case SAVE_INTEGER: i = sprintf (buf, "", v->data[index].integer); @@ -2112,6 +2118,9 @@ print_object (v->data[index].object, printcharfun, escapeflag); continue; + + default: + emacs_abort (); } strout (buf, i, i, printcharfun); ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.