------------------------------------------------------------ revno: 114836 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-10-29 15:37:40 +0800 message: Fix typo in ido-use-virtual-buffers. diff: === modified file 'lisp/ido.el' --- lisp/ido.el 2013-10-23 12:15:31 +0000 +++ lisp/ido.el 2013-10-29 07:37:40 +0000 @@ -797,7 +797,7 @@ The value can be one of the following: nil: No virtual buffers are used. - auto: Use virtual bufferw when the current input matches no + auto: Use virtual buffers when the current input matches no existing buffers. t: Always use virtual buffers. ------------------------------------------------------------ revno: 114835 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-10-29 09:55:25 +0400 message: * xterm.h (struct x_output): For 'black_relief' and 'white_relief' fields, drop 'allocated_p' member and use -1 for uninitialized value. * w32term.h (struct w32_output): Similarly but do not use -1 because... * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op on MS-Windows anyway. (free_face_colors): Define only if HAVE_X_WINDOWS and... (free_realized_face): ...adjust user. * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and white relief pixels to -1. * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users. * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise. * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-28 21:19:38 +0000 +++ src/ChangeLog 2013-10-29 05:55:25 +0000 @@ -1,3 +1,18 @@ +2013-10-29 Dmitry Antipov + + * xterm.h (struct x_output): For 'black_relief' and 'white_relief' + fields, drop 'allocated_p' member and use -1 for uninitialized value. + * w32term.h (struct w32_output): Similarly but do not use -1 because... + * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op + on MS-Windows anyway. + (free_face_colors): Define only if HAVE_X_WINDOWS and... + (free_realized_face): ...adjust user. + * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and + white relief pixels to -1. + * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users. + * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise. + * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS. + 2013-10-28 Paul Eggert * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static. === modified file 'src/dispextern.h' --- src/dispextern.h 2013-10-28 21:19:38 +0000 +++ src/dispextern.h 2013-10-29 05:55:25 +0000 @@ -3328,6 +3328,7 @@ /* Defined in xfaces.c */ #ifdef HAVE_X_WINDOWS +void unload_color (struct frame *, unsigned long); void x_free_colors (struct frame *, unsigned long *, int); #endif @@ -3339,7 +3340,6 @@ unsigned long load_color (struct frame *, struct face *, Lisp_Object, enum lface_attribute_index); #endif -void unload_color (struct frame *, unsigned long); char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object, int *); void prepare_face_for_display (struct frame *, struct face *); === modified file 'src/w32term.c' --- src/w32term.c 2013-10-18 12:57:44 +0000 +++ src/w32term.c 2013-10-29 05:55:25 +0000 @@ -1596,10 +1596,7 @@ xgcv.foreground = default_pixel; pixel = background; if (w32_alloc_lighter_color (f, &pixel, factor, delta)) - { - relief->allocated_p = 1; - xgcv.foreground = relief->pixel = pixel; - } + xgcv.foreground = relief->pixel = pixel; if (relief->gc == 0) { @@ -6001,17 +5998,6 @@ free_frame_menubar (f); - unload_color (f, FRAME_FOREGROUND_PIXEL (f)); - unload_color (f, FRAME_BACKGROUND_PIXEL (f)); - unload_color (f, f->output_data.w32->cursor_pixel); - unload_color (f, f->output_data.w32->cursor_foreground_pixel); - unload_color (f, f->output_data.w32->border_pixel); - unload_color (f, f->output_data.w32->mouse_pixel); - if (f->output_data.w32->white_relief.allocated_p) - unload_color (f, f->output_data.w32->white_relief.pixel); - if (f->output_data.w32->black_relief.allocated_p) - unload_color (f, f->output_data.w32->black_relief.pixel); - if (FRAME_FACE_CACHE (f)) free_frame_faces (f); === modified file 'src/w32term.h' --- src/w32term.h 2013-10-18 12:57:44 +0000 +++ src/w32term.h 2013-10-29 05:55:25 +0000 @@ -376,7 +376,6 @@ { XGCValues *gc; unsigned long pixel; - int allocated_p; } black_relief, white_relief; === modified file 'src/xfaces.c' --- src/xfaces.c 2013-10-28 21:19:38 +0000 +++ src/xfaces.c 2013-10-29 05:55:25 +0000 @@ -1293,30 +1293,28 @@ face->foreground = load_color (f, face, fg, LFACE_FOREGROUND_INDEX); } +#ifdef HAVE_X_WINDOWS /* Free color PIXEL on frame F. */ void unload_color (struct frame *f, long unsigned int pixel) { -#ifdef HAVE_X_WINDOWS if (pixel != -1) { block_input (); x_free_colors (f, &pixel, 1); unblock_input (); } -#endif } - /* Free colors allocated for FACE. */ static void free_face_colors (struct frame *f, struct face *face) { -/* PENDING(NS): need to do something here? */ -#ifdef HAVE_X_WINDOWS + /* PENDING(NS): need to do something here? */ + if (face->colors_copied_bitwise_p) return; @@ -1363,8 +1361,9 @@ } unblock_input (); +} + #endif /* HAVE_X_WINDOWS */ -} #endif /* HAVE_WINDOW_SYSTEM */ @@ -4039,8 +4038,9 @@ face->gc = 0; unblock_input (); } - +#ifdef HAVE_X_WINDOWS free_face_colors (f, face); +#endif /* HAVE_X_WINDOWS */ x_destroy_bitmap (f, face->stipple); } #endif /* HAVE_WINDOW_SYSTEM */ === modified file 'src/xfns.c' --- src/xfns.c 2013-10-18 12:57:44 +0000 +++ src/xfns.c 2013-10-29 05:55:25 +0000 @@ -2880,6 +2880,8 @@ f->output_data.x->scroll_bar_top_shadow_pixel = -1; f->output_data.x->scroll_bar_bottom_shadow_pixel = -1; #endif /* USE_TOOLKIT_SCROLL_BARS */ + f->output_data.x->white_relief.pixel = -1; + f->output_data.x->black_relief.pixel = -1; fset_icon_name (f, x_get_arg (dpyinfo, parms, Qicon_name, "iconName", "Title", @@ -4824,6 +4826,9 @@ f->output_data.x->scroll_bar_top_shadow_pixel = -1; f->output_data.x->scroll_bar_bottom_shadow_pixel = -1; #endif /* USE_TOOLKIT_SCROLL_BARS */ + f->output_data.x->white_relief.pixel = -1; + f->output_data.x->black_relief.pixel = -1; + fset_icon_name (f, Qnil); FRAME_DISPLAY_INFO (f) = dpyinfo; f->output_data.x->parent_desc = FRAME_DISPLAY_INFO (f)->root_window; === modified file 'src/xterm.c' --- src/xterm.c 2013-10-18 12:57:44 +0000 +++ src/xterm.c 2013-10-29 05:55:25 +0000 @@ -1774,11 +1774,10 @@ /* Free previously allocated color. The color cell will be reused when it has been freed as many times as it was allocated, so this doesn't affect faces using the same colors. */ - if (relief->gc - && relief->allocated_p) + if (relief->gc && relief->pixel != -1) { x_free_colors (f, &relief->pixel, 1); - relief->allocated_p = 0; + relief->pixel = -1; } /* Allocate new color. */ @@ -1786,10 +1785,7 @@ pixel = background; if (dpyinfo->n_planes != 1 && x_alloc_lighter_color (f, dpy, cmap, &pixel, factor, delta)) - { - relief->allocated_p = 1; - xgcv.foreground = relief->pixel = pixel; - } + xgcv.foreground = relief->pixel = pixel; if (relief->gc == 0) { @@ -9338,9 +9334,9 @@ if (f->output_data.x->scroll_bar_bottom_shadow_pixel != -1) unload_color (f, f->output_data.x->scroll_bar_bottom_shadow_pixel); #endif /* USE_TOOLKIT_SCROLL_BARS */ - if (f->output_data.x->white_relief.allocated_p) + if (f->output_data.x->white_relief.pixel != -1) unload_color (f, f->output_data.x->white_relief.pixel); - if (f->output_data.x->black_relief.allocated_p) + if (f->output_data.x->black_relief.pixel != -1) unload_color (f, f->output_data.x->black_relief.pixel); x_free_gcs (f); === modified file 'src/xterm.h' --- src/xterm.h 2013-10-18 12:57:44 +0000 +++ src/xterm.h 2013-10-29 05:55:25 +0000 @@ -605,7 +605,6 @@ { GC gc; unsigned long pixel; - int allocated_p; } black_relief, white_relief; ------------------------------------------------------------ revno: 114834 committer: Daniel Colascione branch nick: trunk timestamp: Mon 2013-10-28 19:50:24 -0700 message: Tweak Tramp method definition syntax to allow overriding check for localhost-only methods diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-28 19:30:40 +0000 +++ lisp/ChangeLog 2013-10-29 02:50:24 +0000 @@ -1,3 +1,10 @@ +2013-10-29 Daniel Colascione + + * net/tramp.el (tramp-methods): Document new functionality. + * net/tramp-sh.el (tramp-compute-multi-hops): Punt to + tramp-hostname-checker if method provides one instead of scanning + argument list for "%h" to decide hostname acceptability. + 2013-10-28 Michael Albinus * net/tramp-sh.el (tramp-sh-handle-copy-directory): === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-10-28 19:30:40 +0000 +++ lisp/net/tramp-sh.el 2013-10-29 02:50:24 +0000 @@ -4285,6 +4285,10 @@ (or ;; There are multi-hops. (cdr target-alist) + ;; This method explicitly has an explicit allowability check. + (let ((checker (tramp-get-method-parameter + method 'tramp-hostname-checker))) + (when checker (funcall checker v host method) t)) ;; The host name is used for the remote shell command. (member '("%h") (tramp-get-method-parameter method 'tramp-login-args)) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-10-17 19:39:22 +0000 +++ lisp/net/tramp.el 2013-10-29 02:50:24 +0000 @@ -265,6 +265,15 @@ In general, the global default value shall be used, but for some methods, like \"su\" or \"sudo\", a shorter timeout might be desirable. + * `tramp-hostname-checker' + This is a function that tramp calls while setting + up a connection. It is called with three arguments: + the target, the host, and the method description. If + the hostname is unacceptable, this function should signal + using `tramp-error'. If a method does not provide + a value here, then Tramp looks at whether the method's + login program uses a \"%h\" parameter. If not, then Tramp + requires that the given hostname match `tramp-local-host-regexp'. What does all this mean? Well, you should specify `tramp-login-program' for all methods; this program is used to log in to the remote site. Then, ------------------------------------------------------------ revno: 114833 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-10-28 14:19:38 -0700 message: * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static. * xfaces.c (load_pixmap): Omit last two args, which are always NULL in practice now. All callers changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-28 10:58:01 +0000 +++ src/ChangeLog 2013-10-28 21:19:38 +0000 @@ -1,3 +1,9 @@ +2013-10-28 Paul Eggert + + * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static. + * xfaces.c (load_pixmap): Omit last two args, which are always NULL + in practice now. All callers changed. + 2013-10-28 Dmitry Antipov * dispextern.h (struct face): Use bitfields for 'underline_type' === modified file 'src/dispextern.h' --- src/dispextern.h 2013-10-28 10:58:01 +0000 +++ src/dispextern.h 2013-10-28 21:19:38 +0000 @@ -3274,8 +3274,6 @@ #ifdef HAVE_WINDOW_SYSTEM -extern int x_bitmap_height (struct frame *, ptrdiff_t); -extern int x_bitmap_width (struct frame *, ptrdiff_t); extern ptrdiff_t x_bitmap_pixmap (struct frame *, ptrdiff_t); extern void x_reference_bitmap (struct frame *, ptrdiff_t); extern ptrdiff_t x_create_bitmap_from_data (struct frame *, char *, === modified file 'src/image.c' --- src/image.c 2013-10-14 07:12:49 +0000 +++ src/image.c 2013-10-28 21:19:38 +0000 @@ -159,13 +159,13 @@ /* Functions to access the contents of a bitmap, given an id. */ -int +static int x_bitmap_height (struct frame *f, ptrdiff_t id) { return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].height; } -int +static int x_bitmap_width (struct frame *f, ptrdiff_t id) { return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].width; === modified file 'src/xfaces.c' --- src/xfaces.c 2013-10-28 10:58:01 +0000 +++ src/xfaces.c 2013-10-28 21:19:38 +0000 @@ -853,12 +853,10 @@ pixmap spec) for use on frame F. Value is the bitmap_id (see xfns.c). If NAME is nil, return with a bitmap id of zero. If bitmap cannot be loaded, display a message saying so, and return - zero. Store the bitmap width in *W_PTR and its height in *H_PTR, - if these pointers are not null. */ + zero. */ static ptrdiff_t -load_pixmap (struct frame *f, Lisp_Object name, unsigned int *w_ptr, - unsigned int *h_ptr) +load_pixmap (struct frame *f, Lisp_Object name) { ptrdiff_t bitmap_id; @@ -893,22 +891,12 @@ { add_to_log ("Invalid or undefined bitmap `%s'", name, Qnil); bitmap_id = 0; - - if (w_ptr) - *w_ptr = 0; - if (h_ptr) - *h_ptr = 0; } else { #ifdef GLYPH_DEBUG ++npixmaps_allocated; #endif - if (w_ptr) - *w_ptr = x_bitmap_width (f, bitmap_id); - - if (h_ptr) - *h_ptr = x_bitmap_height (f, bitmap_id); } return bitmap_id; @@ -1298,7 +1286,7 @@ && !NILP (Fbitmap_spec_p (Vface_default_stipple))) { x_destroy_bitmap (f, face->stipple); - face->stipple = load_pixmap (f, Vface_default_stipple, NULL, NULL); + face->stipple = load_pixmap (f, Vface_default_stipple); } face->background = load_color (f, face, bg, LFACE_BACKGROUND_INDEX); @@ -5719,7 +5707,7 @@ stipple = attrs[LFACE_STIPPLE_INDEX]; if (!NILP (stipple)) - face->stipple = load_pixmap (f, stipple, NULL, NULL); + face->stipple = load_pixmap (f, stipple); #endif /* HAVE_WINDOW_SYSTEM */ return face; ------------------------------------------------------------ revno: 114832 committer: Michael Albinus branch nick: trunk timestamp: Mon 2013-10-28 20:30:40 +0100 message: * net/tramp-sh.el (tramp-sh-handle-copy-directory): * net/tramp-smb.el (tramp-smb-handle-copy-directory): Handle COPY-CONTENTS. (Bug#15737) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-28 08:04:48 +0000 +++ lisp/ChangeLog 2013-10-28 19:30:40 +0000 @@ -1,3 +1,9 @@ +2013-10-28 Michael Albinus + + * net/tramp-sh.el (tramp-sh-handle-copy-directory): + * net/tramp-smb.el (tramp-smb-handle-copy-directory): + Handle COPY-CONTENTS. (Bug#15737) + 2013-10-28 Daiki Ueno * epa-file.el === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-10-17 19:39:22 +0000 +++ lisp/net/tramp-sh.el 2013-10-28 19:30:40 +0000 @@ -1831,18 +1831,20 @@ 'copy-file (list filename newname ok-if-already-exists keep-date))))) (defun tramp-sh-handle-copy-directory - (dirname newname &optional keep-date parents _copy-contents) + (dirname newname &optional keep-date parents copy-contents) "Like `copy-directory' for Tramp files." (let ((t1 (tramp-tramp-file-p dirname)) (t2 (tramp-tramp-file-p newname))) (with-parsed-tramp-file-name (if t1 dirname newname) nil - (if (and (tramp-get-method-parameter method 'tramp-copy-recursive) + (if (and (not copy-contents) + (tramp-get-method-parameter method 'tramp-copy-recursive) ;; When DIRNAME and NEWNAME are remote, they must have ;; the same method. (or (null t1) (null t2) (string-equal (tramp-file-name-method (tramp-dissect-file-name dirname)) - (tramp-file-name-method (tramp-dissect-file-name newname))))) + (tramp-file-name-method + (tramp-dissect-file-name newname))))) ;; scp or rsync DTRT. (progn (setq dirname (directory-file-name (expand-file-name dirname)) @@ -1859,7 +1861,10 @@ 'copy dirname newname keep-date)) ;; We must do it file-wise. (tramp-run-real-handler - 'copy-directory (list dirname newname keep-date parents))) + 'copy-directory + (if copy-contents + (list dirname newname keep-date parents copy-contents) + (list dirname newname keep-date parents)))) ;; When newname did exist, we have wrong cached values. (when t2 === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2013-10-18 10:22:02 +0000 +++ lisp/net/tramp-smb.el 2013-10-28 19:30:40 +0000 @@ -387,141 +387,150 @@ (throw 'tramp-action 'ok))))) (defun tramp-smb-handle-copy-directory - (dirname newname &optional keep-date parents _copy-contents) + (dirname newname &optional keep-date parents copy-contents) "Like `copy-directory' for Tramp files." - (setq dirname (expand-file-name dirname) - newname (expand-file-name newname)) - (let ((t1 (tramp-tramp-file-p dirname)) - (t2 (tramp-tramp-file-p newname))) - (with-parsed-tramp-file-name (if t1 dirname newname) nil - (with-tramp-progress-reporter - v 0 (format "Copying %s to %s" dirname newname) - (cond - ;; We must use a local temporary directory. - ((and t1 t2) - (let ((tmpdir - (make-temp-name - (expand-file-name - tramp-temp-name-prefix - (tramp-compat-temporary-file-directory))))) - (unwind-protect - (progn - (tramp-compat-copy-directory dirname tmpdir keep-date parents) - (tramp-compat-copy-directory tmpdir newname keep-date parents)) - (tramp-compat-delete-directory tmpdir 'recursive)))) - - ;; We can copy recursively. - ((or t1 t2) - (when (and (file-directory-p newname) - (not (string-equal (file-name-nondirectory dirname) - (file-name-nondirectory newname)))) - (setq newname - (expand-file-name - (file-name-nondirectory dirname) newname)) - (if t2 (setq v (tramp-dissect-file-name newname)))) - (if (not (file-directory-p newname)) - (make-directory newname parents)) - - (setq tramp-current-method (tramp-file-name-method v) - tramp-current-user (tramp-file-name-user v) - tramp-current-host (tramp-file-name-real-host v)) - - (let* ((real-user (tramp-file-name-real-user v)) - (real-host (tramp-file-name-real-host v)) - (domain (tramp-file-name-domain v)) - (port (tramp-file-name-port v)) - (share (tramp-smb-get-share v)) - (localname (file-name-as-directory - (tramp-compat-replace-regexp-in-string - "\\\\" "/" (tramp-smb-get-localname v)))) - (tmpdir (make-temp-name - (expand-file-name - tramp-temp-name-prefix - (tramp-compat-temporary-file-directory)))) - (args (list tramp-smb-program - (concat "//" real-host "/" share) "-E"))) - - (if (not (zerop (length real-user))) - (setq args (append args (list "-U" real-user))) - (setq args (append args (list "-N")))) - - (when domain (setq args (append args (list "-W" domain)))) - (when port (setq args (append args (list "-p" port)))) - (when tramp-smb-conf - (setq args (append args (list "-s" tramp-smb-conf)))) - (setq args - (if t1 - ;; Source is remote. - (append args - (list "-D" (shell-quote-argument localname) - "-c" (shell-quote-argument "tar qc - *") - "|" "tar" "xfC" "-" - (shell-quote-argument tmpdir))) - ;; Target is remote. - (append (list "tar" "cfC" "-" (shell-quote-argument dirname) - "." "|") - args - (list "-D" (shell-quote-argument localname) - "-c" (shell-quote-argument "tar qx -"))))) - - (unwind-protect - (with-temp-buffer - ;; Set the transfer process properties. - (tramp-set-connection-property - v "process-name" (buffer-name (current-buffer))) - (tramp-set-connection-property - v "process-buffer" (current-buffer)) - - (when t1 - ;; The smbclient tar command creates always complete - ;; paths. We must emulate the directory structure, - ;; and symlink to the real target. - (make-directory - (expand-file-name ".." (concat tmpdir localname)) 'parents) - (make-symbolic-link - newname (directory-file-name (concat tmpdir localname)))) - - ;; Use an asynchronous processes. By this, password - ;; can be handled. - (let* ((default-directory tmpdir) - (p (start-process-shell-command - (tramp-get-connection-name v) - (tramp-get-connection-buffer v) - (mapconcat 'identity args " ")))) - - (tramp-message - v 6 "%s" (mapconcat 'identity (process-command p) " ")) - (tramp-set-connection-property p "vector" v) - (tramp-compat-set-process-query-on-exit-flag p nil) - (tramp-process-actions p v nil tramp-smb-actions-with-tar) - - (while (memq (process-status p) '(run open)) - (sit-for 0.1)) - (tramp-message v 6 "\n%s" (buffer-string)))) - - ;; Reset the transfer process properties. - (tramp-set-connection-property v "process-name" nil) - (tramp-set-connection-property v "process-buffer" nil) - (when t1 (delete-directory tmpdir 'recurse)))) - - ;; Handle KEEP-DATE argument. - (when keep-date - (set-file-times newname (nth 5 (file-attributes dirname)))) - - ;; Set the mode. - (unless keep-date - (set-file-modes newname (tramp-default-file-modes dirname))) - - ;; When newname did exist, we have wrong cached values. - (when t2 - (with-parsed-tramp-file-name newname nil - (tramp-flush-file-property v (file-name-directory localname)) - (tramp-flush-file-property v localname)))) - - ;; We must do it file-wise. - (t - (tramp-run-real-handler - 'copy-directory (list dirname newname keep-date parents)))))))) + (if copy-contents + ;; We must do it file-wise. + (tramp-run-real-handler + 'copy-directory (list dirname newname keep-date parents copy-contents)) + + (setq dirname (expand-file-name dirname) + newname (expand-file-name newname)) + (let ((t1 (tramp-tramp-file-p dirname)) + (t2 (tramp-tramp-file-p newname))) + (with-parsed-tramp-file-name (if t1 dirname newname) nil + (with-tramp-progress-reporter + v 0 (format "Copying %s to %s" dirname newname) + (cond + ;; We must use a local temporary directory. + ((and t1 t2) + (let ((tmpdir + (make-temp-name + (expand-file-name + tramp-temp-name-prefix + (tramp-compat-temporary-file-directory))))) + (unwind-protect + (progn + (tramp-compat-copy-directory + dirname tmpdir keep-date parents) + (tramp-compat-copy-directory + tmpdir newname keep-date parents)) + (tramp-compat-delete-directory tmpdir 'recursive)))) + + ;; We can copy recursively. + ((or t1 t2) + (when (and (file-directory-p newname) + (not (string-equal (file-name-nondirectory dirname) + (file-name-nondirectory newname)))) + (setq newname + (expand-file-name + (file-name-nondirectory dirname) newname)) + (if t2 (setq v (tramp-dissect-file-name newname)))) + (if (not (file-directory-p newname)) + (make-directory newname parents)) + + (setq tramp-current-method (tramp-file-name-method v) + tramp-current-user (tramp-file-name-user v) + tramp-current-host (tramp-file-name-real-host v)) + + (let* ((real-user (tramp-file-name-real-user v)) + (real-host (tramp-file-name-real-host v)) + (domain (tramp-file-name-domain v)) + (port (tramp-file-name-port v)) + (share (tramp-smb-get-share v)) + (localname (file-name-as-directory + (tramp-compat-replace-regexp-in-string + "\\\\" "/" (tramp-smb-get-localname v)))) + (tmpdir (make-temp-name + (expand-file-name + tramp-temp-name-prefix + (tramp-compat-temporary-file-directory)))) + (args (list tramp-smb-program + (concat "//" real-host "/" share) "-E"))) + + (if (not (zerop (length real-user))) + (setq args (append args (list "-U" real-user))) + (setq args (append args (list "-N")))) + + (when domain (setq args (append args (list "-W" domain)))) + (when port (setq args (append args (list "-p" port)))) + (when tramp-smb-conf + (setq args (append args (list "-s" tramp-smb-conf)))) + (setq args + (if t1 + ;; Source is remote. + (append args + (list "-D" (shell-quote-argument localname) + "-c" (shell-quote-argument "tar qc - *") + "|" "tar" "xfC" "-" + (shell-quote-argument tmpdir))) + ;; Target is remote. + (append (list "tar" "cfC" "-" + (shell-quote-argument dirname) "." "|") + args + (list "-D" (shell-quote-argument localname) + "-c" (shell-quote-argument "tar qx -"))))) + + (unwind-protect + (with-temp-buffer + ;; Set the transfer process properties. + (tramp-set-connection-property + v "process-name" (buffer-name (current-buffer))) + (tramp-set-connection-property + v "process-buffer" (current-buffer)) + + (when t1 + ;; The smbclient tar command creates always + ;; complete paths. We must emulate the + ;; directory structure, and symlink to the real + ;; target. + (make-directory + (expand-file-name + ".." (concat tmpdir localname)) 'parents) + (make-symbolic-link + newname (directory-file-name (concat tmpdir localname)))) + + ;; Use an asynchronous processes. By this, + ;; password can be handled. + (let* ((default-directory tmpdir) + (p (start-process-shell-command + (tramp-get-connection-name v) + (tramp-get-connection-buffer v) + (mapconcat 'identity args " ")))) + + (tramp-message + v 6 "%s" (mapconcat 'identity (process-command p) " ")) + (tramp-set-connection-property p "vector" v) + (tramp-compat-set-process-query-on-exit-flag p nil) + (tramp-process-actions p v nil tramp-smb-actions-with-tar) + + (while (memq (process-status p) '(run open)) + (sit-for 0.1)) + (tramp-message v 6 "\n%s" (buffer-string)))) + + ;; Reset the transfer process properties. + (tramp-set-connection-property v "process-name" nil) + (tramp-set-connection-property v "process-buffer" nil) + (when t1 (delete-directory tmpdir 'recurse)))) + + ;; Handle KEEP-DATE argument. + (when keep-date + (set-file-times newname (nth 5 (file-attributes dirname)))) + + ;; Set the mode. + (unless keep-date + (set-file-modes newname (tramp-default-file-modes dirname))) + + ;; When newname did exist, we have wrong cached values. + (when t2 + (with-parsed-tramp-file-name newname nil + (tramp-flush-file-property v (file-name-directory localname)) + (tramp-flush-file-property v localname)))) + + ;; We must do it file-wise. + (t + (tramp-run-real-handler + 'copy-directory (list dirname newname keep-date parents))))))))) (defun tramp-smb-handle-copy-file (filename newname &optional ok-if-already-exists keep-date ------------------------------------------------------------ revno: 114831 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2013-10-28 14:58:01 +0400 message: * dispextern.h (struct face): Use bitfields for 'underline_type' and 'box' members. Remove set-but-unused members 'pixmap_w' and 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy 'stipple' member. Move 'lface' member up to help... * xfaces.c (make_realized_face): ...this function to find and clear just the members that need clearing. (load_face_colors, realize_x_face): * xdisp.c (extend_face_to_end_of_line): Adjust user. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-27 05:30:34 +0000 +++ src/ChangeLog 2013-10-28 10:58:01 +0000 @@ -1,3 +1,14 @@ +2013-10-28 Dmitry Antipov + + * dispextern.h (struct face): Use bitfields for 'underline_type' + and 'box' members. Remove set-but-unused members 'pixmap_w' and + 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy + 'stipple' member. Move 'lface' member up to help... + * xfaces.c (make_realized_face): ...this function to find and + clear just the members that need clearing. + (load_face_colors, realize_x_face): + * xdisp.c (extend_face_to_end_of_line): Adjust user. + 2013-10-27 Dmitry Antipov * xftfont.c (struct xftfont_info): Remove set-but-unused === modified file 'src/dispextern.h' --- src/dispextern.h 2013-10-17 06:42:21 +0000 +++ src/dispextern.h 2013-10-28 10:58:01 +0000 @@ -1581,6 +1581,10 @@ struct face { + /* The Lisp face attributes this face realizes. All attributes + in this vector are non-nil. */ + Lisp_Object lface[LFACE_VECTOR_SIZE]; + /* The id of this face. The id equals the index of this face in the vector faces_by_id of its face cache. */ int id; @@ -1595,11 +1599,6 @@ an id as returned from load_pixmap. */ ptrdiff_t stipple; -#else /* not HAVE_WINDOW_SYSTEM */ - - /* Dummy. */ - ptrdiff_t stipple; - #endif /* not HAVE_WINDOW_SYSTEM */ /* Pixel value of foreground color for X frames. Color index @@ -1624,9 +1623,6 @@ from the same ASCII face have the same fontset. */ int fontset; - /* Pixmap width and height. */ - unsigned int pixmap_w, pixmap_h; - /* Non-zero means characters in this face have a box of that thickness around them. If this value is negative, its absolute value indicates the thickness, and the horizontal (top and @@ -1640,10 +1636,10 @@ of width box_line_width is drawn in color box_color. A value of FACE_RAISED_BOX or FACE_SUNKEN_BOX means a 3D box is drawn with shadow colors derived from the background color of the face. */ - enum face_box_type box; + ENUM_BF (face_box_type) box : 2; /* Style of underlining. */ - enum face_underline_type underline_type; + ENUM_BF (face_underline_type) underline_type : 1; /* If `box' above specifies a 3D type, 1 means use box_color for drawing shadows. */ @@ -1695,10 +1691,6 @@ unsigned synth_ital : 1; #endif - /* The Lisp face attributes this face realizes. All attributes - in this vector are non-nil. */ - Lisp_Object lface[LFACE_VECTOR_SIZE]; - /* The hash value of this face. */ unsigned hash; === modified file 'src/xdisp.c' --- src/xdisp.c 2013-10-17 06:42:21 +0000 +++ src/xdisp.c 2013-10-28 10:58:01 +0000 @@ -18615,7 +18615,9 @@ && MATRIX_ROW_DISPLAYS_TEXT_P (it->glyph_row) && face->box == FACE_NO_BOX && face->background == FRAME_BACKGROUND_PIXEL (f) +#ifdef HAVE_WINDOW_SYSTEM && !face->stipple +#endif && !it->glyph_row->reversed_p) return; === modified file 'src/xfaces.c' --- src/xfaces.c 2013-10-17 06:42:21 +0000 +++ src/xfaces.c 2013-10-28 10:58:01 +0000 @@ -1298,8 +1298,7 @@ && !NILP (Fbitmap_spec_p (Vface_default_stipple))) { x_destroy_bitmap (f, face->stipple); - face->stipple = load_pixmap (f, Vface_default_stipple, - &face->pixmap_w, &face->pixmap_h); + face->stipple = load_pixmap (f, Vface_default_stipple, NULL, NULL); } face->background = load_color (f, face, bg, LFACE_BACKGROUND_INDEX); @@ -4018,9 +4017,13 @@ static struct face * make_realized_face (Lisp_Object *attr) { - struct face *face = xzalloc (sizeof *face); - face->ascii_face = face; + enum { off = offsetof (struct face, id) }; + struct face *face = xmalloc (sizeof *face); + memcpy (face->lface, attr, sizeof face->lface); + memset (&face->id, 0, sizeof *face - off); + face->ascii_face = face; + return face; } @@ -5716,7 +5719,7 @@ stipple = attrs[LFACE_STIPPLE_INDEX]; if (!NILP (stipple)) - face->stipple = load_pixmap (f, stipple, &face->pixmap_w, &face->pixmap_h); + face->stipple = load_pixmap (f, stipple, NULL, NULL); #endif /* HAVE_WINDOW_SYSTEM */ return face; ------------------------------------------------------------ revno: 114830 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-10-28 06:17:40 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-10-25 10:17:37 +0000 +++ autogen/configure 2013-10-28 10:17:40 +0000 @@ -4037,10 +4037,11 @@ temp_srcdir=`cd "$srcdir"; pwd` -for var in "`pwd`" "$temp_srcdir"; do +for var in "`pwd`" "$temp_srcdir" "$prefix" "$exec_prefix" \ + "$datarootdir" "$bindir" "$datadir" "$sharedstatedir" "$libexecdir"; do case "$var" in - *[^\ -~]*) as_fn_error "Emacs cannot be built in a directory whose name contains non-ASCII characters: $var" "$LINENO" 5 ;; + *[^\ -~]*) as_fn_error "Emacs cannot be built or installed in a directory whose name contains non-ASCII characters: $var" "$LINENO" 5 ;; esac done ------------------------------------------------------------ revno: 114829 committer: Daiki Ueno branch nick: trunk timestamp: Mon 2013-10-28 17:04:48 +0900 message: Document insecure elisp password caching is not usable with GnuPG 2.0. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-27 23:04:16 +0000 +++ lisp/ChangeLog 2013-10-28 08:04:48 +0000 @@ -1,3 +1,9 @@ +2013-10-28 Daiki Ueno + + * epa-file.el + (epa-file-cache-passphrase-for-symmetric-encryption): Document + that this option has no effect with GnuPG 2.0 (bug#15552). + 2013-10-27 Xue Fuqiao * image.el (defimage): === modified file 'lisp/epa-file.el' --- lisp/epa-file.el 2013-01-01 09:11:05 +0000 +++ lisp/epa-file.el 2013-10-28 08:04:48 +0000 @@ -29,9 +29,11 @@ "If non-nil, cache passphrase for symmetric encryption. For security reasons, this option is turned off by default and -not recommended to use. Instead, consider using public-key -encryption with gpg-agent which does the same job in a safer -way." +not recommended to use. Instead, consider using gpg-agent which +does the same job in a safer way. See Info node `(epa) Caching +Passphrases' for more information. + +Note that this option has no effect if you use GnuPG 2.0." :type 'boolean :group 'epa-file)