diff options
| -rw-r--r-- | etc/ChangeLog | 5 | ||||
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | etc/charsets/GB180302.map | 33 | ||||
| -rw-r--r-- | etc/charsets/GB180304.map | 10 | ||||
| -rw-r--r-- | lisp/ChangeLog | 16 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/cc-fonts.el | 47 | ||||
| -rw-r--r-- | lisp/progmodes/cc-langs.el | 2 | ||||
| -rw-r--r-- | lisp/xwidget.el | 6 | ||||
| -rw-r--r-- | src/ChangeLog | 22 | ||||
| -rw-r--r-- | src/alloc.c | 10 | ||||
| -rw-r--r-- | src/fileio.c | 35 | ||||
| -rw-r--r-- | src/gnutls.c | 12 | ||||
| -rw-r--r-- | src/process.h | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 4 |
15 files changed, 174 insertions, 43 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index d56523167d9..dfe4630e5bb 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-07-18 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * charsets/GB180302.map: Update to 2005 edition. | ||
| 4 | * charsets/GB180304.map: Likewise. | ||
| 5 | |||
| 1 | 2011-07-17 Bill Wohler <wohler@newt.com> | 6 | 2011-07-17 Bill Wohler <wohler@newt.com> |
| 2 | 7 | ||
| 3 | Release MH-E version 8.2.93. | 8 | Release MH-E version 8.2.93. |
| @@ -1077,6 +1077,11 @@ syntactic rules. | |||
| 1077 | ** Syntax tables support a new "comment style c" additionally to style b. | 1077 | ** Syntax tables support a new "comment style c" additionally to style b. |
| 1078 | ** frame-local variables cannot be let-bound any more. | 1078 | ** frame-local variables cannot be let-bound any more. |
| 1079 | ** prog-mode is a new major-mode meant to be the parent of programming mode. | 1079 | ** prog-mode is a new major-mode meant to be the parent of programming mode. |
| 1080 | The prog-mode-hook it defines can be used to enable features for | ||
| 1081 | programming modes. For example: | ||
| 1082 | (add-hook 'prog-mode-hook 'flyspell-prog-mode) | ||
| 1083 | enables on the fly spell checking for comments and strings for | ||
| 1084 | programming modes. | ||
| 1080 | ** define-minor-mode accepts a new keyword :variable. | 1085 | ** define-minor-mode accepts a new keyword :variable. |
| 1081 | 1086 | ||
| 1082 | ** `delete-file' and `delete-directory' now accept optional arg TRASH. | 1087 | ** `delete-file' and `delete-directory' now accept optional arg TRASH. |
diff --git a/etc/charsets/GB180302.map b/etc/charsets/GB180302.map index a001f22153f..ee7e0ecd42e 100644 --- a/etc/charsets/GB180302.map +++ b/etc/charsets/GB180302.map | |||
| @@ -2048,17 +2048,20 @@ | |||
| 2048 | 0xA6B9-0xA6C0 0xE785 | 2048 | 0xA6B9-0xA6C0 0xE785 |
| 2049 | 0xA6C1-0xA6D1 0x03B1 | 2049 | 0xA6C1-0xA6D1 0x03B1 |
| 2050 | 0xA6D2-0xA6D8 0x03C3 | 2050 | 0xA6D2-0xA6D8 0x03C3 |
| 2051 | 0xA6D9-0xA6DF 0xE78D | 2051 | 0xA6D9 0xFE10 |
| 2052 | 0xA6DA 0xFE12 | ||
| 2053 | 0xA6DB 0xFE11 | ||
| 2054 | 0xA6DC-0xA6DF 0xFE13 | ||
| 2052 | 0xA6E0-0xA6E1 0xFE35 | 2055 | 0xA6E0-0xA6E1 0xFE35 |
| 2053 | 0xA6E2-0xA6E3 0xFE39 | 2056 | 0xA6E2-0xA6E3 0xFE39 |
| 2054 | 0xA6E4-0xA6E5 0xFE3F | 2057 | 0xA6E4-0xA6E5 0xFE3F |
| 2055 | 0xA6E6-0xA6E7 0xFE3D | 2058 | 0xA6E6-0xA6E7 0xFE3D |
| 2056 | 0xA6E8-0xA6EB 0xFE41 | 2059 | 0xA6E8-0xA6EB 0xFE41 |
| 2057 | 0xA6EC-0xA6ED 0xE794 | 2060 | 0xA6EC-0xA6ED 0xFE17 |
| 2058 | 0xA6EE-0xA6EF 0xFE3B | 2061 | 0xA6EE-0xA6EF 0xFE3B |
| 2059 | 0xA6F0-0xA6F1 0xFE37 | 2062 | 0xA6F0-0xA6F1 0xFE37 |
| 2060 | 0xA6F2 0xFE31 | 2063 | 0xA6F2 0xFE31 |
| 2061 | 0xA6F3 0xE796 | 2064 | 0xA6F3 0xFE19 |
| 2062 | 0xA6F4-0xA6F5 0xFE33 | 2065 | 0xA6F4-0xA6F5 0xFE33 |
| 2063 | 0xA6F6-0xA6FE 0xE797 | 2066 | 0xA6F6-0xA6FE 0xE797 |
| 2064 | 0xA740-0xA77E 0xE706 | 2067 | 0xA740-0xA77E 0xE706 |
| @@ -2124,7 +2127,7 @@ | |||
| 2124 | 0xA8B9 0x00FC | 2127 | 0xA8B9 0x00FC |
| 2125 | 0xA8BA 0x00EA | 2128 | 0xA8BA 0x00EA |
| 2126 | 0xA8BB 0x0251 | 2129 | 0xA8BB 0x0251 |
| 2127 | 0xA8BC 0xE7C7 | 2130 | 0xA8BC 0x1E3F |
| 2128 | 0xA8BD 0x0144 | 2131 | 0xA8BD 0x0144 |
| 2129 | 0xA8BE 0x0148 | 2132 | 0xA8BE 0x0148 |
| 2130 | 0xA8BF 0x01F9 | 2133 | 0xA8BF 0x01F9 |
| @@ -10385,13 +10388,15 @@ | |||
| 10385 | 0xFE4B-0xFE4C 0xFA23 | 10388 | 0xFE4B-0xFE4C 0xFA23 |
| 10386 | 0xFE4D-0xFE4F 0xFA27 | 10389 | 0xFE4D-0xFE4F 0xFA27 |
| 10387 | 0xFE50 0x2E81 | 10390 | 0xFE50 0x2E81 |
| 10388 | 0xFE51-0xFE53 0xE816 | 10391 | 0xFE51 0x00020087 |
| 10392 | 0xFE52 0x00020089 | ||
| 10393 | 0xFE53 0x000200CC | ||
| 10389 | 0xFE54 0x2E84 | 10394 | 0xFE54 0x2E84 |
| 10390 | 0xFE55 0x3473 | 10395 | 0xFE55 0x3473 |
| 10391 | 0xFE56 0x3447 | 10396 | 0xFE56 0x3447 |
| 10392 | 0xFE57 0x2E88 | 10397 | 0xFE57 0x2E88 |
| 10393 | 0xFE58 0x2E8B | 10398 | 0xFE58 0x2E8B |
| 10394 | 0xFE59 0xE81E | 10399 | 0xFE59 0x9FB4 |
| 10395 | 0xFE5A 0x359E | 10400 | 0xFE5A 0x359E |
| 10396 | 0xFE5B 0x361A | 10401 | 0xFE5B 0x361A |
| 10397 | 0xFE5C 0x360E | 10402 | 0xFE5C 0x360E |
| @@ -10399,17 +10404,18 @@ | |||
| 10399 | 0xFE5E 0x2E97 | 10404 | 0xFE5E 0x2E97 |
| 10400 | 0xFE5F 0x396E | 10405 | 0xFE5F 0x396E |
| 10401 | 0xFE60 0x3918 | 10406 | 0xFE60 0x3918 |
| 10402 | 0xFE61 0xE826 | 10407 | 0xFE61 0x9FB5 |
| 10403 | 0xFE62 0x39CF | 10408 | 0xFE62 0x39CF |
| 10404 | 0xFE63 0x39DF | 10409 | 0xFE63 0x39DF |
| 10405 | 0xFE64 0x3A73 | 10410 | 0xFE64 0x3A73 |
| 10406 | 0xFE65 0x39D0 | 10411 | 0xFE65 0x39D0 |
| 10407 | 0xFE66-0xFE67 0xE82B | 10412 | 0xFE66-0xFE67 0x9FB6 |
| 10408 | 0xFE68 0x3B4E | 10413 | 0xFE68 0x3B4E |
| 10409 | 0xFE69 0x3C6E | 10414 | 0xFE69 0x3C6E |
| 10410 | 0xFE6A 0x3CE0 | 10415 | 0xFE6A 0x3CE0 |
| 10411 | 0xFE6B 0x2EA7 | 10416 | 0xFE6B 0x2EA7 |
| 10412 | 0xFE6C-0xFE6D 0xE831 | 10417 | 0xFE6C 0x000215D7 |
| 10418 | 0xFE6D 0x9FB8 | ||
| 10413 | 0xFE6E 0x2EAA | 10419 | 0xFE6E 0x2EAA |
| 10414 | 0xFE6F 0x4056 | 10420 | 0xFE6F 0x4056 |
| 10415 | 0xFE70 0x415F | 10421 | 0xFE70 0x415F |
| @@ -10417,7 +10423,7 @@ | |||
| 10417 | 0xFE72 0x4337 | 10423 | 0xFE72 0x4337 |
| 10418 | 0xFE73 0x2EB3 | 10424 | 0xFE73 0x2EB3 |
| 10419 | 0xFE74-0xFE75 0x2EB6 | 10425 | 0xFE74-0xFE75 0x2EB6 |
| 10420 | 0xFE76 0xE83B | 10426 | 0xFE76 0x0002298F |
| 10421 | 0xFE77 0x43B1 | 10427 | 0xFE77 0x43B1 |
| 10422 | 0xFE78 0x43AC | 10428 | 0xFE78 0x43AC |
| 10423 | 0xFE79 0x2EBB | 10429 | 0xFE79 0x2EBB |
| @@ -10425,7 +10431,7 @@ | |||
| 10425 | 0xFE7B 0x44D6 | 10431 | 0xFE7B 0x44D6 |
| 10426 | 0xFE7C 0x4661 | 10432 | 0xFE7C 0x4661 |
| 10427 | 0xFE7D 0x464C | 10433 | 0xFE7D 0x464C |
| 10428 | 0xFE7E 0xE843 | 10434 | 0xFE7E 0x9FB9 |
| 10429 | 0xFE80 0x4723 | 10435 | 0xFE80 0x4723 |
| 10430 | 0xFE81 0x4729 | 10436 | 0xFE81 0x4729 |
| 10431 | 0xFE82 0x477C | 10437 | 0xFE82 0x477C |
| @@ -10440,12 +10446,13 @@ | |||
| 10440 | 0xFE8D 0x499B | 10446 | 0xFE8D 0x499B |
| 10441 | 0xFE8E 0x49B7 | 10447 | 0xFE8E 0x49B7 |
| 10442 | 0xFE8F 0x49B6 | 10448 | 0xFE8F 0x49B6 |
| 10443 | 0xFE90-0xFE91 0xE854 | 10449 | 0xFE90 0x9FBA |
| 10450 | 0xFE91 0x000241FE | ||
| 10444 | 0xFE92 0x4CA3 | 10451 | 0xFE92 0x4CA3 |
| 10445 | 0xFE93-0xFE95 0x4C9F | 10452 | 0xFE93-0xFE95 0x4C9F |
| 10446 | 0xFE96 0x4C77 | 10453 | 0xFE96 0x4C77 |
| 10447 | 0xFE97 0x4CA2 | 10454 | 0xFE97 0x4CA2 |
| 10448 | 0xFE98-0xFE9E 0x4D13 | 10455 | 0xFE98-0xFE9E 0x4D13 |
| 10449 | 0xFE9F 0x4DAE | 10456 | 0xFE9F 0x4DAE |
| 10450 | 0xFEA0 0xE864 | 10457 | 0xFEA0 0x9FBB |
| 10451 | 0xFEA1-0xFEFE 0xE468 | 10458 | 0xFEA1-0xFEFE 0xE468 |
diff --git a/etc/charsets/GB180304.map b/etc/charsets/GB180304.map index e81eacff601..31352e266c8 100644 --- a/etc/charsets/GB180304.map +++ b/etc/charsets/GB180304.map | |||
| @@ -40,7 +40,8 @@ | |||
| 40 | 0x8130CC30-0x8130D134 0x03CA | 40 | 0x8130CC30-0x8130D134 0x03CA |
| 41 | 0x8130D135-0x8130D238 0x0402 | 41 | 0x8130D135-0x8130D238 0x0402 |
| 42 | 0x8130D239 0x0450 | 42 | 0x8130D239 0x0450 |
| 43 | 0x8130D330-0x8136A531 0x0452 | 43 | 0x8130D330-0x8135F436 0x0452 |
| 44 | 0x8135F438-0x8136A531 0x1E40 | ||
| 44 | 0x8136A532-0x8136A533 0x2011 | 45 | 0x8136A532-0x8136A533 0x2011 |
| 45 | 0x8136A534 0x2017 | 46 | 0x8136A534 0x2017 |
| 46 | 0x8136A535-0x8136A536 0x201A | 47 | 0x8136A535-0x8136A536 0x201A |
| @@ -171,8 +172,10 @@ | |||
| 171 | 0x8234EB33-0x8234F633 0x4CA4 | 172 | 0x8234EB33-0x8234F633 0x4CA4 |
| 172 | 0x8234F634-0x82358731 0x4D1A | 173 | 0x8234F634-0x82358731 0x4D1A |
| 173 | 0x82358732-0x82358F32 0x4DAF | 174 | 0x82358732-0x82358F32 0x4DAF |
| 174 | 0x82358F33-0x8336C738 0x9FA6 | 175 | 0x82358F33-0x82359036 0x9FA6 |
| 176 | 0x82359135-0x8336C738 0x9FBC | ||
| 175 | 0x8336C739 0xE76C | 177 | 0x8336C739 0xE76C |
| 178 | 0x8135F437 0xE7C7 | ||
| 176 | 0x8336C830 0xE7C8 | 179 | 0x8336C830 0xE7C8 |
| 177 | 0x8336C831-0x8336C933 0xE7E7 | 180 | 0x8336C831-0x8336C933 0xE7E7 |
| 178 | 0x8336C934 0xE815 | 181 | 0x8336C934 0xE815 |
| @@ -196,7 +199,8 @@ | |||
| 196 | 0x84309B39-0x84309C34 0xFA19 | 199 | 0x84309B39-0x84309C34 0xFA19 |
| 197 | 0x84309C35 0xFA22 | 200 | 0x84309C35 0xFA22 |
| 198 | 0x84309C36-0x84309C37 0xFA25 | 201 | 0x84309C36-0x84309C37 0xFA25 |
| 199 | 0x84309C38-0x84318537 0xFA2A | 202 | 0x84309C38-0x84318235 0xFA2A |
| 203 | 0x84318336-0x84318537 0xFE1A | ||
| 200 | 0x84318538 0xFE32 | 204 | 0x84318538 0xFE32 |
| 201 | 0x84318539-0x84318632 0xFE45 | 205 | 0x84318539-0x84318632 0xFE45 |
| 202 | 0x84318633 0xFE53 | 206 | 0x84318633 0xFE53 |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f320398975c..0ea3d94a01f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2011-07-18 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | Fontify declarators properly when, e.g., a jit-lock chunk begins | ||
| 4 | inside a declaration. | ||
| 5 | |||
| 6 | * progmodes/cc-langs.el (c-symbol-chars): Correct a typo. | ||
| 7 | |||
| 8 | * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): New | ||
| 9 | function. | ||
| 10 | (c-complex-decl-matchers): Insert reference to | ||
| 11 | c-font-lock-enclosing-decls. | ||
| 12 | |||
| 13 | * progmodes/cc-engine.el (c-backward-single-comment): | ||
| 14 | (c-backward-comments): Bind open-paren-in-column-0-is-defun-start | ||
| 15 | to nil around calls to (forward-comment -1). | ||
| 16 | |||
| 1 | 2011-07-17 Lars Magne Ingebrigtsen <larsi@gnus.org> | 17 | 2011-07-17 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 18 | ||
| 3 | * image.el (put-image): Doc typo fix. | 19 | * image.el (put-image): Doc typo fix. |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 38f66b4504e..a6fd28be21d 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -1301,12 +1301,13 @@ This function does not do any hidden buffer changes." | |||
| 1301 | ;; same line. | 1301 | ;; same line. |
| 1302 | (re-search-forward "\\=\\s *[\n\r]" start t) | 1302 | (re-search-forward "\\=\\s *[\n\r]" start t) |
| 1303 | 1303 | ||
| 1304 | (if (if (forward-comment -1) | 1304 | (if (if (let (open-paren-in-column-0-is-defun-start) (forward-comment -1)) |
| 1305 | (if (eolp) | 1305 | (if (eolp) |
| 1306 | ;; If forward-comment above succeeded and we're at eol | 1306 | ;; If forward-comment above succeeded and we're at eol |
| 1307 | ;; then the newline we moved over above didn't end a | 1307 | ;; then the newline we moved over above didn't end a |
| 1308 | ;; line comment, so we give it another go. | 1308 | ;; line comment, so we give it another go. |
| 1309 | (forward-comment -1) | 1309 | (let (open-paren-in-column-0-is-defun-start) |
| 1310 | (forward-comment -1)) | ||
| 1310 | t)) | 1311 | t)) |
| 1311 | 1312 | ||
| 1312 | ;; Emacs <= 20 and XEmacs move back over the closer of a | 1313 | ;; Emacs <= 20 and XEmacs move back over the closer of a |
| @@ -1333,7 +1334,8 @@ comment at the start of cc-engine.el for more info." | |||
| 1333 | ;; return t when moving backwards at bob. | 1334 | ;; return t when moving backwards at bob. |
| 1334 | (not (bobp)) | 1335 | (not (bobp)) |
| 1335 | 1336 | ||
| 1336 | (if (forward-comment -1) | 1337 | (if (let (open-paren-in-column-0-is-defun-start) |
| 1338 | (forward-comment -1)) | ||
| 1337 | (if (looking-at "\\*/") | 1339 | (if (looking-at "\\*/") |
| 1338 | ;; Emacs <= 20 and XEmacs move back over the | 1340 | ;; Emacs <= 20 and XEmacs move back over the |
| 1339 | ;; closer of a block comment that lacks an opener. | 1341 | ;; closer of a block comment that lacks an opener. |
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 600bbc76e9a..0500d48ddbc 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el | |||
| @@ -1346,6 +1346,50 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1346 | (c-font-lock-declarators limit t nil))) | 1346 | (c-font-lock-declarators limit t nil))) |
| 1347 | nil) | 1347 | nil) |
| 1348 | 1348 | ||
| 1349 | (defun c-font-lock-enclosing-decls (limit) | ||
| 1350 | ;; Fontify the declarators of (nested) declarations we're in the middle of. | ||
| 1351 | ;; This is mainly for when a jit-lock etc. chunk starts inside the brace | ||
| 1352 | ;; block of a struct/union/class, etc. | ||
| 1353 | ;; | ||
| 1354 | ;; This function will be called from font-lock for a region bounded by POINT | ||
| 1355 | ;; and LIMIT, as though it were to identify a keyword for | ||
| 1356 | ;; font-lock-keyword-face. It always returns NIL to inhibit this and | ||
| 1357 | ;; prevent a repeat invocation. See elisp/lispref page "Search-based | ||
| 1358 | ;; Fontification". | ||
| 1359 | (let* ((paren-state (c-parse-state)) | ||
| 1360 | (start (point)) | ||
| 1361 | decl-context bo-decl in-typedef type-type ps-elt) | ||
| 1362 | |||
| 1363 | ;; First, are we actually in a "local" declaration? | ||
| 1364 | (setq decl-context (c-beginning-of-decl-1) | ||
| 1365 | bo-decl (point) | ||
| 1366 | in-typedef (looking-at c-typedef-key)) | ||
| 1367 | (if in-typedef (c-forward-token-2)) | ||
| 1368 | (when (and (eq (car decl-context) 'same) | ||
| 1369 | (< bo-decl start)) | ||
| 1370 | ;; Are we genuinely at a type? | ||
| 1371 | (setq type-type (c-forward-type t)) | ||
| 1372 | (if (and type-type | ||
| 1373 | (or (not (eq type-type 'maybe)) | ||
| 1374 | (looking-at c-symbol-key))) | ||
| 1375 | (c-font-lock-declarators limit t in-typedef))) | ||
| 1376 | |||
| 1377 | ;; Secondly, are we in any nested struct/union/class/etc. braces? | ||
| 1378 | (while paren-state | ||
| 1379 | (setq ps-elt (car paren-state) | ||
| 1380 | paren-state (cdr paren-state)) | ||
| 1381 | (when (and (atom ps-elt) | ||
| 1382 | (eq (char-after ps-elt) ?\{)) | ||
| 1383 | (goto-char ps-elt) | ||
| 1384 | (setq decl-context (c-beginning-of-decl-1) | ||
| 1385 | in-typedef (looking-at c-typedef-key)) | ||
| 1386 | (if in-typedef (c-forward-token-2)) | ||
| 1387 | (when (looking-at c-opt-block-decls-with-vars-key) | ||
| 1388 | (goto-char ps-elt) | ||
| 1389 | (when (c-safe (c-forward-sexp)) | ||
| 1390 | (c-forward-syntactic-ws) | ||
| 1391 | (c-font-lock-declarators limit t in-typedef))))))) | ||
| 1392 | |||
| 1349 | (c-lang-defconst c-simple-decl-matchers | 1393 | (c-lang-defconst c-simple-decl-matchers |
| 1350 | "Simple font lock matchers for types and declarations. These are used | 1394 | "Simple font lock matchers for types and declarations. These are used |
| 1351 | on level 2 only and so aren't combined with `c-complex-decl-matchers'." | 1395 | on level 2 only and so aren't combined with `c-complex-decl-matchers'." |
| @@ -1452,6 +1496,9 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'." | |||
| 1452 | ;; Fontify all declarations, casts and normal labels. | 1496 | ;; Fontify all declarations, casts and normal labels. |
| 1453 | c-font-lock-declarations | 1497 | c-font-lock-declarations |
| 1454 | 1498 | ||
| 1499 | ;; Fontify declarators when POINT is within their declaration. | ||
| 1500 | c-font-lock-enclosing-decls | ||
| 1501 | |||
| 1455 | ;; Fontify angle bracket arglists like templates in C++. | 1502 | ;; Fontify angle bracket arglists like templates in C++. |
| 1456 | ,@(when (c-lang-const c-recognize-<>-arglists) | 1503 | ,@(when (c-lang-const c-recognize-<>-arglists) |
| 1457 | `(c-font-lock-<>-arglists)) | 1504 | `(c-font-lock-<>-arglists)) |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index a6459e1724f..9ce23a080d6 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -523,7 +523,7 @@ operator at the top level." | |||
| 523 | 523 | ||
| 524 | (c-lang-defconst c-symbol-chars | 524 | (c-lang-defconst c-symbol-chars |
| 525 | "Set of characters that can be part of a symbol. | 525 | "Set of characters that can be part of a symbol. |
| 526 | This is on the form that fits inside [ ] in a regexp." | 526 | This is of the form that fits inside [ ] in a regexp." |
| 527 | ;; Pike note: With the backquote identifiers this would include most | 527 | ;; Pike note: With the backquote identifiers this would include most |
| 528 | ;; operator chars too, but they are handled with other means instead. | 528 | ;; operator chars too, but they are handled with other means instead. |
| 529 | t (concat c-alnum "_$") | 529 | t (concat c-alnum "_$") |
diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 93dafea7df9..c4482311543 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el | |||
| @@ -72,6 +72,7 @@ defaults to the string looking like a url around the cursor position." | |||
| 72 | (let ((map (make-sparse-keymap))) | 72 | (let ((map (make-sparse-keymap))) |
| 73 | (define-key map "g" 'xwidget-webkit-browse-url) | 73 | (define-key map "g" 'xwidget-webkit-browse-url) |
| 74 | (define-key map "a" 'xwidget-webkit-adjust-size-to-content) | 74 | (define-key map "a" 'xwidget-webkit-adjust-size-to-content) |
| 75 | (define-key map "b" 'xwidget-webkit-back ) | ||
| 75 | (define-key map "\C-m" 'xwidget-webkit-insert-string) | 76 | (define-key map "\C-m" 'xwidget-webkit-insert-string) |
| 76 | map) | 77 | map) |
| 77 | 78 | ||
| @@ -126,6 +127,11 @@ defaults to the string looking like a url around the cursor position." | |||
| 126 | (xwidget-webkit-goto-uri ( xwidget-webkit-last-session) url) | 127 | (xwidget-webkit-goto-uri ( xwidget-webkit-last-session) url) |
| 127 | ( xwidget-webkit-new-session url))) | 128 | ( xwidget-webkit-new-session url))) |
| 128 | 129 | ||
| 130 | (defun xwidget-webkit-back () | ||
| 131 | (interactive) | ||
| 132 | (xwidget-webkit-execute-script ( xwidget-webkit-last-session) "history.go(-1);") | ||
| 133 | ) | ||
| 134 | |||
| 129 | 135 | ||
| 130 | ;; use declare here? | 136 | ;; use declare here? |
| 131 | ;; (declare-function xwidget-resize-internal "xwidget.c" ) | 137 | ;; (declare-function xwidget-resize-internal "xwidget.c" ) |
diff --git a/src/ChangeLog b/src/ChangeLog index c06c98c5418..484a4420363 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2011-07-18 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask. | ||
| 4 | This fixes some race conditions on the permissions of any newly | ||
| 5 | created file. | ||
| 6 | |||
| 7 | * alloc.c (valid_pointer_p): Use pipe, not open. | ||
| 8 | This fixes some permissions issues when debugging. | ||
| 9 | |||
| 10 | * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002) | ||
| 11 | If fchown fails to set both uid and gid, try to set just gid, | ||
| 12 | as that is sometimes allowed. Adjust the file's mode to eliminate | ||
| 13 | setuid or setgid bits that are inappropriate if fchown fails. | ||
| 14 | |||
| 15 | 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 16 | |||
| 17 | * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ | ||
| 18 | to compare Lisp_Objects. | ||
| 19 | * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to | ||
| 20 | global_gnutls_log_level, don't mistake it for a Lisp_Object. | ||
| 21 | (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses. | ||
| 22 | |||
| 1 | 2011-07-17 Andreas Schwab <schwab@linux-m68k.org> | 23 | 2011-07-17 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 24 | ||
| 3 | * lread.c (read_integer): Unread even EOF character. | 25 | * lread.c (read_integer): Unread even EOF character. |
diff --git a/src/alloc.c b/src/alloc.c index 44f935c243d..d48d1f34dbd 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -4415,18 +4415,18 @@ valid_pointer_p (void *p) | |||
| 4415 | #ifdef WINDOWSNT | 4415 | #ifdef WINDOWSNT |
| 4416 | return w32_valid_pointer_p (p, 16); | 4416 | return w32_valid_pointer_p (p, 16); |
| 4417 | #else | 4417 | #else |
| 4418 | int fd; | 4418 | int fd[2]; |
| 4419 | 4419 | ||
| 4420 | /* Obviously, we cannot just access it (we would SEGV trying), so we | 4420 | /* Obviously, we cannot just access it (we would SEGV trying), so we |
| 4421 | trick the o/s to tell us whether p is a valid pointer. | 4421 | trick the o/s to tell us whether p is a valid pointer. |
| 4422 | Unfortunately, we cannot use NULL_DEVICE here, as emacs_write may | 4422 | Unfortunately, we cannot use NULL_DEVICE here, as emacs_write may |
| 4423 | not validate p in that case. */ | 4423 | not validate p in that case. */ |
| 4424 | 4424 | ||
| 4425 | if ((fd = emacs_open ("__Valid__Lisp__Object__", O_CREAT | O_WRONLY | O_TRUNC, 0666)) >= 0) | 4425 | if (pipe (fd) == 0) |
| 4426 | { | 4426 | { |
| 4427 | int valid = (emacs_write (fd, (char *)p, 16) == 16); | 4427 | int valid = (emacs_write (fd[1], (char *) p, 16) == 16); |
| 4428 | emacs_close (fd); | 4428 | emacs_close (fd[1]); |
| 4429 | unlink ("__Valid__Lisp__Object__"); | 4429 | emacs_close (fd[0]); |
| 4430 | return valid; | 4430 | return valid; |
| 4431 | } | 4431 | } |
| 4432 | 4432 | ||
diff --git a/src/fileio.c b/src/fileio.c index a52e834c2b2..3e1aa54462f 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -38,8 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 38 | #include <selinux/context.h> | 38 | #include <selinux/context.h> |
| 39 | #endif | 39 | #endif |
| 40 | 40 | ||
| 41 | #include <ignore-value.h> | ||
| 42 | |||
| 43 | #include "lisp.h" | 41 | #include "lisp.h" |
| 44 | #include "intervals.h" | 42 | #include "intervals.h" |
| 45 | #include "buffer.h" | 43 | #include "buffer.h" |
| @@ -1939,10 +1937,19 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */) | |||
| 1939 | | (NILP (ok_if_already_exists) ? O_EXCL : 0), | 1937 | | (NILP (ok_if_already_exists) ? O_EXCL : 0), |
| 1940 | S_IREAD | S_IWRITE); | 1938 | S_IREAD | S_IWRITE); |
| 1941 | #else /* not MSDOS */ | 1939 | #else /* not MSDOS */ |
| 1942 | ofd = emacs_open (SSDATA (encoded_newname), | 1940 | { |
| 1943 | O_WRONLY | O_TRUNC | O_CREAT | 1941 | int new_mask = 0666; |
| 1944 | | (NILP (ok_if_already_exists) ? O_EXCL : 0), | 1942 | if (input_file_statable_p) |
| 1945 | 0666); | 1943 | { |
| 1944 | if (!NILP (preserve_uid_gid)) | ||
| 1945 | new_mask = 0600; | ||
| 1946 | new_mask &= st.st_mode; | ||
| 1947 | } | ||
| 1948 | ofd = emacs_open (SSDATA (encoded_newname), | ||
| 1949 | (O_WRONLY | O_TRUNC | O_CREAT | ||
| 1950 | | (NILP (ok_if_already_exists) ? O_EXCL : 0)), | ||
| 1951 | new_mask); | ||
| 1952 | } | ||
| 1946 | #endif /* not MSDOS */ | 1953 | #endif /* not MSDOS */ |
| 1947 | if (ofd < 0) | 1954 | if (ofd < 0) |
| 1948 | report_file_error ("Opening output file", Fcons (newname, Qnil)); | 1955 | report_file_error ("Opening output file", Fcons (newname, Qnil)); |
| @@ -1961,9 +1968,21 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */) | |||
| 1961 | owner and group. */ | 1968 | owner and group. */ |
| 1962 | if (input_file_statable_p) | 1969 | if (input_file_statable_p) |
| 1963 | { | 1970 | { |
| 1971 | int mode_mask = 07777; | ||
| 1964 | if (!NILP (preserve_uid_gid)) | 1972 | if (!NILP (preserve_uid_gid)) |
| 1965 | ignore_value (fchown (ofd, st.st_uid, st.st_gid)); | 1973 | { |
| 1966 | if (fchmod (ofd, st.st_mode & 07777) != 0) | 1974 | /* Attempt to change owner and group. If that doesn't work |
| 1975 | attempt to change just the group, as that is sometimes allowed. | ||
| 1976 | Adjust the mode mask to eliminate setuid or setgid bits | ||
| 1977 | that are inappropriate if the owner and group are wrong. */ | ||
| 1978 | if (fchown (ofd, st.st_uid, st.st_gid) != 0) | ||
| 1979 | { | ||
| 1980 | mode_mask &= ~06000; | ||
| 1981 | if (fchown (ofd, -1, st.st_gid) == 0) | ||
| 1982 | mode_mask |= 02000; | ||
| 1983 | } | ||
| 1984 | } | ||
| 1985 | if (fchmod (ofd, st.st_mode & mode_mask) != 0) | ||
| 1967 | report_file_error ("Doing chmod", Fcons (newname, Qnil)); | 1986 | report_file_error ("Doing chmod", Fcons (newname, Qnil)); |
| 1968 | } | 1987 | } |
| 1969 | #endif /* not MSDOS */ | 1988 | #endif /* not MSDOS */ |
diff --git a/src/gnutls.c b/src/gnutls.c index 52e80a69ae5..3175f55041d 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -193,8 +193,7 @@ init_gnutls_functions (Lisp_Object libraries) | |||
| 193 | LOAD_GNUTLS_FN (library, gnutls_x509_crt_import); | 193 | LOAD_GNUTLS_FN (library, gnutls_x509_crt_import); |
| 194 | LOAD_GNUTLS_FN (library, gnutls_x509_crt_init); | 194 | LOAD_GNUTLS_FN (library, gnutls_x509_crt_init); |
| 195 | 195 | ||
| 196 | if (NUMBERP (Vgnutls_log_level)) | 196 | max_log_level = global_gnutls_log_level; |
| 197 | max_log_level = XINT (Vgnutls_log_level); | ||
| 198 | 197 | ||
| 199 | GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:", | 198 | GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:", |
| 200 | SDATA (Fget (Qgnutls_dll, QCloaded_from))); | 199 | SDATA (Fget (Qgnutls_dll, QCloaded_from))); |
| @@ -406,8 +405,7 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err) | |||
| 406 | if (err >= 0) | 405 | if (err >= 0) |
| 407 | return 0; | 406 | return 0; |
| 408 | 407 | ||
| 409 | if (NUMBERP (Vgnutls_log_level)) | 408 | max_log_level = global_gnutls_log_level; |
| 410 | max_log_level = XINT (Vgnutls_log_level); | ||
| 411 | 409 | ||
| 412 | /* TODO: use gnutls-error-fatalp and gnutls-error-string. */ | 410 | /* TODO: use gnutls-error-fatalp and gnutls-error-string. */ |
| 413 | 411 | ||
| @@ -1155,9 +1153,9 @@ syms_of_gnutls (void) | |||
| 1155 | defsubr (&Sgnutls_bye); | 1153 | defsubr (&Sgnutls_bye); |
| 1156 | defsubr (&Sgnutls_available_p); | 1154 | defsubr (&Sgnutls_available_p); |
| 1157 | 1155 | ||
| 1158 | DEFVAR_INT ("gnutls-log-level", Vgnutls_log_level, | 1156 | DEFVAR_INT ("gnutls-log-level", global_gnutls_log_level, |
| 1159 | doc: /* Logging level used by the GnuTLS functions. */); | 1157 | doc: /* Logging level used by the GnuTLS functions. */); |
| 1160 | Vgnutls_log_level = make_number (0); | 1158 | global_gnutls_log_level = 0; |
| 1161 | } | 1159 | } |
| 1162 | 1160 | ||
| 1163 | #endif /* HAVE_GNUTLS */ | 1161 | #endif /* HAVE_GNUTLS */ |
diff --git a/src/process.h b/src/process.h index 4866a8c1022..aff9e970f63 100644 --- a/src/process.h +++ b/src/process.h | |||
| @@ -141,7 +141,7 @@ struct Lisp_Process | |||
| 141 | /* Every field in the preceding structure except for the first two | 141 | /* Every field in the preceding structure except for the first two |
| 142 | must be a Lisp_Object, for GC's sake. */ | 142 | must be a Lisp_Object, for GC's sake. */ |
| 143 | 143 | ||
| 144 | #define ChannelMask(n) (1<<(n)) | 144 | #define ChannelMask(n) (1 << (n)) |
| 145 | 145 | ||
| 146 | /* True if we are about to fork off a synchronous process or if we | 146 | /* True if we are about to fork off a synchronous process or if we |
| 147 | are waiting for it. */ | 147 | are waiting for it. */ |
diff --git a/src/xdisp.c b/src/xdisp.c index cd87d00d8d0..816c7d36ce3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -6968,7 +6968,7 @@ next_element_from_string (struct it *it) | |||
| 6968 | struct text_pos position; | 6968 | struct text_pos position; |
| 6969 | 6969 | ||
| 6970 | xassert (STRINGP (it->string)); | 6970 | xassert (STRINGP (it->string)); |
| 6971 | xassert (!it->bidi_p || it->string == it->bidi_it.string.lstring); | 6971 | xassert (!it->bidi_p || EQ (it->string, it->bidi_it.string.lstring)); |
| 6972 | xassert (IT_STRING_CHARPOS (*it) >= 0); | 6972 | xassert (IT_STRING_CHARPOS (*it) >= 0); |
| 6973 | position = it->current.string_pos; | 6973 | position = it->current.string_pos; |
| 6974 | 6974 | ||
| @@ -7294,7 +7294,7 @@ next_element_from_buffer (struct it *it) | |||
| 7294 | xassert (IT_CHARPOS (*it) >= BEGV); | 7294 | xassert (IT_CHARPOS (*it) >= BEGV); |
| 7295 | xassert (NILP (it->string) && !it->s); | 7295 | xassert (NILP (it->string) && !it->s); |
| 7296 | xassert (!it->bidi_p | 7296 | xassert (!it->bidi_p |
| 7297 | || (it->bidi_it.string.lstring == Qnil | 7297 | || (EQ (it->bidi_it.string.lstring, Qnil) |
| 7298 | && it->bidi_it.string.s == NULL)); | 7298 | && it->bidi_it.string.s == NULL)); |
| 7299 | 7299 | ||
| 7300 | /* With bidi reordering, the character to display might not be the | 7300 | /* With bidi reordering, the character to display might not be the |