Now on revision 109780. ------------------------------------------------------------ revno: 109780 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-08-25 22:21:04 -0700 message: * lisp.h (ASET): Remove attempt to detect side effects. It was meant to be temporary and it often doesn't work, because when IDX has side effects the behavior of IDX==IDX is undefined. See Stefan Monnier in . diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-08-26 03:30:56 +0000 +++ src/ChangeLog 2012-08-26 05:21:04 +0000 @@ -1,3 +1,11 @@ +2012-08-26 Paul Eggert + + * lisp.h (ASET): Remove attempt to detect side effects. + It was meant to be temporary and it often doesn't work, + because when IDX has side effects the behavior of IDX==IDX + is undefined. See Stefan Monnier in + . + 2012-08-26 Barry OReilly (tiny change) * lisp.h (functionp): New function (extracted from Ffunctionp). === modified file 'src/lisp.h' --- src/lisp.h 2012-08-26 03:30:56 +0000 +++ src/lisp.h 2012-08-26 05:21:04 +0000 @@ -606,10 +606,8 @@ #define AREF(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX] #define ASIZE(ARRAY) XVECTOR ((ARRAY))->header.size -/* The IDX==IDX tries to detect when the macro argument is side-effecting. */ #define ASET(ARRAY, IDX, VAL) \ - (eassert ((IDX) == (IDX)), \ - eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \ + (eassert (0 <= (IDX) && (IDX) < ASIZE (ARRAY)), \ XVECTOR (ARRAY)->contents[IDX] = (VAL)) /* Convenience macros for dealing with Lisp strings. */ ------------------------------------------------------------ revno: 109779 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-08-25 21:37:40 -0700 message: * configure.ac (CFLAGS): Prefer -g3 to -g if -g3 works and if the user has not specified CFLAGS. -g3 simplifies debugging, since it makes macros visible to the debugger. diff: === modified file 'ChangeLog' --- ChangeLog 2012-08-25 10:04:17 +0000 +++ ChangeLog 2012-08-26 04:37:40 +0000 @@ -1,3 +1,9 @@ +2012-08-26 Paul Eggert + + * configure.ac (CFLAGS): Prefer -g3 to -g if -g3 works + and if the user has not specified CFLAGS. -g3 simplifies + debugging, since it makes macros visible to the debugger. + 2012-08-25 Juanma Barranquero * lib/makefile.w32-in ($(BLD)/execinfo.$(O)): Update dependencies. === modified file 'configure.ac' --- configure.ac 2012-08-20 22:12:35 +0000 +++ configure.ac 2012-08-26 04:37:40 +0000 @@ -577,6 +577,34 @@ # Initialize gnulib right after choosing the compiler. gl_EARLY +# It's helpful to have C macros available to GDB, so prefer -g3 to -g +# if -g3 works and the user does not specify CFLAGS. +# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. +if test "$ac_test_CFLAGS" != set; then + case $CFLAGS in + '-g') + emacs_g3_CFLAGS='-g3';; + '-g -O2') + emacs_g3_CFLAGS='-g3 -O2';; + *) + emacs_g3_CFLAGS='';; + esac + if test -n "$emacs_g3_CFLAGS"; then + emacs_save_CFLAGS=$CFLAGS + CFLAGS=$emacs_g3_CFLAGS + AC_CACHE_CHECK([whether $CC accepts $emacs_g3_CFLAGS], + [emacs_cv_prog_cc_g3], + [AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [emacs_cv_prog_cc_g3=yes], + [emacs_cv_prog_cc_g3=no])]) + if test $emacs_cv_prog_cc_g3 = yes; then + CFLAGS=$emacs_g3_CFLAGS + else + CFLAGS=$emacs_save_CFLAGS + fi + fi +fi + AC_ARG_ENABLE([gcc-warnings], [AS_HELP_STRING([--enable-gcc-warnings], [turn on lots of GCC warnings. This is intended for ------------------------------------------------------------ revno: 109778 committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-08-26 12:08:32 +0800 message: Doc fix for last change. diff: === modified file 'lisp/isearch.el' --- lisp/isearch.el 2012-08-26 03:57:55 +0000 +++ lisp/isearch.el 2012-08-26 04:08:32 +0000 @@ -703,8 +703,7 @@ Type \\[isearch-describe-mode] to display documentation of Isearch mode. In incremental searches, a space or spaces normally matches any -whitespace; see the variable `search-whitespace-regexp'. To -search for a literal space and nothing else, enter C-q SPC. +whitespace; see the variable `search-whitespace-regexp'. If an input method is turned on in the current buffer, that input method is also active while you are typing characters to search. ------------------------------------------------------------ revno: 109777 committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-08-26 11:57:55 +0800 message: Make ordinary isearch obey search-whitespace-regexp too. * lisp/isearch.el (search-whitespace-regexp): Make string and nil values apply to both ordinary and regexp search. Allow a cons cell value to distinguish between the two. (isearch-whitespace-regexp, isearch-search-forward) (isearch-search-backward): New functions. (isearch-occur, isearch-search-fun-default, isearch-search) (isearch-lazy-highlight-new-loop): Use them. (isearch-forward, isearch-forward-regexp): Doc fix. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-08-22 06:55:44 +0000 +++ etc/NEWS 2012-08-26 03:57:55 +0000 @@ -179,6 +179,13 @@ and `M-s _' in Isearch toggles symbol search mode. `M-s c' in Isearch toggles search case-sensitivity. +*** `search-whitespace-regexp' now acts on ordinary incremental search +as well, so that each sequence of spaces in the search string matches +any combination of one or more whitespace characters. To change this +behavior, you can give `search-whitespace-regexp' a cons cell value, +where the car and cdr specify values for ordinary and regular +expression incremental search respectively. + ** M-x move-to-column, if called interactively with no prefix arg, now prompts for a column number. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-26 02:57:07 +0000 +++ lisp/ChangeLog 2012-08-26 03:57:55 +0000 @@ -1,5 +1,16 @@ 2012-08-26 Chong Yidong + * isearch.el (search-whitespace-regexp): Make string and nil + values apply to both ordinary and regexp search. Allow a cons + cell value to distinguish between the two. + (isearch-whitespace-regexp, isearch-search-forward) + (isearch-search-backward): New functions. + (isearch-occur, isearch-search-fun-default, isearch-search) + (isearch-lazy-highlight-new-loop): Use them. + (isearch-forward, isearch-forward-regexp): Doc fix. + +2012-08-26 Chong Yidong + * faces.el (help-argument-name): Always inherit from italic (Bug#12213). === modified file 'lisp/isearch.el' --- lisp/isearch.el 2012-08-04 22:31:04 +0000 +++ lisp/isearch.el 2012-08-26 03:57:55 +0000 @@ -111,17 +111,32 @@ (defcustom search-whitespace-regexp (purecopy "\\s-+") "If non-nil, regular expression to match a sequence of whitespace chars. -This applies to regular expression incremental search. -When you put a space or spaces in the incremental regexp, it stands for -this, unless it is inside of a regexp construct such as [...] or *, + or ?. +When you enter a space or spaces in the incremental search, it +will match any sequence matched by this regexp. As an exception, +spaces are treated normally in regexp incremental search if they +occur in a regexp construct like [...] or *, + or ?. + +If the value is a string, it applies to both ordinary and regexp +incremental search. If the value is nil, each space you type +matches literally, against one space. + +The value can also be a cons cell (REGEXP-1 . REGEXP-2). In that +case, REGEXP-1 is used as the value for ordinary incremental +search, and REGEXP-2 is used for regexp incremental search. + You might want to use something like \"[ \\t\\r\\n]+\" instead. In the Customization buffer, that is `[' followed by a space, -a tab, a carriage return (control-M), a newline, and `]+'. - -When this is nil, each space you type matches literally, against one space." - :type '(choice (const :tag "Find Spaces Literally" nil) +a tab, a carriage return (control-M), a newline, and `]+'." + :type '(choice (const :tag "Treat Spaces Literally" nil) + (cons (choice :tag "For Ordinary Isearch" + regexp + (const :tag "Treat Spaces Literally" nil)) + (choice :tag "For Regexp Isearch" + regexp + (const :tag "Treat Spaces Literally" nil))) regexp) - :group 'isearch) + :group 'isearch + :version "24.3") (defcustom search-invisible 'open "If t incremental search can match hidden text. @@ -687,6 +702,10 @@ Type \\[isearch-describe-key] to display documentation of Isearch key. Type \\[isearch-describe-mode] to display documentation of Isearch mode. +In incremental searches, a space or spaces normally matches any +whitespace; see the variable `search-whitespace-regexp'. To +search for a literal space and nothing else, enter C-q SPC. + If an input method is turned on in the current buffer, that input method is also active while you are typing characters to search. To toggle the input method, type \\[isearch-toggle-input-method]. \ @@ -710,22 +729,19 @@ (isearch-mode t (not (null regexp-p)) nil (not no-recursive-edit))) (defun isearch-forward-regexp (&optional not-regexp no-recursive-edit) - "\ -Do incremental search forward for regular expression. + "Do incremental search forward for regular expression. With a prefix argument, do a regular string search instead. Like ordinary incremental search except that your input is treated as a regexp. See the command `isearch-forward' for more information. -In regexp incremental searches, a space or spaces normally matches -any whitespace (the variable `search-whitespace-regexp' controls -precisely what that means). If you want to search for a literal space -and nothing else, enter C-q SPC." +In incremental searches, a space or spaces normally matches any +whitespace; see the variable `search-whitespace-regexp'. To +search for a literal space and nothing else, enter C-q SPC." (interactive "P\np") (isearch-mode t (null not-regexp) nil (not no-recursive-edit))) (defun isearch-forward-word (&optional not-word no-recursive-edit) - "\ -Do incremental search forward for a sequence of words. + "Do incremental search forward for a sequence of words. With a prefix argument, do a regular string search instead. Like ordinary incremental search except that your input is treated as a sequence of words without regard to how the words are separated. @@ -734,8 +750,7 @@ (isearch-mode t nil nil (not no-recursive-edit) (null not-word))) (defun isearch-forward-symbol (&optional not-symbol no-recursive-edit) - "\ -Do incremental search forward for a symbol. + "Do incremental search forward for a symbol. The prefix argument is currently unused. Like ordinary incremental search except that your input is treated as a symbol surrounded by symbol boundary constructs \\_< and \\_>. @@ -744,16 +759,14 @@ (isearch-mode t nil nil (not no-recursive-edit) 'isearch-symbol-regexp)) (defun isearch-backward (&optional regexp-p no-recursive-edit) - "\ -Do incremental search backward. + "Do incremental search backward. With a prefix argument, do a regular expression search instead. See the command `isearch-forward' for more information." (interactive "P\np") (isearch-mode nil (not (null regexp-p)) nil (not no-recursive-edit))) (defun isearch-backward-regexp (&optional not-regexp no-recursive-edit) - "\ -Do incremental search backward for regular expression. + "Do incremental search backward for regular expression. With a prefix argument, do a regular string search instead. Like ordinary incremental search except that your input is treated as a regexp. See the command `isearch-forward' for more information." @@ -895,8 +908,7 @@ (if (< isearch-other-end (point)) ; isearch-forward? (isearch-highlight isearch-other-end (point)) (isearch-highlight (point) isearch-other-end)) - (isearch-dehighlight)) - )) + (isearch-dehighlight)))) (setq ;; quit-flag nil not for isearch-mode isearch-adjusted nil isearch-yank-flag nil) @@ -1547,6 +1559,15 @@ (list current-prefix-arg)) (isearch-query-replace delimited t)) +(defun isearch-whitespace-regexp () + "Return the value of `search-whitespace-regexp' for the current search." + (cond ((not (consp search-whitespace-regexp)) + search-whitespace-regexp) + (isearch-regexp + (cdr search-whitespace-regexp)) + (t + (car search-whitespace-regexp)))) + (defun isearch-occur (regexp &optional nlines) "Run `occur' using the last search string as the regexp. Interactively, REGEXP is constructed using the search string from the @@ -1586,7 +1607,7 @@ ;; Set `search-upper-case' to nil to not call ;; `isearch-no-upper-case-p' in `occur-1'. (search-upper-case nil) - (search-spaces-regexp (if isearch-regexp search-whitespace-regexp))) + (search-spaces-regexp (isearch-whitespace-regexp))) (occur regexp nlines))) (declare-function hi-lock-read-face-name "hi-lock" ()) @@ -2426,7 +2447,13 @@ (isearch-regexp (if isearch-forward 're-search-forward 're-search-backward)) (t - (if isearch-forward 'search-forward 'search-backward)))) + (if isearch-forward 'isearch-search-forward 'isearch-search-backward)))) + +(defun isearch-search-forward (string &optional bound noerror count) + (re-search-forward (regexp-quote string) bound noerror count)) + +(defun isearch-search-backward (string &optional bound noerror count) + (re-search-backward (regexp-quote string) bound noerror count)) (defun isearch-search-string (string bound noerror) "Search for the first occurrence of STRING or its translation. @@ -2487,7 +2514,7 @@ search-invisible)) (inhibit-quit nil) (case-fold-search isearch-case-fold-search) - (search-spaces-regexp search-whitespace-regexp) + (search-spaces-regexp (isearch-whitespace-regexp)) (retry t)) (setq isearch-error nil) (while retry @@ -2847,7 +2874,7 @@ isearch-lazy-highlight-last-string isearch-string isearch-lazy-highlight-case-fold-search isearch-case-fold-search isearch-lazy-highlight-regexp isearch-regexp - isearch-lazy-highlight-space-regexp search-whitespace-regexp + isearch-lazy-highlight-space-regexp (isearch-whitespace-regexp) isearch-lazy-highlight-word isearch-word isearch-lazy-highlight-forward isearch-forward) (unless (equal isearch-string "") ------------------------------------------------------------ revno: 109776 author: Barry OReilly committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-08-25 23:30:56 -0400 message: * src/lisp.h (functionp): New function (extracted from Ffunctionp). (FUNCTIONP): Use it. * src/eval.c (Ffunctionp): Use it. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-08-25 20:31:04 +0000 +++ src/ChangeLog 2012-08-26 03:30:56 +0000 @@ -1,3 +1,9 @@ +2012-08-26 Barry OReilly (tiny change) + + * lisp.h (functionp): New function (extracted from Ffunctionp). + (FUNCTIONP): Use it. + * eval.c (Ffunctionp): Use it. + 2012-08-25 Paul Eggert * xgselect.c (xg_select): Use auto storage for the GPollFD buffer @@ -160,8 +166,8 @@ * w32uniscribe.c (uniscribe_shape): Fix producing gstring components for RTL text (Bug#11860). Adjust X-OFFSET of each non-base glyph for the width of the base character, according to - what x_draw_composite_glyph_string_foreground expects. Generate - WADJUST value according to composition_gstring_width's + what x_draw_composite_glyph_string_foreground expects. + Generate WADJUST value according to composition_gstring_width's expectations, to produce correct width of the composed character. Reverse the sign of the DU offset produced by ScriptPlace. === modified file 'src/eval.c' --- src/eval.c 2012-08-20 09:39:57 +0000 +++ src/eval.c 2012-08-26 03:30:56 +0000 @@ -2722,33 +2722,9 @@ doc: /* Non-nil if OBJECT is a function. */) (Lisp_Object object) { - if (SYMBOLP (object) && !NILP (Ffboundp (object))) - { - object = Findirect_function (object, Qt); - - if (CONSP (object) && EQ (XCAR (object), Qautoload)) - { - /* Autoloaded symbols are functions, except if they load - macros or keymaps. */ - int i; - for (i = 0; i < 4 && CONSP (object); i++) - object = XCDR (object); - - return (CONSP (object) && !NILP (XCAR (object))) ? Qnil : Qt; - } - } - - if (SUBRP (object)) - return (XSUBR (object)->max_args != UNEVALLED) ? Qt : Qnil; - else if (COMPILEDP (object)) + if (FUNCTIONP (object)) return Qt; - else if (CONSP (object)) - { - Lisp_Object car = XCAR (object); - return (EQ (car, Qlambda) || EQ (car, Qclosure)) ? Qt : Qnil; - } - else - return Qnil; + return Qnil; } DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0, === modified file 'src/lisp.h' --- src/lisp.h 2012-08-25 03:11:12 +0000 +++ src/lisp.h 2012-08-26 03:30:56 +0000 @@ -1906,11 +1906,7 @@ Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object) /* Non-zero if OBJ is a Lisp function. */ -#define FUNCTIONP(OBJ) \ - ((CONSP (OBJ) && EQ (XCAR (OBJ), Qlambda)) \ - || (SYMBOLP (OBJ) && !NILP (Ffboundp (OBJ))) \ - || COMPILEDP (OBJ) \ - || SUBRP (OBJ)) +#define FUNCTIONP(OBJ) functionp(OBJ) /* defsubr (Sname); is how we define the symbol for function `name' at start-up time. */ @@ -3656,6 +3652,38 @@ Fgarbage_collect (); } +LISP_INLINE int +functionp (Lisp_Object object) +{ + if (SYMBOLP (object) && !NILP (Ffboundp (object))) + { + object = Findirect_function (object, Qt); + + if (CONSP (object) && EQ (XCAR (object), Qautoload)) + { + /* Autoloaded symbols are functions, except if they load + macros or keymaps. */ + int i; + for (i = 0; i < 4 && CONSP (object); i++) + object = XCDR (object); + + return ! (CONSP (object) && !NILP (XCAR (object))); + } + } + + if (SUBRP (object)) + return XSUBR (object)->max_args != UNEVALLED; + else if (COMPILEDP (object)) + return 1; + else if (CONSP (object)) + { + Lisp_Object car = XCAR (object); + return EQ (car, Qlambda) || EQ (car, Qclosure); + } + else + return 0; +} + INLINE_HEADER_END #endif /* EMACS_LISP_H */ ------------------------------------------------------------ revno: 109775 fixes bug: http://debbugs.gnu.org/12213 committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-08-26 10:57:07 +0800 message: * faces.el (help-argument-name): Always inherit from italic. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-25 14:52:02 +0000 +++ lisp/ChangeLog 2012-08-26 02:57:07 +0000 @@ -1,3 +1,8 @@ +2012-08-26 Chong Yidong + + * faces.el (help-argument-name): Always inherit from italic + (Bug#12213). + 2012-08-25 Martin Rudalics * window.el (window--even-window-heights): Even heights when === modified file 'lisp/faces.el' --- lisp/faces.el 2012-07-25 10:46:59 +0000 +++ lisp/faces.el 2012-08-26 02:57:07 +0000 @@ -2444,7 +2444,7 @@ :group 'menu :group 'basic-faces) -(defface help-argument-name '((((supports :slant italic)) :inherit italic)) +(defface help-argument-name '((t :inherit italic)) "Face to highlight argument names in *Help* buffers." :group 'help) ------------------------------------------------------------ revno: 109774 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-08-25 13:31:04 -0700 message: * xgselect.c (xg_select): Use auto storage for the GPollFD buffer as that's faster and simpler than static storage. Don't bother with the g_main_context_query overhead if g_main_context_pending says no events are pending. (gfds, gfds_size): Remove these static vars. (xgselect_initialize): Remove; no longer needed. All uses and decls removed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-08-25 06:38:43 +0000 +++ src/ChangeLog 2012-08-25 20:31:04 +0000 @@ -1,5 +1,13 @@ 2012-08-25 Paul Eggert + * xgselect.c (xg_select): Use auto storage for the GPollFD buffer + as that's faster and simpler than static storage. Don't bother + with the g_main_context_query overhead if g_main_context_pending + says no events are pending. + (gfds, gfds_size): Remove these static vars. + (xgselect_initialize): Remove; no longer needed. + All uses and decls removed. + * emacs.c (fatal_error_signal_hook): Remove. All uses removed. This leftover from old code was always 0. === modified file 'src/xgselect.c' --- src/xgselect.c 2012-07-10 23:24:36 +0000 +++ src/xgselect.c 2012-08-25 20:31:04 +0000 @@ -29,9 +29,6 @@ #include #include "xterm.h" -static GPollFD *gfds; -static ptrdiff_t gfds_size; - int xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, EMACS_TIME *timeout, sigset_t *sigmask) @@ -41,35 +38,31 @@ GMainContext *context; int have_wfds = wfds != NULL; - int n_gfds = 0, retval = 0, our_fds = 0, max_fds = fds_lim - 1; + GPollFD gfds_buf[128]; + GPollFD *gfds = gfds_buf; + int gfds_size = sizeof gfds_buf / sizeof *gfds_buf; + int n_gfds, retval = 0, our_fds = 0, max_fds = fds_lim - 1; int i, nfds, tmo_in_millisec; + USE_SAFE_ALLOCA; - if (!x_in_use) - return pselect (fds_lim, rfds, wfds, efds, tmop, sigmask); + if (! (x_in_use + && g_main_context_pending (context = g_main_context_default ()))) + return pselect (fds_lim, rfds, wfds, efds, timeout, sigmask); if (rfds) memcpy (&all_rfds, rfds, sizeof (all_rfds)); else FD_ZERO (&all_rfds); if (wfds) memcpy (&all_wfds, wfds, sizeof (all_rfds)); else FD_ZERO (&all_wfds); - /* Update event sources in GLib. */ - context = g_main_context_default (); - g_main_context_pending (context); - - do { - if (n_gfds > gfds_size) - { - xfree (gfds); - gfds = xpalloc (0, &gfds_size, n_gfds - gfds_size, INT_MAX, - sizeof *gfds); - } - - n_gfds = g_main_context_query (context, - G_PRIORITY_LOW, - &tmo_in_millisec, - gfds, - gfds_size); - } while (n_gfds > gfds_size); + n_gfds = g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec, + gfds, gfds_size); + if (gfds_size < n_gfds) + { + SAFE_NALLOCA (gfds, sizeof *gfds, n_gfds); + gfds_size = n_gfds; + n_gfds = g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec, + gfds, gfds_size); + } for (i = 0; i < n_gfds; ++i) { @@ -86,6 +79,8 @@ } } + SAFE_FREE (); + if (tmo_in_millisec >= 0) { tmo = make_emacs_time (tmo_in_millisec / 1000, @@ -147,12 +142,3 @@ return retval; } #endif /* USE_GTK || HAVE_GCONF || HAVE_GSETTINGS */ - -void -xgselect_initialize (void) -{ -#if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) - gfds_size = 128; - gfds = xmalloc (gfds_size * sizeof *gfds); -#endif -} === modified file 'src/xgselect.h' --- src/xgselect.h 2012-06-22 21:17:42 +0000 +++ src/xgselect.h 2012-08-25 20:31:04 +0000 @@ -31,6 +31,4 @@ EMACS_TIME *timeout, sigset_t *sigmask); -extern void xgselect_initialize (void); - #endif /* XGSELECT_H */ === modified file 'src/xterm.c' --- src/xterm.c 2012-08-18 01:42:52 +0000 +++ src/xterm.c 2012-08-25 20:31:04 +0000 @@ -10815,8 +10815,6 @@ XSetIOErrorHandler (x_io_error_quitter); signal (SIGPIPE, x_connection_signal); - - xgselect_initialize (); } ------------------------------------------------------------ revno: 109773 committer: martin rudalics branch nick: trunk timestamp: Sat 2012-08-25 16:52:02 +0200 message: Handle evening window heights more correctly (Bug#11880) and (Bug#12091). * window.el (window--even-window-heights): Even heights when WINDOW and the selected window form a vertical combination. (display-buffer-use-some-window): Provide that window used gets sized back by quit-window. (Bug#11880) and (Bug#12091) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-24 04:05:25 +0000 +++ lisp/ChangeLog 2012-08-25 14:52:02 +0000 @@ -1,3 +1,10 @@ +2012-08-25 Martin Rudalics + + * window.el (window--even-window-heights): Even heights when + WINDOW and the selected window form a vertical combination. + (display-buffer-use-some-window): Provide that window used gets + sized back by quit-window. (Bug#11880) and (Bug#12091) + 2012-08-24 Paul Eggert Fix file time stamp problem with bzr and CVS (Bug#12001). === modified file 'lisp/window.el' --- lisp/window.el 2012-08-22 09:22:08 +0000 +++ lisp/window.el 2012-08-25 14:52:02 +0000 @@ -4911,23 +4911,19 @@ other, `even-window-heights' is non-nil, and the selected window is higher than WINDOW." (when (and even-window-heights - (not (eq window (selected-window))) - ;; Don't resize minibuffer windows. - (not (window-minibuffer-p (selected-window))) - (> (window-height (selected-window)) (window-height window)) - (eq (window-frame window) (window-frame (selected-window))) - (let ((sel-edges (window-edges (selected-window))) - (win-edges (window-edges window))) - (and (= (nth 0 sel-edges) (nth 0 win-edges)) - (= (nth 2 sel-edges) (nth 2 win-edges)) - (or (= (nth 1 sel-edges) (nth 3 win-edges)) - (= (nth 3 sel-edges) (nth 1 win-edges)))))) - (let ((window-min-height 1)) - ;; Don't throw an error if we can't even window heights for - ;; whatever reason. - (condition-case nil - (enlarge-window (/ (- (window-height window) (window-height)) 2)) - (error nil))))) + ;; Even iff WINDOW forms a vertical combination with the + ;; selected window, and WINDOW's height exceeds that of the + ;; selected window, see also bug#11880. + (window-combined-p window) + (= (window-child-count (window-parent window)) 2) + (eq (window-parent) (window-parent window)) + (> (window-total-height) (window-total-height window))) + ;; Don't throw an error if we can't even window heights for + ;; whatever reason. + (condition-case nil + (enlarge-window + (/ (- (window-total-height window) (window-total-height)) 2)) + (error nil)))) (defun window--display-buffer (buffer window type &optional dedicated) "Display BUFFER in WINDOW and make its frame visible. @@ -5334,8 +5330,9 @@ window)) (get-largest-window 0 not-this-window)))) (when (window-live-p window) - (window--even-window-heights window) - (prog1 (window--display-buffer buffer window 'reuse) + (prog1 + (window--display-buffer buffer window 'reuse) + (window--even-window-heights window) (unless (cdr (assq 'inhibit-switch-frame alist)) (window--maybe-raise-frame (window-frame window))))))) ------------------------------------------------------------ revno: 109772 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-08-25 06:17:28 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/Makefile.in' --- autogen/Makefile.in 2012-08-21 10:17:31 +0000 +++ autogen/Makefile.in 2012-08-25 10:17:28 +0000 @@ -36,7 +36,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -65,7 +65,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/c-strtod.m4 \ $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/dup2.m4 \ - $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/extensions.m4 \ + $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/execinfo.m4 \ + $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/filemode.m4 \ $(top_srcdir)/m4/getloadavg.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \ @@ -180,6 +181,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +EXECINFO_H = @EXECINFO_H@ EXEEXT = @EXEEXT@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ @@ -556,6 +558,7 @@ LIBXT_OTHER = @LIBXT_OTHER@ LIBX_OTHER = @LIBX_OTHER@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LIB_EXECINFO = @LIB_EXECINFO@ LIB_GCC = @LIB_GCC@ LIB_MATH = @LIB_MATH@ LIB_PTHREAD = @LIB_PTHREAD@ @@ -845,16 +848,17 @@ # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. -BUILT_SOURCES = $(ALLOCA_H) $(GETOPT_H) inttypes.h signal.h \ - arg-nonnull.h c++defs.h warn-on-use.h $(STDALIGN_H) \ +BUILT_SOURCES = $(ALLOCA_H) $(EXECINFO_H) $(GETOPT_H) inttypes.h \ + signal.h arg-nonnull.h c++defs.h warn-on-use.h $(STDALIGN_H) \ $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \ stdlib.h sys/select.h sys/stat.h sys/time.h time.h unistd.h EXTRA_DIST = alloca.in.h allocator.h careadlinkat.h md5.h sha1.h \ sha256.h sha512.h dosname.h ftoastr.c ftoastr.h dup2.c \ - filemode.h getloadavg.c getopt.c getopt.in.h getopt1.c \ - getopt_int.h gettimeofday.c ignore-value.h intprops.h \ - inttypes.in.h lstat.c mktime-internal.h mktime.c pathmax.h \ - pselect.c pthread_sigmask.c readlink.c signal.in.h \ + execinfo.c execinfo.in.h filemode.h getloadavg.c getopt.c \ + getopt.in.h getopt1.c getopt_int.h gettimeofday.c \ + ignore-value.h intprops.h inttypes.in.h lstat.c \ + mktime-internal.h mktime.c pathmax.h pselect.c \ + pthread_sigmask.c readlink.c signal.in.h \ $(top_srcdir)/build-aux/snippet/_Noreturn.h \ $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ $(top_srcdir)/build-aux/snippet/c++defs.h \ @@ -866,14 +870,15 @@ sys_time.in.h time.in.h time_r.c timespec.h u64.h unistd.in.h \ utimens.h verify.h MOSTLYCLEANDIRS = sys sys -MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t getopt.h \ - getopt.h-t inttypes.h inttypes.h-t signal.h signal.h-t \ - arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \ - warn-on-use.h warn-on-use.h-t stdalign.h stdalign.h-t stdarg.h \ - stdarg.h-t stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h \ - stdint.h-t stdio.h stdio.h-t stdlib.h stdlib.h-t sys/select.h \ - sys/select.h-t sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t \ - time.h time.h-t unistd.h unistd.h-t +MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t execinfo.h \ + execinfo.h-t getopt.h getopt.h-t inttypes.h inttypes.h-t \ + signal.h signal.h-t arg-nonnull.h arg-nonnull.h-t c++defs.h \ + c++defs.h-t warn-on-use.h warn-on-use.h-t stdalign.h \ + stdalign.h-t stdarg.h stdarg.h-t stdbool.h stdbool.h-t \ + stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \ + stdlib.h stdlib.h-t sys/select.h sys/select.h-t sys/stat.h \ + sys/stat.h-t sys/time.h sys/time.h-t time.h time.h-t unistd.h \ + unistd.h-t noinst_LIBRARIES = libgnu.a AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) DEFAULT_INCLUDES = -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/src @@ -884,8 +889,8 @@ timespec-add.c timespec-sub.c u64.c utimens.c libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) -EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c getloadavg.c getopt.c \ - getopt1.c gettimeofday.c lstat.c mktime.c pselect.c \ +EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c execinfo.c getloadavg.c \ + getopt.c getopt1.c gettimeofday.c lstat.c mktime.c pselect.c \ pthread_sigmask.c readlink.c stat.c strtoimax.c strtol.c \ strtoll.c strtol.c strtoul.c strtoull.c strtoimax.c \ strtoumax.c symlink.c time_r.c @@ -954,6 +959,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtoastr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtotimespec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@ @@ -1213,6 +1219,17 @@ @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status @GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ +# We need the following in order to create when the system +# doesn't have one that works. +@GL_GENERATE_EXECINFO_H_TRUE@execinfo.h: execinfo.in.h $(top_builddir)/config.status +@GL_GENERATE_EXECINFO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_EXECINFO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_EXECINFO_H_TRUE@ cat $(srcdir)/execinfo.in.h; \ +@GL_GENERATE_EXECINFO_H_TRUE@ } > $@-t && \ +@GL_GENERATE_EXECINFO_H_TRUE@ mv $@-t $@ +@GL_GENERATE_EXECINFO_H_FALSE@execinfo.h: $(top_builddir)/config.status +@GL_GENERATE_EXECINFO_H_FALSE@ rm -f $@ + # We need the following in order to create when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) === modified file 'autogen/aclocal.m4' --- autogen/aclocal.m4 2012-08-02 10:17:32 +0000 +++ autogen/aclocal.m4 2012-08-25 10:17:28 +0000 @@ -990,6 +990,7 @@ m4_include([m4/clock_time.m4]) m4_include([m4/dup2.m4]) m4_include([m4/environ.m4]) +m4_include([m4/execinfo.m4]) m4_include([m4/extensions.m4]) m4_include([m4/extern-inline.m4]) m4_include([m4/filemode.m4]) === modified file 'autogen/config.in' --- autogen/config.in 2012-08-22 10:17:28 +0000 +++ autogen/config.in 2012-08-25 10:17:28 +0000 @@ -358,6 +358,9 @@ /* Define to 1 if you have the `euidaccess' function. */ #undef HAVE_EUIDACCESS +/* Define to 1 if you have the header file. */ +#undef HAVE_EXECINFO_H + /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H === modified file 'autogen/configure' --- autogen/configure 2012-08-21 10:17:31 +0000 +++ autogen/configure 2012-08-25 10:17:28 +0000 @@ -971,6 +971,10 @@ GNULIB_CALLOC_POSIX GNULIB_ATOLL GNULIB__EXIT +GL_GENERATE_EXECINFO_H_FALSE +GL_GENERATE_EXECINFO_H_TRUE +LIB_EXECINFO +EXECINFO_H UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H REPLACE_WRITE @@ -3194,6 +3198,7 @@ as_fn_append ac_header_list " sys/un.h" as_fn_append ac_func_list " tzset" as_fn_append ac_func_list " readlinkat" +as_fn_append ac_header_list " execinfo.h" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" as_fn_append ac_func_list " gettimeofday" @@ -6956,6 +6961,7 @@ # Code from module dtotimespec: # Code from module dup2: # Code from module environ: + # Code from module execinfo: # Code from module extensions: # Code from module extern-inline: @@ -16464,6 +16470,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } if test "${ac_cv_struct_st_dm_mode+set}" = set; then : @@ -20100,6 +20108,99 @@ + LIB_EXECINFO='' + EXECINFO_H='execinfo.h' + + if test $ac_cv_header_execinfo_h = yes; then + gl_saved_libs=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5 +$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; } +if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char backtrace_symbols_fd (); +int +main () +{ +return backtrace_symbols_fd (); + ; + return 0; +} +_ACEOF +for ac_lib in '' execinfo; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_backtrace_symbols_fd=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : + break +fi +done +if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : + +else + ac_cv_search_backtrace_symbols_fd=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5 +$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; } +ac_res=$ac_cv_search_backtrace_symbols_fd +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ac_cv_search_backtrace_symbols_fd" = "none required" || + LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd +fi + + LIBS=$gl_saved_libs + test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H='' + fi + + if test -n "$EXECINFO_H"; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext" + + fi + + + + if test -n "$EXECINFO_H"; then + GL_GENERATE_EXECINFO_H_TRUE= + GL_GENERATE_EXECINFO_H_FALSE='#' +else + GL_GENERATE_EXECINFO_H_TRUE='#' + GL_GENERATE_EXECINFO_H_FALSE= +fi + + + + + @@ -24190,6 +24291,10 @@ Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then + as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 ------------------------------------------------------------ revno: 109771 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2012-08-25 12:04:17 +0200 message: lib/makefile.w32-in ($(BLD)/execinfo.$(O)): Update dependencies. diff: === modified file 'ChangeLog' --- ChangeLog 2012-08-25 05:55:32 +0000 +++ ChangeLog 2012-08-25 10:04:17 +0000 @@ -1,3 +1,7 @@ +2012-08-25 Juanma Barranquero + + * lib/makefile.w32-in ($(BLD)/execinfo.$(O)): Update dependencies. + 2012-08-25 Eli Zaretskii * lib/makefile.w32-in ($(BLD)/execinfo.$(O), execinfo.h): New targets. === modified file 'lib/makefile.w32-in' --- lib/makefile.w32-in 2012-08-25 05:55:32 +0000 +++ lib/makefile.w32-in 2012-08-25 10:04:17 +0000 @@ -131,7 +131,9 @@ $(CONFIG_H) $(BLD)/execinfo.$(O) : \ - $(GNU_LIB)/execinfo.h + $(GNU_LIB)/execinfo.c \ + $(GNU_LIB)/execinfo.h \ + $(CONFIG_H) $(BLD)/getopt.$(O) : \ $(GNU_LIB)/getopt.c \ ------------------------------------------------------------ revno: 109770 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-08-25 09:53:06 +0300 message: Add lib/execinfo.h to .bzrignore. diff: === modified file '.bzrignore' --- .bzrignore 2012-08-02 01:59:19 +0000 +++ .bzrignore 2012-08-25 06:53:06 +0000 @@ -84,6 +84,7 @@ lib/alloca.h lib/arg-nonnull.h lib/c++defs.h +lib/execinfo.h lib/getopt.h lib/inttypes.h lib/stdalign.h