commit 7fa96cb5ef8c8464496688e88c1b97211a820d79 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sat Sep 17 15:06:24 2016 -0700 Port January __morecore changes to AIX 7.1 * src/vm-limit.c (__MALLOC_HOOK_VOLATILE, __morecore) (__after_morecore_hook): * src/ralloc.c (__morecore): Declare if DOUG_LEA_MALLOC is not defined, not if HAVE_MALLOC_H is not defined. does not declare these in AIX 7.1. diff --git a/src/ralloc.c b/src/ralloc.c index 071cee7..2faa42e 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -81,7 +81,8 @@ static int extra_bytes; #ifdef HAVE_MALLOC_H # include -#else +#endif +#ifndef DOUG_LEA_MALLOC extern void *(*__morecore) (ptrdiff_t); #endif diff --git a/src/vm-limit.c b/src/vm-limit.c index 58e7729..d53eeca 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c @@ -54,7 +54,7 @@ char data_start[1] = { 1 }; #ifdef HAVE_MALLOC_H # include #endif -#ifndef HAVE_MALLOC_H +#ifndef DOUG_LEA_MALLOC # ifndef __MALLOC_HOOK_VOLATILE # define __MALLOC_HOOK_VOLATILE volatile # endif commit 7cd3d85013896dc4160f70228fc198c65a42b2e2 Author: Paul Eggert Date: Sat Sep 17 11:05:07 2016 -0700 Define _GNU_SOURCE in files delaying config.h Problem reported by Richard Copley in: http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00440.html * src/w32.c, src/w32notify.c, src/w32proc.c (_GNU_SOURCE): Define early. diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 2ba67df..185a9d1 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -85,11 +85,8 @@ along with GNU Emacs. If not, see . */ be changed accordingly. */ -/* Make symbols like LLONG_WIDTH visible when the Gnulib - is included before . */ -#ifndef _GNU_SOURCE +/* Enable GNU extensions in gnulib replacement headers. */ #define _GNU_SOURCE 1 -#endif /* config.h #define:s malloc/realloc/free and then includes stdlib.h. We want the undefined versions, but if config.h includes stdlib.h diff --git a/src/w32.c b/src/w32.c index 1db3426..6cb8e74 100644 --- a/src/w32.c +++ b/src/w32.c @@ -21,6 +21,9 @@ along with GNU Emacs. If not, see . */ Geoff Voelker (voelker@cs.washington.edu) 7-29-94 */ +/* Enable GNU extensions in gnulib replacement headers. */ +#define _GNU_SOURCE 1 + #include #include /* for offsetof */ #include diff --git a/src/w32notify.c b/src/w32notify.c index d4a113a..15e8a86 100644 --- a/src/w32notify.c +++ b/src/w32notify.c @@ -81,6 +81,9 @@ along with GNU Emacs. If not, see . */ thread to exit. The main thread waits for some time for the worker thread to exit, and if it doesn't, terminates it forcibly. */ +/* Enable GNU extensions in gnulib replacement headers. */ +#define _GNU_SOURCE 1 + #include #include diff --git a/src/w32proc.c b/src/w32proc.c index 90cef32..e23b1b3 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -22,6 +22,9 @@ along with GNU Emacs. If not, see . */ Adapted from alarm.c by Tim Fleehart */ +/* Enable GNU extensions in gnulib replacement headers. */ +#define _GNU_SOURCE 1 + #include #include #include commit d7f0daf7ecaa7b138f7c66796e23fa5982b0a8bb Author: Eli Zaretskii Date: Sat Sep 17 19:12:46 2016 +0300 Update the bidi test code and data * test/manual/BidiCharacterTest.txt: Import the version from Unicode Standard 9.0.0. * test/manual/biditest.el (biditest-generate-testfile): Allow 'x' in the 4th field of the test data. diff --git a/test/manual/BidiCharacterTest.txt b/test/manual/BidiCharacterTest.txt index 7a460b4..7e04d6c 100644 --- a/test/manual/BidiCharacterTest.txt +++ b/test/manual/BidiCharacterTest.txt @@ -1,13 +1,14 @@ -# BidiCharacterTest-8.0.0.txt -# Date: 2015-02-19, 00:30:00 GMT [LI] +# BidiCharacterTest-9.0.0.txt +# Date: 2016-01-15, 22:30:00 GMT [LI] +# © 2016 Unicode®, Inc. +# For terms of use, see http://www.unicode.org/terms_of_use.html # # Unicode Character Database -# Copyright (c) 1991-2015 Unicode, Inc. -# For terms of use, see http://www.unicode.org/terms_of_use.html +# For documentation, see http://www.unicode.org/reports/tr44/ # # This file provides a conformance test for implementations of the # Unicode Bidirectional Algorithm, specified in UAX #9: Unicode -# Bidirectional Algorithm, at http://www.unicode.org/unicode/reports/tr9/ +# Bidirectional Algorithm, at http://www.unicode.org/reports/tr9/ # # The test data has been generated with a few constraints. Each test case # is a single paragraph, so the test data does not contain any characters @@ -34,6 +35,7 @@ # # Comment lines start with '#'. +################################################################################ # Examples from UAX #9 # Examples from Section 3.3.5 @@ -50,6 +52,48 @@ 0627 0628 062C 0020 0062 006F 006F 006B 0028 0073 0029;0;0;1 1 1 0 0 0 0 0 0 0 0;2 1 0 3 4 5 6 7 8 9 10 0627 0628 062C 0020 0062 006F 006F 006B 0028 0073 0029;1;1;1 1 1 1 2 2 2 2 2 2 2;4 5 6 7 8 9 10 3 2 1 0 +################################################################################ +# Test cases for the algorithm changes and clarifications made in Unicode 8.0 + +# Explicit directional overrides applied to isolates tightly flanked by embeddings +202E 0061 202A 0062 202C 2066 0063 2069 202A 0064 202C 0065 202C;2;0;x 1 x 2 x 1 2 1 x 2 x 1 x;11 9 7 6 5 3 1 +202E 0061 202A 0062 202C 2066 0063 2069 202A 0064 202C 0065 202C;1;1;x 3 x 4 x 3 4 3 x 4 x 3 x;11 9 7 6 5 3 1 +202D 05D0 202B 05D1 202C 2068 05D2 2069 202B 05D3 202C 05D4 202C;2;1;x 2 x 3 x 2 3 2 x 3 x 2 x;1 3 5 6 7 9 11 +202D 0661 202B 0662 202C 2068 0663 2069 202B 0664 202C 0665 202C;0;0;x 2 x 4 x 2 6 2 x 4 x 2 x;1 3 5 6 7 9 11 + +# Explicit directional overrides applied to paired brackets +202A 05D0 0028 05D1 202C 202D 0029;2;1;x 3 3 3 x x 2;3 2 1 6 +202A 05D0 0028 05D1 202C 202D 0029 202C;2;1;x 3 3 3 x x 2 x;3 2 1 6 +202B 0061 0028 0062 202C 202E 0029;2;0;x 2 2 2 x x 1;6 1 2 3 +202B 0061 0028 0062 202C 202E 0029 202C;2;0;x 2 2 2 x x 1 x;6 1 2 3 +202A 202E 0061 202C 0028 05D0 202C 202D 0029 202C;2;0;x x 3 x 3 3 x x 2 x;5 4 2 8 +202B 202D 05D0 202C 0028 0061 202C 202E 0029 202C;2;1;x x 4 x 4 4 x x 3 x;8 2 4 5 +202A 202E 0061 202C 0028 005B 05D0 202C 202D 005D 0029 202C;2;0;x x 3 x 3 3 3 x x 2 2 x;6 5 4 2 9 10 +202B 202D 05D0 202C 0028 005B 0061 202C 202E 005D 0029 202C;2;1;x x 4 x 4 4 4 x x 3 3 x;10 9 2 4 5 6 +202D 0028 202C 202A 05D0 0029 05D1;2;1;x 2 x x 3 3 3;1 6 5 4 +202D 0028 202C 202A 05D0 0029 05D1 202C;2;1;x 2 x x 3 3 3 x;1 6 5 4 +202E 0028 202C 202B 0061 0029 0062;2;0;x 1 x x 2 2 2;4 5 6 1 +202E 0028 202C 202B 0061 0029 0062 202C;2;0;x 1 x x 2 2 2 x;4 5 6 1 +202D 202E 0061 202C 0028 202C 202A 05D0 0029 05D1;2;0;x x 3 x 2 x x 3 3 3;2 4 9 8 7 +202E 202D 05D0 202C 0028 202C 202B 0061 0029 0062;2;1;x x 4 x 3 x x 4 4 4;7 8 9 4 2 +202D 202E 0061 202C 0028 005B 202C 202A 05D0 005D 0029 05D1;2;0;x x 3 x 2 2 x x 3 3 3 3;2 4 5 11 10 9 8 +202E 202D 05D0 202C 0028 005B 202C 202B 0061 005D 0029 0062;2;1;x x 4 x 3 3 x x 4 4 4 4;8 9 10 11 5 4 2 + +# Nonspacing marks applied to paired brackets +0061 0028 0062 0029 0331;1;1;2 2 2 2 2;0 1 2 3 4 +0061 0028 0332 0062 0029 0333;1;1;2 2 2 2 2 2;0 1 2 3 4 5 +05D0 0028 05D1 0029 0331;0;0;1 1 1 1 1;4 3 2 1 0 +05D0 0028 0332 05D1 0029 0333;0;0;1 1 1 1 1 1;5 4 3 2 1 0 +0661 0028 0662 0029 0331;0;0;2 1 2 1 1;4 3 2 1 0 +0661 0028 0332 0662 0029 0333;0;0;2 1 1 2 1 1;5 4 3 2 1 0 + +# Nested bracket pairs that reach and exceed the fixed capacity of the bracket stack +# a ( ( ... ( b ) ) ... ) with 62, 63, and 64 nested bracket pairs +0061 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0062 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029;1;1;2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2;0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 +0061 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0062 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029;1;1;2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2;0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 +0061 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0028 0062 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029 0029;1;1;2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1;129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 + +################################################################################ # Miscellaneous test cases # Various sequences @@ -246,6 +290,7 @@ 05D0 0020 2329 05D1 002E 0031 3009;0;0;1 1 1 1 1 2 1;6 5 4 3 2 1 0 05D0 0020 3008 05D1 002E 0031 232A;0;0;1 1 1 1 1 2 1;6 5 4 3 2 1 0 +################################################################################ # Permutations of sequences containing paired brackets # The sequences in this section consist of permutation patterns of three diff --git a/test/manual/biditest.el b/test/manual/biditest.el index 3545c50..c1a5750 100644 --- a/test/manual/biditest.el +++ b/test/manual/biditest.el @@ -46,7 +46,7 @@ The resulting file should be viewed with `inhibit-bidi-mirroring' set to t." (insert-file-contents input-file) (goto-char (point-min)) (while (not (eobp)) - (when (looking-at "^\\([0-9A-F ]+\\);\\([012]\\);\\([01]\\);\\([0-9 ]+\\);\\([0-9 ]+\\)$") + (when (looking-at "^\\([0-9A-F ]+\\);\\([012]\\);\\([01]\\);\\([0-9x ]+\\);\\([0-9 ]+\\)$") (let ((codes (match-string 1)) (default-paragraph (match-string 2)) (resolved-paragraph (match-string 3)) commit ee3daab0232189d51eef46e793aea087c271688c Author: Tino Calancha Date: Sat Sep 17 22:38:19 2016 +0900 ibuffer-do-toggle-read-only: Fix unused argument * lisp/ibuffer.el (ibuffer-do-toggle-read-only): Call 'read-only-mode' with ARG when its an integer. Clarify the meaning of ARG in doc string. diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 8e24629..0336f1d 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1299,13 +1299,15 @@ a new window in the current frame, splitting vertically." :modifier-p t) (set-buffer-modified-p (not (buffer-modified-p)))) -(define-ibuffer-op ibuffer-do-toggle-read-only (&optional _arg);FIXME:arg unused! +(define-ibuffer-op ibuffer-do-toggle-read-only (&optional arg) "Toggle read only status in marked buffers. -With optional ARG, make read-only only if ARG is not negative." +If optional ARG is a non-negative integer, make buffers read only. +If ARG is a negative integer or 0, make buffers writable. +Otherwise, toggle read only status." (:opstring "toggled read only status in" :interactive "P" :modifier-p t) - (read-only-mode 'toggle)) + (read-only-mode (if (integerp arg) arg 'toggle))) (define-ibuffer-op ibuffer-do-delete () "Kill marked buffers as with `kill-this-buffer'." commit 277e7b011d4131a1f0ecde38ecd48429d5fe388c Author: Alan Mackenzie Date: Sat Sep 17 12:43:54 2016 +0000 Improve accuracy of line/column numbers in byte compiler's warning messages. * lisp/emacs-lisp/bytecomp.el (byte-compile-set-symbol-position): ensure new value of byte-compile-last-position is not lower than old value. (byte-compile-function-warn): call byte-compile-set-symbol-position. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index b6bb1d6..c34ec5c 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1022,39 +1022,42 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." (setcdr list (cddr list))) total))) -;; The purpose of this function is to iterate through the -;; `read-symbol-positions-list'. Each time we process, say, a -;; function definition (`defun') we remove `defun' from -;; `read-symbol-positions-list', and set `byte-compile-last-position' -;; to that symbol's character position. Similarly, if we encounter a -;; variable reference, like in (1+ foo), we remove `foo' from the -;; list. If our current position is after the symbol's position, we -;; assume we've already passed that point, and look for the next -;; occurrence of the symbol. +;; The purpose of `byte-compile-set-symbol-position' is to attempt to +;; set `byte-compile-last-position' to the "current position" in the +;; raw source code. This is used for warning and error messages. ;; -;; This function should not be called twice for the same occurrence of -;; a symbol, and it should not be called for symbols generated by the -;; byte compiler itself; because rather than just fail looking up the -;; symbol, we may find an occurrence of the symbol further ahead, and -;; then `byte-compile-last-position' as advanced too far. +;; The function should be called for most occurrences of symbols in +;; the forms being compiled, strictly in the order they occur in the +;; source code. It should never be called twice for any single +;; occurrence, and should not be called for symbols generated by the +;; byte compiler itself. ;; -;; So your're probably asking yourself: Isn't this function a -;; gross hack? And the answer, of course, would be yes. +;; The function works by scanning the elements in the alist +;; `read-symbol-positions-list' for the next match for the symbol +;; after the current value of `byte-compile-last-position', setting +;; that variable to the match's character position, then deleting the +;; matching element from the list. Thus the new value for +;; `byte-compile-last-position' is later than the old value unless, +;; perhaps, ALLOW-PREVIOUS is non-nil. +;; +;; So your're probably asking yourself: Isn't this function a gross +;; hack? And the answer, of course, would be yes. (defun byte-compile-set-symbol-position (sym &optional allow-previous) (when byte-compile-read-position - (let (last entry) + (let ((last byte-compile-last-position) + entry) (while (progn - (setq last byte-compile-last-position - entry (assq sym read-symbol-positions-list)) + (setq entry (assq sym read-symbol-positions-list)) (when entry (setq byte-compile-last-position (+ byte-compile-read-position (cdr entry)) read-symbol-positions-list (byte-compile-delete-first entry read-symbol-positions-list))) - (or (and allow-previous - (not (= last byte-compile-last-position))) - (> last byte-compile-last-position))))))) + (and entry + (or (and allow-previous + (not (= last byte-compile-last-position))) + (> last byte-compile-last-position)))))))) (defvar byte-compile-last-warned-form nil) (defvar byte-compile-last-logged-file nil) @@ -1284,6 +1287,7 @@ when printing the error message." (t (format "%d-%d" (car signature) (cdr signature))))) (defun byte-compile-function-warn (f nargs def) + (byte-compile-set-symbol-position f) (when (get f 'byte-obsolete-info) (byte-compile-warn-obsolete f))