------------------------------------------------------------ revno: 117635 committer: Glenn Morris branch nick: trunk timestamp: Sat 2014-08-02 23:45:59 -0400 message: * test/automated/Makefile.in (check-tar): New rule. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2014-08-02 20:22:31 +0000 +++ test/ChangeLog 2014-08-03 03:45:59 +0000 @@ -1,3 +1,7 @@ +2014-08-03 Glenn Morris + + * automated/Makefile.in (check-tar): New rule. + 2014-08-02 Glenn Morris * automated/fns-tests.el (fns-tests-compare-strings): === modified file 'test/automated/Makefile.in' --- test/automated/Makefile.in 2014-06-28 17:18:05 +0000 +++ test/automated/Makefile.in 2014-08-03 03:45:59 +0000 @@ -121,6 +121,11 @@ check-maybe: ${LOGFILES} $(emacs) -l ert -f ert-summarize-tests-batch-and-exit $^ +## Mainly for hydra. +.PHONY: check-tar +check-tar: check + tar -cf logs.tar ${LOGFILES} + .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean clean mostlyclean: ------------------------------------------------------------ revno: 117634 committer: Fabi?n Ezequiel Gallina branch nick: trunk timestamp: Sat 2014-08-02 19:52:55 -0300 message: * progmodes/python.el: Completion code cleanups. (python-shell-completion-get-completions): Detect and send import statements directly to completion function. (python-shell-completion-at-point): Simplify prompt calculation and import vs input completion logic. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-08-02 18:52:48 +0000 +++ lisp/ChangeLog 2014-08-02 22:52:55 +0000 @@ -1,3 +1,11 @@ +2014-08-02 Fabián Ezequiel Gallina + + * progmodes/python.el: Completion code cleanups. + (python-shell-completion-get-completions): Detect and send import + statements directly to completion function. + (python-shell-completion-at-point): Simplify prompt calculation + and import vs input completion logic. + 2014-08-02 Alan Mackenzie Fix confusion in C++ file caused by comma in "= {1,2},". Bug === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2014-08-01 00:18:19 +0000 +++ lisp/progmodes/python.el 2014-08-02 22:52:55 +0000 @@ -2872,21 +2872,15 @@ :type 'string :group 'python) -(defun python-shell-completion-get-completions (process line input) - "Do completion at point for PROCESS. -LINE is used to detect the context on how to complete given INPUT." +(defun python-shell-completion-get-completions (process import input) + "Do completion at point using PROCESS for IMPORT or INPUT. +When IMPORT is non-nil takes precedence over INPUT for +completion." (let* ((prompt - ;; Get last prompt of the inferior process buffer (this - ;; intentionally avoids using `comint-last-prompt' because - ;; of incompatibilities with Emacs 24.x). (with-current-buffer (process-buffer process) - (save-excursion + (let ((prompt-boundaries (python-util-comint-last-prompt))) (buffer-substring-no-properties - (- (point) (length line)) - (progn - (re-search-backward "^") - (python-util-forward-comment) - (point)))))) + (car prompt-boundaries) (cdr prompt-boundaries))))) (completion-code ;; Check whether a prompt matches a pdb string, an import ;; statement or just the standard prompt and use the @@ -2899,19 +2893,14 @@ python-shell--prompt-calculated-input-regexp prompt) python-shell-completion-string-code) (t nil))) - (input - (if (string-match - (python-rx (+ space) (or "from" "import") space) - line) - line - input))) + (subject (or import input))) (and completion-code (> (length input) 0) (with-current-buffer (process-buffer process) (let ((completions (python-util-strip-string (python-shell-send-string-no-output - (format completion-code input) process)))) + (format completion-code subject) process)))) (and (> (length completions) 2) (split-string completions "^'\\|^\"\\|;\\|'$\\|\"$" t))))))) @@ -2921,14 +2910,20 @@ Optional argument PROCESS forces completions to be retrieved using that one instead of current buffer's process." (setq process (or process (get-buffer-process (current-buffer)))) - (let* ((start + (let* ((last-prompt-end (cdr (python-util-comint-last-prompt))) + (import-statement + (when (string-match-p + (rx (* space) word-start (or "from" "import") word-end space) + (buffer-substring-no-properties last-prompt-end (point))) + (buffer-substring-no-properties last-prompt-end (point)))) + (start (save-excursion (if (not (re-search-backward (python-rx (or whitespace open-paren close-paren string-delimiter)) - (cdr (python-util-comint-last-prompt)) + last-prompt-end t 1)) - (cdr (python-util-comint-last-prompt)) + last-prompt-end (forward-char (length (match-string-no-properties 0))) (point)))) (end (point))) @@ -2936,8 +2931,7 @@ (completion-table-dynamic (apply-partially #'python-shell-completion-get-completions - process (buffer-substring-no-properties - (line-beginning-position) end)))))) + process import-statement))))) (define-obsolete-function-alias 'python-shell-completion-complete-at-point ------------------------------------------------------------ revno: 117633 committer: Paul Eggert branch nick: trunk timestamp: Sat 2014-08-02 14:50:13 -0700 message: * configure.ac (HAVE_TIMERFD): Also check for TFD_NONBLOCK, since the code is using TFD_NONBLOCK now. diff: === modified file 'ChangeLog' --- ChangeLog 2014-07-31 20:17:01 +0000 +++ ChangeLog 2014-08-02 21:50:13 +0000 @@ -1,3 +1,8 @@ +2014-08-02 Paul Eggert + + * configure.ac (HAVE_TIMERFD): Also check for TFD_NONBLOCK, + since the code is using TFD_NONBLOCK now. + 2014-07-31 Paul Eggert Simplify timerfd configuration and fix some minor glitches. === modified file 'configure.ac' --- configure.ac 2014-07-31 20:17:01 +0000 +++ configure.ac 2014-08-02 21:50:13 +0000 @@ -3714,9 +3714,10 @@ AC_CACHE_CHECK([for timerfd interface], [emacs_cv_have_timerfd], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include - ]], - [[timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC); - timerfd_settime (0, TFD_TIMER_ABSTIME, 0, 0);]])], + ]], + [[timerfd_create (CLOCK_REALTIME, + TFD_CLOEXEC | TFD_NONBLOCK); + timerfd_settime (0, TFD_TIMER_ABSTIME, 0, 0);]])], [emacs_cv_have_timerfd=yes], [emacs_cv_have_timerfd=no])]) if test "$emacs_cv_have_timerfd" = yes; then ------------------------------------------------------------ revno: 117632 committer: Glenn Morris branch nick: trunk timestamp: Sat 2014-08-02 16:22:31 -0400 message: * test/automated/fns-tests.el (fns-tests-compare-strings): Update test. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2014-08-02 05:44:18 +0000 +++ test/ChangeLog 2014-08-02 20:22:31 +0000 @@ -1,5 +1,8 @@ 2014-08-02 Glenn Morris + * automated/fns-tests.el (fns-tests-compare-strings): + Update test. (Bug#17903) + * automated/icalendar-tests.el (icalendar--decode-isodatetime): Use more precise TZ specification, as per 2013-08-04. === modified file 'test/automated/fns-tests.el' --- test/automated/fns-tests.el 2014-06-25 10:36:51 +0000 +++ test/automated/fns-tests.el 2014-08-02 20:22:31 +0000 @@ -73,7 +73,7 @@ (ert-deftest fns-tests-compare-strings () (should-error (compare-strings)) (should-error (compare-strings "xyzzy" "xyzzy")) - (should-error (compare-strings "xyzzy" 0 10 "zyxxy" 0 5)) + (should (= (compare-strings "xyzzy" 0 10 "zyxxy" 0 5) -1)) (should-error (compare-strings "xyzzy" 0 5 "zyxxy" -1 2)) (should-error (compare-strings "xyzzy" 'foo nil "zyxxy" 0 1)) (should-error (compare-strings "xyzzy" 0 'foo "zyxxy" 2 3)) ------------------------------------------------------------ revno: 117631 committer: Alan Mackenzie branch nick: trunk timestamp: Sat 2014-08-02 18:52:48 +0000 message: Fix confusion in C++ file caused by comma in "= {1,2},". cc-engine.el (c-beginning-of-statement-1): In checking for a statement boundary marked by "}", check there's no "=" before the "{". (c-guess-basic-syntax CASE 9B): Call c-beginning-of-statement with non-nil `comma-delim' argument. cc-fonts.el (c-font-lock-declarators): Parse an initializer expression more accurately. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-08-02 16:42:29 +0000 +++ lisp/ChangeLog 2014-08-02 18:52:48 +0000 @@ -1,5 +1,15 @@ 2014-08-02 Alan Mackenzie + Fix confusion in C++ file caused by comma in "= {1,2},". Bug + #17756. + * progmodes/cc-engine.el (c-beginning-of-statement-1): In checking + for a statement boundary marked by "}", check there's no "=" + before the "{". + (c-guess-basic-syntax CASE 9B): Call c-beginning-of-statement with + non-nil `comma-delim' argument. + * progmodes/cc-fonts.el (c-font-lock-declarators): Parse an + initializer expression more accurately. + Correct loop termination condition in c-syntactic-skip-backward. * progmodes/cc-engine.el (c-syntactic-skip-backward): Correct for the situation where, after moving back out of a literal, === modified file 'lisp/progmodes/cc-engine.el' --- lisp/progmodes/cc-engine.el 2014-08-02 16:42:29 +0000 +++ lisp/progmodes/cc-engine.el 2014-08-02 18:52:48 +0000 @@ -1033,7 +1033,10 @@ ;; Just gone back over a brace block? ((and (eq (char-after) ?{) - (not (c-looking-at-inexpr-block lim nil t))) + (not (c-looking-at-inexpr-block lim nil t)) + (save-excursion + (c-backward-token-2 1 t nil) + (not (looking-at "=\\([^=]\\|$\\)")))) (save-excursion (c-forward-sexp) (point))) ;; Just gone back over some paren block? @@ -10476,7 +10479,7 @@ (if (eq (point) (c-point 'boi)) (c-add-syntax 'brace-list-close (point)) (setq lim (c-most-enclosing-brace c-state-cache (point))) - (c-beginning-of-statement-1 lim) + (c-beginning-of-statement-1 lim nil nil t) (c-add-stmt-syntax 'brace-list-close nil t lim paren-state))) (t === modified file 'lisp/progmodes/cc-fonts.el' --- lisp/progmodes/cc-fonts.el 2014-01-01 07:43:34 +0000 +++ lisp/progmodes/cc-fonts.el 2014-08-02 18:52:48 +0000 @@ -1037,7 +1037,8 @@ paren-depth id-face got-init c-last-identifier-range - (separator-prop (if types 'c-decl-type-start 'c-decl-id-start))) + (separator-prop (if types 'c-decl-type-start 'c-decl-id-start)) + brackets-after-id) ;; The following `while' fontifies a single declarator id each time round. ;; It loops only when LIST is non-nil. @@ -1110,13 +1111,24 @@ ;; Search syntactically to the end of the declarator (";", ;; ",", a closing paren, eob etc) or to the beginning of an ;; initializer or function prototype ("=" or "\\s\("). - ;; Note that the open paren will match array specs in - ;; square brackets, and we treat them as initializers too. - (c-syntactic-re-search-forward - "[;,]\\|\\s)\\|\\'\\|\\(=\\|\\s(\\)" limit t t)) + ;; Note that square brackets are now not also treated as + ;; initializers, since this broke when there were also + ;; initializing brace lists. + (let (found) + (while + (and (setq found + (c-syntactic-re-search-forward + "[;,]\\|\\s)\\|\\'\\|\\(=\\|\\s(\\)" limit t t)) + (eq (char-before) ?\[)) + (backward-char) + (c-safe (c-forward-sexp 1)) + (setq found nil) + (setq brackets-after-id t)) + found)) (setq next-pos (match-beginning 0) id-face (if (and (eq (char-after next-pos) ?\() + (not brackets-after-id) (let (c-last-identifier-range) (save-excursion (goto-char next-pos) @@ -1486,9 +1498,12 @@ c-recognize-knr-p) ; Strictly speaking, bogus, but it ; speeds up lisp.h tremendously. (save-excursion + (unless (or (eobp) + (looking-at "\\s(\\|\\s)")) + (forward-char)) (setq bod-res (car (c-beginning-of-decl-1 decl-search-lim))) (if (and (eq bod-res 'same) - (progn + (save-excursion (c-backward-syntactic-ws) (eq (char-before) ?\}))) (c-beginning-of-decl-1 decl-search-lim)) ------------------------------------------------------------ revno: 117630 committer: Dmitry Antipov branch nick: trunk timestamp: Sat 2014-08-02 21:12:11 +0400 message: Fix spacing in ChangeLog diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-08-02 15:56:18 +0000 +++ src/ChangeLog 2014-08-02 17:12:11 +0000 @@ -55,7 +55,7 @@ (timerfd_callback): Ignore weird events with no data. Add tight assertions and comments. (init_atimer) [HAVE_TIMERFD]: Add environment variable to optionally - disable timerfd-based timer. Use TFD_NONBLOCK for timer descriptor. + disable timerfd-based timer. Use TFD_NONBLOCK for timer descriptor. 2014-08-01 Paul Eggert ------------------------------------------------------------ revno: 117629 committer: Alan Mackenzie branch nick: trunk timestamp: Sat 2014-08-02 16:42:29 +0000 message: Correct loop termination condition in c-syntactic-skip-backward. progmodes/cc-engine.el (c-syntactic-skip-backward): Correct for the situation where, after moving back out of a literal, skip-chars-backward doesn't move further, yet checks have still to be done. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-08-01 14:49:28 +0000 +++ lisp/ChangeLog 2014-08-02 16:42:29 +0000 @@ -1,3 +1,11 @@ +2014-08-02 Alan Mackenzie + + Correct loop termination condition in c-syntactic-skip-backward. + * progmodes/cc-engine.el (c-syntactic-skip-backward): Correct for + the situation where, after moving back out of a literal, + skip-chars-backward doesn't move further, yet checks have still to + be done. + 2014-08-01 Eli Zaretskii * tutorial.el (tutorial--display-changes): Accept punctuation === modified file 'lisp/progmodes/cc-engine.el' --- lisp/progmodes/cc-engine.el 2014-06-29 11:26:47 +0000 +++ lisp/progmodes/cc-engine.el 2014-08-02 16:42:29 +0000 @@ -4245,16 +4245,18 @@ ;; loops when it hasn't succeeded. (while (and - (< (skip-chars-backward skip-chars limit) 0) + (let ((pos (point))) + (while (and + (< (skip-chars-backward skip-chars limit) 0) + ;; Don't stop inside a literal. + (when (setq lit-beg (c-ssb-lit-begin)) + (goto-char lit-beg) + t))) + (< (point) pos)) (let ((pos (point)) state-2 pps-end-pos) (cond - ;; Don't stop inside a literal - ((setq lit-beg (c-ssb-lit-begin)) - (goto-char lit-beg) - t) - ((and paren-level (save-excursion (setq state-2 (parse-partial-sexp ------------------------------------------------------------ revno: 117628 fixes bug: http://debbugs.gnu.org/17903 committer: Paul Eggert branch nick: trunk timestamp: Sat 2014-08-02 08:56:18 -0700 message: Make compare-strings more compatible with old behavior. * fns.c (Fcompare_strings): Silently bring too-large ends into range. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-08-02 13:32:40 +0000 +++ src/ChangeLog 2014-08-02 15:56:18 +0000 @@ -1,3 +1,8 @@ +2014-08-02 Paul Eggert + + Make compare-strings more compatible with old behavior (Bug#17903). + * fns.c (Fcompare_strings): Silently bring too-large ends into range. + 2014-08-02 Jan Djärv * gtkutil.c (create_dialog): Force min spacing 10 between buttons. === modified file 'src/fns.c' --- src/fns.c 2014-07-26 13:17:25 +0000 +++ src/fns.c 2014-08-02 15:56:18 +0000 @@ -253,6 +253,13 @@ CHECK_STRING (str1); CHECK_STRING (str2); + /* For backward compatibility, silently bring too-large positive end + values into range. */ + if (INTEGERP (end1) && SCHARS (str1) < XINT (end1)) + end1 = make_number (SCHARS (str1)); + if (INTEGERP (end2) && SCHARS (str2) < XINT (end2)) + end2 = make_number (SCHARS (str2)); + validate_subarray (str1, start1, end1, SCHARS (str1), &from1, &to1); validate_subarray (str2, start2, end2, SCHARS (str2), &from2, &to2); @@ -1720,7 +1727,7 @@ else if (VECTORP (seq)) { ptrdiff_t i, size = ASIZE (seq); - + new = make_uninit_vector (size); for (i = 0; i < size; i++) ASET (new, i, AREF (seq, size - i - 1)); @@ -1737,7 +1744,7 @@ else if (STRINGP (seq)) { ptrdiff_t size = SCHARS (seq), bytes = SBYTES (seq); - + if (size == bytes) { ptrdiff_t i; @@ -1755,7 +1762,7 @@ while (q > SDATA (new)) { int ch, len; - + ch = STRING_CHAR_AND_LENGTH (p, len); p += len, q -= len; CHAR_STRING (ch, q); ------------------------------------------------------------ revno: 117627 fixes bug: http://debbugs.gnu.org/18129 committer: Jan D. branch nick: trunk timestamp: Sat 2014-08-02 15:32:40 +0200 message: * gtkutil.c (create_dialog): Force min spacing 10 between buttons. Don't add label between left and right buttons. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-08-01 15:12:01 +0000 +++ src/ChangeLog 2014-08-02 13:32:40 +0000 @@ -1,3 +1,8 @@ +2014-08-02 Jan Djärv + + * gtkutil.c (create_dialog): Force min spacing 10 between buttons. + Don't add label between left and right buttons (Bug#18129). + 2014-08-01 Paul Eggert Make functions static that no longer need to be extern. === modified file 'src/gtkutil.c' --- src/gtkutil.c 2014-07-27 13:21:30 +0000 +++ src/gtkutil.c 2014-08-02 13:32:40 +0000 @@ -1541,6 +1541,7 @@ gtk_box_set_spacing (wvbox, req.height); if (item->value && strlen (item->value) > 0) button_spacing = 2*req.width/strlen (item->value); + if (button_spacing < 10) button_spacing = 10; } else { @@ -1557,11 +1558,6 @@ { if (make_two_rows) cur_box = GTK_BOX (whbox_down); - else - gtk_box_pack_start (cur_box, - gtk_label_new (""), - TRUE, TRUE, - button_spacing); } } ------------------------------------------------------------ revno: 117626 committer: Glenn Morris branch nick: trunk timestamp: Sat 2014-08-02 01:44:18 -0400 message: * automated/icalendar-tests.el (icalendar--decode-isodatetime): Hydra fix. Use more precise TZ specification, as per 2013-08-04. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2014-07-30 16:25:58 +0000 +++ test/ChangeLog 2014-08-02 05:44:18 +0000 @@ -1,6 +1,12 @@ +2014-08-02 Glenn Morris + + * automated/icalendar-tests.el (icalendar--decode-isodatetime): + Use more precise TZ specification, as per 2013-08-04. + 2014-07-30 Ulf Jasper - * automated/icalendar-tests.el (icalendar--decode-isodatetime): New test. + * automated/icalendar-tests.el (icalendar--decode-isodatetime): + New test. 2014-07-28 Dmitry Antipov === modified file 'test/automated/icalendar-tests.el' --- test/automated/icalendar-tests.el 2014-07-30 16:25:58 +0000 +++ test/automated/icalendar-tests.el 2014-08-02 05:44:18 +0000 @@ -420,8 +420,8 @@ result) (unwind-protect (progn - ;; Use Eastern European Time (UTC+1, UTC+2 daylight saving) - (setenv "TZ" "EET") + ;; Use Eastern European Time (UTC+2, UTC+3 daylight saving) + (setenv "TZ" "EET-2EEST,M3.5.0/3,M10.5.0/4") (message "%s" (current-time-zone (encode-time 0 0 10 1 1 2013 0))) (message "%s" (current-time-zone (encode-time 0 0 10 1 8 2013 0)))