# HG changeset patch # User Katsumi Yamaoka # Date 1266444553 0 # Node ID e8f3e6f246f63dc1ee67bc52a0610236dc10034c # Parent 742c52095274cf3e7c241f8fac1b5d4dab431499# Parent 6e6072f0c0a29564851ec8a9b831963f150956db Merge from mainline. diff -r 742c52095274 -r e8f3e6f246f6 lisp/ChangeLog --- a/lisp/ChangeLog Tue Feb 16 21:53:57 2010 +0000 +++ b/lisp/ChangeLog Wed Feb 17 22:09:13 2010 +0000 @@ -1,3 +1,10 @@ +2010-02-17 Mark A. Hershberger + + * vc-bzr.el: fix typo in Known Bugs section. + + * isearch.el (isearch-update-post-hook): New hook + (isearch-update): Use the new hook. + 2010-02-16 Michael Albinus * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Fix diff -r 742c52095274 -r e8f3e6f246f6 lisp/isearch.el --- a/lisp/isearch.el Tue Feb 16 21:53:57 2010 +0000 +++ b/lisp/isearch.el Wed Feb 17 22:09:13 2010 +0000 @@ -156,6 +156,9 @@ (defvar isearch-mode-hook nil "Function(s) to call after starting up an incremental search.") +(defvar isearch-update-post-hook nil + "Function(s) to call after isearch has found matches in the buffer.") + (defvar isearch-mode-end-hook nil "Function(s) to call after terminating an incremental search. When these functions are called, `isearch-mode-end-hook-quit' @@ -868,7 +871,8 @@ (isearch-lazy-highlight-new-loop)) ;; We must prevent the point moving to the end of composition when a ;; part of the composition has just been searched. - (setq disable-point-adjustment t)) + (setq disable-point-adjustment t) + (run-hooks 'isearch-update-post-hook)) (defun isearch-done (&optional nopush edit) "Exit Isearch mode. diff -r 742c52095274 -r e8f3e6f246f6 lisp/vc-bzr.el --- a/lisp/vc-bzr.el Tue Feb 16 21:53:57 2010 +0000 +++ b/lisp/vc-bzr.el Wed Feb 17 22:09:13 2010 +0000 @@ -35,7 +35,7 @@ ;; Known bugs ;; ========== -;; When edititing a symlink and *both* the symlink and its target +;; When editing a symlink and *both* the symlink and its target ;; are bzr-versioned, `vc-bzr` presently runs `bzr status` on the ;; symlink, thereby not detecting whether the actual contents ;; (that is, the target contents) are changed. diff -r 742c52095274 -r e8f3e6f246f6 src/ChangeLog --- a/src/ChangeLog Tue Feb 16 21:53:57 2010 +0000 +++ b/src/ChangeLog Wed Feb 17 22:09:13 2010 +0000 @@ -1,3 +1,13 @@ +2010-02-17 Kenichi Handa + + * coding.c (decode_coding_ccl): Don't setup ccl program here. Fix + for the case that the output buffer is fullfilled. + (decode_coding): Setup ccl program here. Keep looping when the + decoder stopped because the output buffer is + fullfilled (bug#5534). + + * ccl.c (ccl_driver): Never reset ic to CCL_HEADER_MAIN. + 2010-02-13 Jan Djärv * xterm.c (x_clear_frame_area): Call gtk_widget_queue_draw if USE_GTK, diff -r 742c52095274 -r e8f3e6f246f6 src/ccl.c --- a/src/ccl.c Tue Feb 16 21:53:57 2010 +0000 +++ b/src/ccl.c Wed Feb 17 22:09:13 2010 +0000 @@ -883,9 +883,6 @@ int eof_ic = ccl->eof_ic; int eof_hit = 0; - if (ic >= eof_ic) - ic = CCL_HEADER_MAIN; - if (ccl->buf_magnification == 0) /* We can't read/produce any bytes. */ dst = NULL; diff -r 742c52095274 -r e8f3e6f246f6 src/coding.c --- a/src/coding.c Tue Feb 16 21:53:57 2010 +0000 +++ b/src/coding.c Wed Feb 17 22:09:13 2010 +0000 @@ -5220,18 +5220,16 @@ int *charbuf_end = coding->charbuf + coding->charbuf_size; int consumed_chars = 0; int multibytep = coding->src_multibyte; - struct ccl_program ccl; + struct ccl_program *ccl = &coding->spec.ccl->ccl; int source_charbuf[1024]; int source_byteidx[1024]; Lisp_Object attrs, charset_list; CODING_GET_INFO (coding, attrs, charset_list); - setup_ccl_program (&ccl, CODING_CCL_DECODER (coding)); - - while (src < src_end) + + while (1) { const unsigned char *p = src; - int *source, *source_end; int i = 0; if (multibytep) @@ -5245,37 +5243,26 @@ source_charbuf[i++] = *p++; if (p == src_end && coding->mode & CODING_MODE_LAST_BLOCK) - ccl.last_block = 1; - - source = source_charbuf; - source_end = source + i; - while (source < source_end) - { - ccl_driver (&ccl, source, charbuf, - source_end - source, charbuf_end - charbuf, - charset_list); - source += ccl.consumed; - charbuf += ccl.produced; - if (ccl.status != CCL_STAT_SUSPEND_BY_DST) - break; - } - if (source < source_end) - src += source_byteidx[source - source_charbuf]; + ccl->last_block = 1; + ccl_driver (ccl, source_charbuf, charbuf, i, charbuf_end - charbuf, + charset_list); + charbuf += ccl->produced; + if (multibytep && ccl->consumed < i) + src += source_byteidx[ccl->consumed]; else - src = p; - consumed_chars += source - source_charbuf; - - if (ccl.status != CCL_STAT_SUSPEND_BY_SRC - && ccl.status != CODING_RESULT_INSUFFICIENT_SRC) + src += ccl->consumed; + consumed_chars += ccl->consumed; + if (p == src_end || ccl->status != CCL_STAT_SUSPEND_BY_SRC) break; } - switch (ccl.status) + switch (ccl->status) { case CCL_STAT_SUSPEND_BY_SRC: record_conversion_result (coding, CODING_RESULT_INSUFFICIENT_SRC); break; case CCL_STAT_SUSPEND_BY_DST: + record_conversion_result (coding, CODING_RESULT_INSUFFICIENT_DST); break; case CCL_STAT_QUIT: case CCL_STAT_INVALID_CMD: @@ -7117,6 +7104,7 @@ Lisp_Object attrs; Lisp_Object undo_list; Lisp_Object translation_table; + struct ccl_spec cclspec; int carryover; int i; @@ -7149,6 +7137,11 @@ translation_table = get_translation_table (attrs, 0, NULL); carryover = 0; + if (coding->decoder == decode_coding_ccl) + { + coding->spec.ccl = &cclspec; + setup_ccl_program (&cclspec.ccl, CODING_CCL_DECODER (coding)); + } do { EMACS_INT pos = coding->dst_pos + coding->produced_char; @@ -7165,9 +7158,10 @@ coding->charbuf[i] = coding->charbuf[coding->charbuf_used - carryover + i]; } - while (coding->consumed < coding->src_bytes - && (coding->result == CODING_RESULT_SUCCESS - || coding->result == CODING_RESULT_INVALID_SRC)); + while (coding->result == CODING_RESULT_INSUFFICIENT_DST + || (coding->consumed < coding->src_bytes + && (coding->result == CODING_RESULT_SUCCESS + || coding->result == CODING_RESULT_INVALID_SRC))); if (carryover > 0) {