Mercurial > emacs
changeset 108411:8af8a20eebf0
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sat, 06 Feb 2010 13:36:05 +0000 |
parents | 91a3b0edffcc (current diff) 0afb47d42c74 (diff) |
children | fd9a89143e0a |
files | |
diffstat | 5 files changed, 48 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sat Feb 06 04:13:19 2010 +0000 +++ b/lisp/ChangeLog Sat Feb 06 13:36:05 2010 +0000 @@ -1,3 +1,12 @@ +2010-02-06 Chong Yidong <cyd@stupidchicken.com> + + * progmodes/cc-mode.el (c-common-init): Bind temporary variables + beg and end before calling c-get-state-before-change-functions. + +2010-02-06 Dan Nicolaescu <dann@ics.uci.edu> + + * vc-bzr.el (vc-bzr-dir-extra-headers): Disable the pending merges header. + 2010-02-05 Juri Linkov <juri@jurta.org> * doc-view.el (doc-view-mode):
--- a/lisp/progmodes/cc-mode.el Sat Feb 06 04:13:19 2010 +0000 +++ b/lisp/progmodes/cc-mode.el Sat Feb 06 13:36:05 2010 +0000 @@ -642,9 +642,11 @@ (widen) (save-excursion (if c-get-state-before-change-functions - (mapc (lambda (fn) - (funcall fn beg end)) - c-get-state-before-change-functions)) + (let ((beg (point-min)) + (end (point-max))) + (mapc (lambda (fn) + (funcall fn beg end)) + c-get-state-before-change-functions))) (if c-before-font-lock-function (funcall c-before-font-lock-function (point-min) (point-max) (- (point-max) (point-min))))))
--- a/lisp/vc-bzr.el Sat Feb 06 04:13:19 2010 +0000 +++ b/lisp/vc-bzr.el Sat Feb 06 13:36:05 2010 +0000 @@ -796,8 +796,12 @@ (shelve-help-echo "Use M-x vc-bzr-shelve to create shelves") (root-dir (vc-bzr-root dir)) (pending-merge - (file-exists-p - (expand-file-name ".bzr/checkout/merge-hashes" root-dir))) + ;; FIXME: looking for .bzr/checkout/merge-hashes is not a + ;; reliable method to detect pending merges, disable this + ;; until a proper solution is implemented. + (and nil + (file-exists-p + (expand-file-name ".bzr/checkout/merge-hashes" root-dir)))) (pending-merge-help-echo (format "A merge has been performed.\nA commit from the top-level directory (%s)\nis required before being able to check in anything else" root-dir)) (light-checkout
--- a/src/ChangeLog Sat Feb 06 04:13:19 2010 +0000 +++ b/src/ChangeLog Sat Feb 06 13:36:05 2010 +0000 @@ -1,3 +1,9 @@ +2010-02-06 Chong Yidong <cyd@stupidchicken.com> + + * charset.c (load_charset_map_from_file) + (load_charset_map_from_vector): Fix last change to use SAFE_ALLOCA + instead of xmalloc (Bug#5526). Suggested by Vivek Dasmohapatra. + 2010-02-05 Chong Yidong <cyd@stupidchicken.com> * charset.c (load_charset_map_from_file): Allocate large
--- a/src/charset.c Sat Feb 06 04:13:19 2010 +0000 +++ b/src/charset.c Sat Feb 06 13:36:05 2010 +0000 @@ -512,12 +512,13 @@ int eof; Lisp_Object suffixes; struct charset_map_entries *head, *entries; - int n_entries; - int count = SPECPDL_INDEX (); + int n_entries, count; + USE_SAFE_ALLOCA; suffixes = Fcons (build_string (".map"), Fcons (build_string (".TXT"), Qnil)); + count = SPECPDL_INDEX (); specbind (Qfile_name_handler_alist, Qnil); fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil); unbind_to (count, Qnil); @@ -525,8 +526,12 @@ || ! (fp = fdopen (fd, "r"))) error ("Failure in loading charset map: %S", SDATA (mapfile)); - head = entries = ((struct charset_map_entries *) - xmalloc (sizeof (struct charset_map_entries))); + /* Use SAFE_ALLOCA instead of alloca, as `charset_map_entries' is + large (larger than MAX_ALLOCA). */ + SAFE_ALLOCA (head, struct charset_map_entries *, + sizeof (struct charset_map_entries)); + entries = head; + n_entries = 0; eof = 0; while (1) @@ -549,8 +554,8 @@ if (n_entries > 0 && (n_entries % 0x10000) == 0) { - entries->next = ((struct charset_map_entries *) - alloca (sizeof (struct charset_map_entries))); + SAFE_ALLOCA (entries->next, struct charset_map_entries *, + sizeof (struct charset_map_entries)); entries = entries->next; } idx = n_entries % 0x10000; @@ -563,7 +568,7 @@ close (fd); load_charset_map (charset, head, n_entries, control_flag); - xfree (head); + SAFE_FREE (); } static void @@ -578,6 +583,7 @@ int n_entries; int len = ASIZE (vec); int i; + USE_SAFE_ALLOCA; if (len % 2 == 1) { @@ -585,8 +591,12 @@ return; } - head = entries = ((struct charset_map_entries *) - alloca (sizeof (struct charset_map_entries))); + /* Use SAFE_ALLOCA instead of alloca, as `charset_map_entries' is + large (larger than MAX_ALLOCA). */ + SAFE_ALLOCA (head, struct charset_map_entries *, + sizeof (struct charset_map_entries)); + entries = head; + n_entries = 0; for (i = 0; i < len; i += 2) { @@ -619,8 +629,8 @@ if (n_entries > 0 && (n_entries % 0x10000) == 0) { - entries->next = ((struct charset_map_entries *) - alloca (sizeof (struct charset_map_entries))); + SAFE_ALLOCA (entries->next, struct charset_map_entries *, + sizeof (struct charset_map_entries)); entries = entries->next; } idx = n_entries % 0x10000; @@ -631,6 +641,7 @@ } load_charset_map (charset, head, n_entries, control_flag); + SAFE_FREE (); }