Now on revision 111600. ------------------------------------------------------------ revno: 111600 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2013-01-25 10:31:41 +0400 message: * font.c (num_fonts): Remove the leftover from old debugging code. Adjust comment style here and there. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-25 04:41:39 +0000 +++ src/ChangeLog 2013-01-25 06:31:41 +0000 @@ -1,3 +1,8 @@ +2013-01-25 Dmitry Antipov + + * font.c (num_fonts): Remove the leftover from old + debugging code. Adjust comment style here and there. + 2013-01-25 Eli Zaretskii * w32.c (max_filename_mbslen): New function. @@ -36,7 +41,7 @@ (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT properly. Likewise for obscured. * xterm.c: Ditto. - (handle_one_xevent): Save visible state go generate ICONIFY_EVENT + (handle_one_xevent): Save visible state to generate ICONIFY_EVENT properly. * nsterm.m: Ditto. (windowDidDeminiaturize): Generate DEICONIFY_EVENT. === modified file 'src/font.c' --- src/font.c 2013-01-17 06:29:40 +0000 +++ src/font.c 2013-01-25 06:31:41 +0000 @@ -717,7 +717,7 @@ } -/* Font name parser and unparser */ +/* Font name parser and unparser. */ static int parse_matrix (const char *); static int font_expand_wildcards (Lisp_Object *, int); @@ -1746,7 +1746,7 @@ /* This part (through the next ^L) is still experimental and not tested much. We may drastically change codes. */ -/* OTF handler */ +/* OTF handler. */ #if 0 @@ -2035,7 +2035,7 @@ #endif /* 0 */ -/* Font sorting */ +/* Font sorting. */ static unsigned font_score (Lisp_Object, Lisp_Object *); static int font_compare (const void *, const void *); @@ -2565,7 +2565,6 @@ return val; } -static int num_fonts; static void font_clear_cache (FRAME_PTR f, Lisp_Object cache, struct font_driver *driver) @@ -2598,7 +2597,6 @@ { eassert (font && driver == font->driver); driver->close (f, font); - num_fonts--; } } if (driver->free_entity) @@ -2856,7 +2854,6 @@ return Qnil; ASET (entity, FONT_OBJLIST_INDEX, Fcons (font_object, AREF (entity, FONT_OBJLIST_INDEX))); - num_fonts++; font = XFONT_OBJECT (font_object); min_width = (font->min_width ? font->min_width @@ -2901,7 +2898,6 @@ eassert (FRAME_X_DISPLAY_INFO (f)->n_fonts); FRAME_X_DISPLAY_INFO (f)->n_fonts--; #endif - num_fonts--; } @@ -3578,7 +3574,7 @@ Lisp_Object it; int i; - /* Set boolean values to Qt or Qnil */ + /* Set boolean values to Qt or Qnil. */ for (i = 0; boolean_properties[i] != NULL; ++i) for (it = alist; ! NILP (it); it = XCDR (it)) { @@ -3757,7 +3753,7 @@ #endif -/* Lisp API */ +/* Lisp API. */ DEFUN ("fontp", Ffontp, Sfontp, 1, 2, 0, doc: /* Return t if OBJECT is a font-spec, font-entity, or font-object. ------------------------------------------------------------ revno: 111599 [merge] committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-01-24 20:41:39 -0800 message: Merge from emacs-24; up to r111197 diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-24 21:19:02 +0000 +++ lisp/ChangeLog 2013-01-25 04:41:39 +0000 @@ -1,3 +1,32 @@ +2013-01-25 Fabián Ezequiel Gallina + + * progmodes/python.el: Enhancements to header documentation about + skeletons. (Bug#5716) + + * imenu.el (imenu-default-create-index-function): Remove useless + infinite loop check. (Bug#13438) + +2013-01-25 Alan Mackenzie + + Fix a bug in the state cache mechanism. Refactor this a bit. + + * progmodes/cc-engine.el (c-parse-state-get-strategy): Remove the + `cache-pos' element from the return value. + (c-append-lower-brace-pair-to-state-cache): "Narrow" to end of + buffer to enable proper searching from beyond HERE. Amend the + test for detecting the sought brace pair. Amend the value written + to the "brace desert cache" when the brace isn't found. + (c-remove-stale-state-cache): Rename `good-pos' to `start-point', + and several other variables analogously. + (c-remove-stale-state-cache-backwards): Change `cache-pos' from a + parameter to a locally calculated variable. + (c-parse-state-1): Change the calling conventions to the two + defuns involving `cache-pos'. + +2013-01-25 Chong Yidong + + * xml.el (xml-entity-or-char-ref-re): Fix regexp. + 2013-01-24 Aaron Ecay (tiny change) * paren.el (show-paren-function): Make sure to set 'priority and === modified file 'lisp/imenu.el' --- lisp/imenu.el 2013-01-10 15:36:01 +0000 +++ lisp/imenu.el 2013-01-25 04:41:39 +0000 @@ -683,8 +683,6 @@ (goto-char (point-max)) ;; Search for the function (while (funcall imenu-prev-index-position-function) - (when (= pos (point)) - (error "Infinite loop at %s:%d: imenu-prev-index-position-function does not move point" (buffer-name) pos)) (setq pos (point)) (save-excursion (setq name (funcall imenu-extract-index-name-function))) === modified file 'lisp/profiler.el' --- lisp/profiler.el 2013-01-20 02:39:59 +0000 +++ lisp/profiler.el 2013-01-25 04:41:39 +0000 @@ -20,7 +20,7 @@ ;;; Commentary: -;; +;; See Info node `(elisp)Profiling'. ;;; Code: === modified file 'lisp/progmodes/cc-engine.el' --- lisp/progmodes/cc-engine.el 2013-01-09 21:33:00 +0000 +++ lisp/progmodes/cc-engine.el 2013-01-23 18:58:11 +0000 @@ -2545,14 +2545,12 @@ ;; ;; The return value is a list, one of the following: ;; - ;; o - ('forward CACHE-POS START-POINT) - scan forward from START-POINT, - ;; which is not less than CACHE-POS. - ;; o - ('backward CACHE-POS nil) - scan backwards (from HERE). - ;; o - ('BOD nil START-POINT) - scan forwards from START-POINT, which is at the + ;; o - ('forward START-POINT) - scan forward from START-POINT, + ;; which is not less than the highest position in `c-state-cache' below here. + ;; o - ('backward nil) - scan backwards (from HERE). + ;; o - ('BOD START-POINT) - scan forwards from START-POINT, which is at the ;; top level. - ;; o - ('IN-LIT nil nil) - point is inside the literal containing point-min. - ;; , where CACHE-POS is the highest position recorded in `c-state-cache' at - ;; or below HERE. + ;; o - ('IN-LIT nil) - point is inside the literal containing point-min. (let ((cache-pos (c-get-cache-scan-pos here)) ; highest position below HERE in cache (or 1) BOD-pos ; position of 2nd BOD before HERE. strategy ; 'forward, 'backward, 'BOD, or 'IN-LIT. @@ -2590,7 +2588,6 @@ (list strategy - (and (memq strategy '(forward backward)) cache-pos) (and (memq strategy '(forward BOD)) start-point)))) @@ -2657,7 +2654,8 @@ ;; reduce the time wasted in repeated fruitless searches in brace deserts. (save-excursion (save-restriction - (let* (new-cons + (let* ((here (point-max)) + new-cons (cache-pos (c-state-cache-top-lparen)) ; might be nil. (macro-start-or-from (progn (goto-char from) @@ -2692,6 +2690,7 @@ ;; search bound, even though the algorithm below would skip ;; over the new paren pair. (cache-lim (and cache-pos (< cache-pos from) cache-pos))) + (widen) (narrow-to-region (cond ((and desert-lim cache-lim) @@ -2711,16 +2710,18 @@ (while (and (setq ce (scan-lists bra -1 -1)) ; back past )/]/}; might signal (setq bra (scan-lists ce -1 1)) ; back past (/[/{; might signal - (or (> ce upper-lim) - (not (eq (char-after bra) ?\{)) - (and (goto-char bra) - (c-beginning-of-macro) - (< (point) macro-start-or-from)))))) + (or (> bra here) ;(> ce here) + (and + (< ce here) + (or (not (eq (char-after bra) ?\{)) + (and (goto-char bra) + (c-beginning-of-macro) + (< (point) macro-start-or-from)))))))) (and ce (< ce bra))) (setq bra ce)) ; If we just backed over an unbalanced closing ; brace, ignore it. - (if (and ce (< bra ce) (eq (char-after bra) ?\{)) + (if (and ce (< ce here) (< bra ce) (eq (char-after bra) ?\{)) ;; We've found the desired brace-pair. (progn (setq new-cons (cons bra (1+ ce))) @@ -2734,7 +2735,11 @@ (t (setq c-state-cache (cons new-cons c-state-cache))))) ;; We haven't found a brace pair. Record this in the cache. - (setq c-state-brace-pair-desert (cons cache-pos from)))))))) + (setq c-state-brace-pair-desert + (cons (if (and ce (< bra ce) (> ce here)) ; {..} straddling HERE? + bra + (point-min)) + (min here from))))))))) (defsubst c-state-push-any-brace-pair (bra+1 macro-start-or-here) ;; If BRA+1 is nil, do nothing. Otherwise, BRA+1 is the buffer position @@ -2852,19 +2857,19 @@ (paren+1) (t from))))) -(defun c-remove-stale-state-cache (good-pos pps-point) +(defun c-remove-stale-state-cache (start-point pps-point) ;; Remove stale entries from the `c-cache-state', i.e. those which will ;; not be in it when it is amended for position (point-max). ;; Additionally, the "outermost" open-brace entry before (point-max) ;; will be converted to a cons if the matching close-brace is scanned. ;; - ;; GOOD-POS is a "maximal" "safe position" - there must be no open - ;; parens/braces/brackets between GOOD-POS and (point-max). + ;; START-POINT is a "maximal" "safe position" - there must be no open + ;; parens/braces/brackets between START-POINT and (point-max). ;; ;; As a second thing, calculate the result of parse-partial-sexp at - ;; PPS-POINT, w.r.t. GOOD-POS. The motivation here is that + ;; PPS-POINT, w.r.t. START-POINT. The motivation here is that ;; `c-state-cache-good-pos' may become PPS-POINT, but the caller may need to - ;; adjust it to get outside a string/comment. (Sorry about this! The code + ;; adjust it to get outside a string/comment. (Sorry about this! The code ;; needs to be FAST). ;; ;; Return a list (GOOD-POS SCAN-BACK-POS PPS-STATE), where @@ -2872,7 +2877,9 @@ ;; to be good (we aim for this to be as high as possible); ;; o - SCAN-BACK-POS, if not nil, indicates there may be a brace pair ;; preceding POS which needs to be recorded in `c-state-cache'. It is a - ;; position to scan backwards from. + ;; position to scan backwards from. It is the position of the "{" of the + ;; last element to be removed from `c-state-cache', when that elt is a + ;; cons, otherwise nil. ;; o - PPS-STATE is the parse-partial-sexp state at PPS-POINT. (save-restriction (narrow-to-region 1 (point-max)) @@ -2882,21 +2889,21 @@ (goto-char (point-max)) (and (c-beginning-of-macro) (point)))) - (good-pos-actual-macro-start ; Start of macro containing good-pos - ; or nil - (and (< good-pos (point-max)) + (start-point-actual-macro-start ; Start of macro containing + ; start-point or nil + (and (< start-point (point-max)) (save-excursion - (goto-char good-pos) + (goto-char start-point) (and (c-beginning-of-macro) (point))))) - (good-pos-actual-macro-end ; End of this macro, (maybe + (start-point-actual-macro-end ; End of this macro, (maybe ; (point-max)), or nil. - (and good-pos-actual-macro-start + (and start-point-actual-macro-start (save-excursion - (goto-char good-pos-actual-macro-start) + (goto-char start-point-actual-macro-start) (c-end-of-macro) (point)))) - pps-state ; Will be 9 or 10 elements long. + pps-state ; Will be 9 or 10 elements long. pos upper-lim ; ,beyond which `c-state-cache' entries are removed scan-back-pos @@ -2926,15 +2933,15 @@ ;; The next loop jumps forward out of a nested level of parens each ;; time round; the corresponding elements in `c-state-cache' are ;; removed. `pos' is just after the brace-pair or the open paren at - ;; (car c-state-cache). There can be no open parens/braces/brackets - ;; between `good-pos'/`good-pos-actual-macro-start' and (point-max), + ;; (car c-state-cache). There can be no open parens/braces/brackets + ;; between `start-point'/`start-point-actual-macro-start' and (point-max), ;; due to the interface spec to this function. - (setq pos (if (and good-pos-actual-macro-end - (not (eq good-pos-actual-macro-start + (setq pos (if (and start-point-actual-macro-end + (not (eq start-point-actual-macro-start in-macro-start))) - (1+ good-pos-actual-macro-end) ; get outside the macro as + (1+ start-point-actual-macro-end) ; get outside the macro as ; marked by a `category' text property. - good-pos)) + start-point)) (goto-char pos) (while (and c-state-cache (< (point) (point-max))) @@ -2993,14 +3000,14 @@ (list pos scan-back-pos pps-state))))) -(defun c-remove-stale-state-cache-backwards (here cache-pos) +(defun c-remove-stale-state-cache-backwards (here) ;; Strip stale elements of `c-state-cache' by moving backwards through the ;; buffer, and inform the caller of the scenario detected. ;; ;; HERE is the position we're setting `c-state-cache' for. - ;; CACHE-POS is just after the latest recorded position in `c-state-cache' - ;; before HERE, or a position at or near point-min which isn't in a - ;; literal. + ;; CACHE-POS (a locally bound variable) is just after the latest recorded + ;; position in `c-state-cache' before HERE, or a position at or near + ;; point-min which isn't in a literal. ;; ;; This function must only be called only when (> `c-state-cache-good-pos' ;; HERE). Usually the gap between CACHE-POS and HERE is large. It is thus @@ -3023,10 +3030,11 @@ ;; The comments in this defun use "paren" to mean parenthesis or square ;; bracket (as contrasted with a brace), and "(" and ")" likewise. ;; - ;; . {..} (..) (..) ( .. { } ) (...) ( .... . ..) - ;; | | | | | | - ;; CP E here D C good - (let ((pos c-state-cache-good-pos) + ;; . {..} (..) (..) ( .. { } ) (...) ( .... . ..) + ;; | | | | | | + ;; CP E here D C good + (let ((cache-pos (c-get-cache-scan-pos here)) ; highest position below HERE in cache (or 1) + (pos c-state-cache-good-pos) pa ren ; positions of "(" and ")" dropped-cons ; whether the last element dropped from `c-state-cache' ; was a cons (representing a brace-pair) @@ -3263,7 +3271,8 @@ cache-pos ; highest position below HERE already existing in ; cache (or 1). good-pos - start-point + start-point ; (when scanning forward) a place below HERE where there + ; are no open parens/braces between it and HERE. bopl-state res scan-backward-pos scan-forward-p) ; used for 'backward. @@ -3274,8 +3283,7 @@ ;; Strategy? (setq res (c-parse-state-get-strategy here c-state-cache-good-pos) strategy (car res) - cache-pos (cadr res) - start-point (nth 2 res)) + start-point (cadr res)) (when (eq strategy 'BOD) (setq c-state-cache nil @@ -3302,7 +3310,7 @@ good-pos))) ((eq strategy 'backward) - (setq res (c-remove-stale-state-cache-backwards here cache-pos) + (setq res (c-remove-stale-state-cache-backwards here) good-pos (car res) scan-backward-pos (cadr res) scan-forward-p (car (cddr res))) === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2013-01-13 20:03:01 +0000 +++ lisp/progmodes/python.el 2013-01-25 04:41:39 +0000 @@ -155,7 +155,10 @@ ;; dabbrev. If you have `dabbrev-mode' activated and ;; `python-skeleton-autoinsert' is set to t, then whenever you type ;; the name of any of those defined and hit SPC, they will be -;; automatically expanded. +;; automatically expanded. As an alternative you can use the defined +;; skeleton commands: `python-skeleton-class', `python-skeleton-def' +;; `python-skeleton-for', `python-skeleton-if', `python-skeleton-try' +;; and `python-skeleton-while'. ;; FFAP: You can find the filename for a given module when using ffap ;; out of the box. This feature needs an inferior python shell === modified file 'lisp/xml.el' --- lisp/xml.el 2013-01-01 09:11:05 +0000 +++ lisp/xml.el 2013-01-23 06:25:50 +0000 @@ -200,7 +200,7 @@ ;; [68] EntityRef ::= '&' Name ';' (defconst xml-entity-ref (concat "&" xml-name-re ";")) -(defconst xml-entity-or-char-ref-re (concat "&\\(?:#\\(x\\)?\\([0-9]+\\)\\|\\(" +(defconst xml-entity-or-char-ref-re (concat "&\\(?:#\\(x\\)?\\([0-9a-fA-F]+\\)\\|\\(" xml-name-re "\\)\\);")) ;; [69] PEReference ::= '%' Name ';' === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-24 05:56:31 +0000 +++ src/ChangeLog 2013-01-25 04:41:39 +0000 @@ -1,3 +1,20 @@ +2013-01-25 Eli Zaretskii + + * w32.c (max_filename_mbslen): New function. + (normalize_filename, readdir): Use it to detect locales where ANSI + encoding of file names uses a double-byte character set (DBCS). + If a DBCS encoding is used, advance by characters using + CharNextExA, instead of incrementing a 'char *' pointer. Use + _mbslwr instead of _strlwr. (Bug#13515) + + * w32heap.c (allocate_heap) [!_WIN64]: Decrease the initial + request of memory reservation to 1.7GB. (Bug#13065) + +2013-01-25 Andreas Schwab + + * coding.c (detect_coding_iso_2022): Move back mis-reordered code + at check_extra_latin label. (Bug#13505) + 2013-01-24 Dmitry Antipov * nsfont.m (ns_escape_name, ns_unescape_name, ns_registry_to_script): === modified file 'src/coding.c' --- src/coding.c 2013-01-09 13:50:22 +0000 +++ src/coding.c 2013-01-25 04:41:39 +0000 @@ -3057,20 +3057,7 @@ } if (single_shifting) break; - check_extra_latin: - if (! VECTORP (Vlatin_extra_code_table) - || NILP (AREF (Vlatin_extra_code_table, c))) - { - rejected = CATEGORY_MASK_ISO; - break; - } - if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1]) - & CODING_ISO_FLAG_LATIN_EXTRA) - found |= CATEGORY_MASK_ISO_8_1; - else - rejected |= CATEGORY_MASK_ISO_8_1; - rejected |= CATEGORY_MASK_ISO_8_2; - break; + goto check_extra_latin; default: if (c < 0) @@ -3121,6 +3108,20 @@ } break; } + check_extra_latin: + if (! VECTORP (Vlatin_extra_code_table) + || NILP (AREF (Vlatin_extra_code_table, c))) + { + rejected = CATEGORY_MASK_ISO; + break; + } + if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1]) + & CODING_ISO_FLAG_LATIN_EXTRA) + found |= CATEGORY_MASK_ISO_8_1; + else + rejected |= CATEGORY_MASK_ISO_8_1; + rejected |= CATEGORY_MASK_ISO_8_2; + break; } } detect_info->rejected |= CATEGORY_MASK_ISO; === modified file 'src/w32.c' --- src/w32.c 2013-01-21 18:00:19 +0000 +++ src/w32.c 2013-01-25 04:41:39 +0000 @@ -37,7 +37,7 @@ /* must include CRT headers *before* config.h */ #include -#include /* for _mbspbrk */ +#include /* for _mbspbrk and _mbslwr */ #undef access #undef chdir @@ -1531,6 +1531,67 @@ srand (seed); } +/* Current codepage for encoding file names. */ +static int file_name_codepage; + +/* Return the maximum length in bytes of a multibyte character + sequence encoded in the current ANSI codepage. This is required to + correctly walk the encoded file names one character at a time. */ +static int +max_filename_mbslen (void) +{ + /* A simple cache to avoid calling GetCPInfo every time we need to + normalize a file name. The file-name encoding is not supposed to + be changed too frequently, if ever. */ + static Lisp_Object last_file_name_encoding; + static int last_max_mbslen; + Lisp_Object current_encoding; + + current_encoding = Vfile_name_coding_system; + if (NILP (current_encoding)) + current_encoding = Vdefault_file_name_coding_system; + + if (!EQ (last_file_name_encoding, current_encoding)) + { + CPINFO cp_info; + + last_file_name_encoding = current_encoding; + /* Default to the current ANSI codepage. */ + file_name_codepage = w32_ansi_code_page; + if (!NILP (current_encoding)) + { + char *cpname = SDATA (SYMBOL_NAME (current_encoding)); + char *cp = NULL, *end; + int cpnum; + + if (strncmp (cpname, "cp", 2) == 0) + cp = cpname + 2; + else if (strncmp (cpname, "windows-", 8) == 0) + cp = cpname + 8; + + if (cp) + { + end = cp; + cpnum = strtol (cp, &end, 10); + if (cpnum && *end == '\0' && end - cp >= 2) + file_name_codepage = cpnum; + } + } + + if (!file_name_codepage) + file_name_codepage = CP_ACP; /* CP_ACP = 0, but let's not assume that */ + + if (!GetCPInfo (file_name_codepage, &cp_info)) + { + file_name_codepage = CP_ACP; + if (!GetCPInfo (file_name_codepage, &cp_info)) + emacs_abort (); + } + last_max_mbslen = cp_info.MaxCharSize; + } + + return last_max_mbslen; +} /* Normalize filename by converting all path separators to the specified separator. Also conditionally convert upper @@ -1540,14 +1601,20 @@ normalize_filename (register char *fp, char path_sep) { char sep; - char *elem; + char *elem, *p2; + int dbcs_p = max_filename_mbslen () > 1; /* Always lower-case drive letters a-z, even if the filesystem preserves case in filenames. This is so filenames can be compared by string comparison functions that are case-sensitive. Even case-preserving filesystems do not distinguish case in drive letters. */ - if (fp[1] == ':' && *fp >= 'A' && *fp <= 'Z') + if (dbcs_p) + p2 = CharNextExA (file_name_codepage, fp, 0); + else + p2 = fp + 1; + + if (*p2 == ':' && *fp >= 'A' && *fp <= 'Z') { *fp += 'a' - 'A'; fp += 2; @@ -1559,7 +1626,10 @@ { if (*fp == '/' || *fp == '\\') *fp = path_sep; - fp++; + if (!dbcs_p) + fp++; + else + fp = CharNextExA (file_name_codepage, fp, 0); } return; } @@ -1582,13 +1652,20 @@ if (elem && elem != fp) { *fp = 0; /* temporary end of string */ - _strlwr (elem); /* while we convert to lower case */ + _mbslwr (elem); /* while we convert to lower case */ } *fp = sep; /* convert (or restore) path separator */ elem = fp + 1; /* next element starts after separator */ sep = path_sep; } - } while (*fp++); + if (*fp) + { + if (!dbcs_p) + fp++; + else + fp = CharNextExA (file_name_codepage, fp, 0); + } + } while (*fp); } /* Destructively turn backslashes into slashes. */ @@ -2860,15 +2937,22 @@ strcpy (dir_static.d_name, dir_find_data.cFileName); dir_static.d_namlen = strlen (dir_static.d_name); if (dir_is_fat) - _strlwr (dir_static.d_name); + _mbslwr (dir_static.d_name); else if (downcase) { register char *p; - for (p = dir_static.d_name; *p; p++) - if (*p >= 'a' && *p <= 'z') - break; + int dbcs_p = max_filename_mbslen () > 1; + for (p = dir_static.d_name; *p; ) + { + if (*p >= 'a' && *p <= 'z') + break; + if (dbcs_p) + p = CharNextExA (file_name_codepage, p, 0); + else + p++; + } if (!*p) - _strlwr (dir_static.d_name); + _mbslwr (dir_static.d_name); } return &dir_static; === modified file 'src/w32heap.c' --- src/w32heap.c 2013-01-01 09:11:05 +0000 +++ src/w32heap.c 2013-01-22 13:30:17 +0000 @@ -98,7 +98,11 @@ #ifdef _WIN64 size_t size = 0x4000000000i64; /* start by asking for 32GB */ #else - size_t size = 0x80000000; /* start by asking for 2GB */ + /* We used to start with 2GB here, but on Windows 7 that would leave + too little room in the address space for threads started by + Windows on our behalf, e.g. when we pop up the file selection + dialog. */ + size_t size = 0x68000000; /* start by asking for 1.7GB */ #endif void *ptr = NULL; ------------------------------------------------------------ revno: 111598 committer: Bastien Guerry branch nick: trunk timestamp: Thu 2013-01-24 22:19:02 +0100 message: * paren.el (show-paren-function): Make sure to set 'priority and 'face only if the overlay does exist. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-24 09:50:02 +0000 +++ lisp/ChangeLog 2013-01-24 21:19:02 +0000 @@ -1,3 +1,8 @@ +2013-01-24 Aaron Ecay (tiny change) + + * paren.el (show-paren-function): Make sure to set 'priority and + 'face only if the overlay does exist. + 2013-01-24 Michael Albinus * net/tramp.el (tramp-tramp-file-p): Check, whether NAME is unibyte. === modified file 'lisp/paren.el' --- lisp/paren.el 2013-01-23 09:43:29 +0000 +++ lisp/paren.el 2013-01-24 21:19:02 +0000 @@ -259,11 +259,10 @@ (- (point) dir))))) (if show-paren-overlay (move-overlay show-paren-overlay from to (current-buffer)) - (setq show-paren-overlay (make-overlay from to nil t))))) - ;; - ;; Always set the overlay face, since it varies. - (overlay-put show-paren-overlay 'priority show-paren-priority) - (overlay-put show-paren-overlay 'face face))) + (setq show-paren-overlay (make-overlay from to nil t)))) + ;; Always set the overlay face, since it varies. + (overlay-put show-paren-overlay 'priority show-paren-priority) + (overlay-put show-paren-overlay 'face face)))) ;; show-paren-mode is nil in this buffer. (and show-paren-overlay (delete-overlay show-paren-overlay)) ------------------------------------------------------------ revno: 111597 committer: Michael Albinus + + * net/tramp.el (tramp-tramp-file-p): Check, whether NAME is unibyte. + + * net/tramp-sh.el (tramp-sh-handle-set-file-acl): Do not suppress + basic attributes. + (tramp-sh-handle-set-file-acl): Improve error checking. + 2013-01-24 Dmitry Antipov * doc-view.el (doc-view-display): Force mode line update until all === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-01-21 09:49:43 +0000 +++ lisp/net/tramp-sh.el 2013-01-24 09:50:02 +0000 @@ -1549,7 +1549,7 @@ (when (and (tramp-remote-acl-p v) (tramp-send-command-and-check v (format - "getfacl -acs %s 2>/dev/null" + "getfacl -ac %s 2>/dev/null" (tramp-shell-quote-argument localname)))) (with-current-buffer (tramp-get-connection-buffer v) (goto-char (point-max)) @@ -1560,21 +1560,20 @@ (defun tramp-sh-handle-set-file-acl (filename acl-string) "Like `set-file-acl' for Tramp files." - (with-parsed-tramp-file-name filename nil - (when (tramp-remote-acl-p v) - (condition-case nil - (when (stringp acl-string) - (tramp-set-file-property v localname "file-acl" acl-string) - (dolist (line (split-string acl-string nil t) t) - (unless (tramp-send-command-and-check - v (format - "setfacl -m %s %s" - line (tramp-shell-quote-argument localname))) - (error nil)))) - ;; In case of errors, we return `nil'. - (error - (tramp-set-file-property v localname "file-acl" 'undef) - nil))))) + (with-parsed-tramp-file-name (expand-file-name filename) nil + (if (and (stringp acl-string) (tramp-remote-acl-p v) + (progn + (tramp-send-command + v (format "setfacl --set-file=- %s <<'EOF'\n%s\nEOF\n" + (tramp-shell-quote-argument localname) acl-string)) + (tramp-send-command-and-check v nil))) + ;; Success. + (progn + (tramp-set-file-property v localname "file-acl" acl-string) + t) + ;; In case of errors, we return `nil'. + (tramp-set-file-property v localname "file-acl-string" 'undef) + nil))) ;; Simple functions using the `test' command. === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-01-21 09:49:43 +0000 +++ lisp/net/tramp.el 2013-01-24 09:50:02 +0000 @@ -1140,9 +1140,12 @@ ;;;###tramp-autoload (defun tramp-tramp-file-p (name) - "Return t if NAME is a string with Tramp file name syntax." + "Return t if NAME is a string with Tramp file name syntax. +It checks also, whether NAME is unibyte encoded." (save-match-data - (and (stringp name) (string-match tramp-file-name-regexp name)))) + (and (stringp name) + (string-equal name (string-as-unibyte name)) + (string-match tramp-file-name-regexp name)))) (defun tramp-find-method (method user host) "Return the right method string to use. ------------------------------------------------------------ revno: 111596 committer: Michael Albinus + + * tramp.texi (Filename Syntax): Filenames must be unibyte strings. + 2013-01-13 Bastien Guerry * org.texi (Installation): Simplify. === modified file 'doc/misc/tramp.texi' --- doc/misc/tramp.texi 2013-01-10 07:34:48 +0000 +++ doc/misc/tramp.texi 2013-01-24 09:43:32 +0000 @@ -2362,6 +2362,8 @@ by adding @file{#} to the host name, like in @file{@trampfn{ssh, daniel, melancholia#42, .emacs}}. +Note that @value{tramp} supports only filenames encoded in unibyte. + @node Alternative Syntax @section URL-like filename syntax ------------------------------------------------------------ revno: 111595 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2013-01-24 09:56:31 +0400 message: * nsfont.m (ns_escape_name, ns_unescape_name, ns_registry_to_script): Avoid redundant calls to strlen. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-24 05:41:28 +0000 +++ src/ChangeLog 2013-01-24 05:56:31 +0000 @@ -1,5 +1,10 @@ 2013-01-24 Dmitry Antipov + * nsfont.m (ns_escape_name, ns_unescape_name, ns_registry_to_script): + Avoid redundant calls to strlen. + +2013-01-24 Dmitry Antipov + Drop async_visible and async_iconified fields of struct frame. This is possible because async input is gone; for details, see http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html. === modified file 'src/nsfont.m' --- src/nsfont.m 2013-01-13 20:03:01 +0000 +++ src/nsfont.m 2013-01-24 05:56:31 +0000 @@ -75,10 +75,9 @@ static void ns_escape_name (char *name) { - int i =0, len =strlen (name); - for ( ; i