Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 100533. ------------------------------------------------------------ revno: 100533 committer: Dan Nicolaescu branch nick: trunk timestamp: Sat 2010-06-05 02:56:22 -0700 message: vc-log-incoming/vc-log-outgoing fixes for Git. * lisp/vc-git.el (vc-git-log-view-mode): Fix font lock for incoming/outgoing logs. (vc-git-log-outgoing, vc-git-log-incoming): Use @{upstream} instead of vc-git-compute-remote. (vc-git-compute-remote): Remove. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-06-03 23:26:39 +0000 +++ etc/NEWS 2010-06-05 09:56:22 +0000 @@ -167,6 +167,8 @@ **** vc-log-incoming for Git runs "git fetch" so that the necessary data is available locally. +**** vc-log-incoming and vc-log-outgoing for Git require version 1.7 (or newer). + *** New key bindings: C-x v I and C-x v O bound to vc-log-incoming and vc-log-outgoing, respectively. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-06-04 18:38:11 +0000 +++ lisp/ChangeLog 2010-06-05 09:56:22 +0000 @@ -1,3 +1,12 @@ +2010-06-05 Dan Nicolaescu + + vc-log-incoming/vc-log-outgoing fixes for Git. + * vc-git.el (vc-git-log-view-mode): Fix font lock for + incoming/outgoing logs. + (vc-git-log-outgoing, vc-git-log-incoming): Use @{upstream} + instead of vc-git-compute-remote. + (vc-git-compute-remote): Remove. + 2010-06-04 Juri Linkov * simple.el (kill-new): Fix logic of kill-do-not-save-duplicates. === modified file 'lisp/vc-git.el' --- lisp/vc-git.el 2010-06-03 23:26:39 +0000 +++ lisp/vc-git.el 2010-06-05 09:56:22 +0000 @@ -606,31 +606,15 @@ (when start-revision (list start-revision)) '("--"))))))) -(defun vc-git-compute-remote () - (let ((str (with-output-to-string - (with-current-buffer standard-output - (vc-git--out-ok "symbolic-ref" "HEAD")))) - branch remote) - (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) - (progn - (setq branch (match-string 2 str)) - (setq remote - (with-output-to-string - (with-current-buffer standard-output - (vc-git--out-ok "config" - (concat "branch." branch ".remote"))))) - (when (string-match "\\([^\n]+\\)" remote) - (setq remote (match-string 1 remote))))))) - (defun vc-git-log-outgoing (buffer remote-location) (interactive) (vc-git-command buffer 0 nil "log" "--no-color" "--graph" "--decorate" "--date=short" - "--pretty=tformat:%d%h %ad %s" "--abbrev-commit" + "--pretty=tformat:%d%h %ad %s" "--abbrev-commit" (concat (if (string= remote-location "") - (vc-git-compute-remote) + "@{upstream}" remote-location) "..HEAD"))) @@ -641,9 +625,9 @@ buffer 0 nil "log" "--no-color" "--graph" "--decorate" "--date=short" - "--pretty=tformat:%d%h %ad %s" "--abbrev-commit" + "--pretty=tformat:%d%h %ad %s" "--abbrev-commit" (concat "HEAD.." (if (string= remote-location "") - (vc-git-compute-remote) + "@{upstream}" remote-location)))) (defvar log-view-message-re) @@ -657,11 +641,11 @@ (set (make-local-variable 'log-view-file-re) "\\`a\\`") (set (make-local-variable 'log-view-per-file-logs) nil) (set (make-local-variable 'log-view-message-re) - (if (eq vc-log-view-type 'short) + (if (not (eq vc-log-view-type 'long)) "^\\(?:[*/\\| ]+ \\)?\\(?: ([^)]+)\\)?\\([0-9a-z]+\\) \\([-a-z0-9]+\\) \\(.*\\)" "^commit *\\([0-9a-z]+\\)")) (set (make-local-variable 'log-view-font-lock-keywords) - (if (eq vc-log-view-type 'short) + (if (not (eq vc-log-view-type 'long)) '( ;; Same as log-view-message-re, except that we don't ;; want the shy group for the tag name. ------------------------------------------------------------ revno: 100532 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2010-06-05 02:41:32 +0200 message: Remove obsolete macro BASE_LEADING_CODE_P. * character.h (BASE_LEADING_CODE_P): Remove. * regex.c [!emacs] (BASE_LEADING_CODE_P): Remove. * buffer.c (Fset_buffer_multibyte): * indent.c (scan_for_column, compute_motion): * insdel.c (count_combining_before, count_combining_after): Use LEADING_CODE_P instead of BASE_LEADING_CODE_P. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-06-04 14:13:35 +0000 +++ src/ChangeLog 2010-06-05 00:41:32 +0000 @@ -1,3 +1,13 @@ +2010-06-05 Juanma Barranquero + + Remove obsolete macro BASE_LEADING_CODE_P. + * character.h (BASE_LEADING_CODE_P): Remove. + * regex.c [!emacs] (BASE_LEADING_CODE_P): Remove. + * buffer.c (Fset_buffer_multibyte): + * indent.c (scan_for_column, compute_motion): + * insdel.c (count_combining_before, count_combining_after): + Use LEADING_CODE_P instead of BASE_LEADING_CODE_P. + 2010-06-04 Juanma Barranquero Turn `directory-sep-char' into a noop. === modified file 'src/buffer.c' --- src/buffer.c 2010-06-03 18:50:00 +0000 +++ src/buffer.c 2010-06-05 00:41:32 +0000 @@ -2189,7 +2189,7 @@ other_buffer = XBUFFER (buffer); if (NILP (other_buffer->name)) - error ("Cannot swap a dead buffer's text"); + error ("Cannot swap a dead buffer's text"); /* Actually, it probably works just fine. * if (other_buffer == current_buffer) @@ -2436,7 +2436,7 @@ unsigned char *p = GPT_ADDR - 1; while (! CHAR_HEAD_P (*p) && p > BEG_ADDR) p--; - if (BASE_LEADING_CODE_P (*p)) + if (LEADING_CODE_P (*p)) { int new_gpt = GPT_BYTE - (GPT_ADDR - p); @@ -4339,7 +4339,7 @@ int oldsize = XVECTOR (last_overlay_modification_hooks)->size; if (last_overlay_modification_hooks_used == oldsize) - last_overlay_modification_hooks = larger_vector + last_overlay_modification_hooks = larger_vector (last_overlay_modification_hooks, oldsize * 2, Qnil); ASET (last_overlay_modification_hooks, last_overlay_modification_hooks_used, functionlist); last_overlay_modification_hooks_used++; === modified file 'src/character.h' --- src/character.h 2010-06-03 19:02:32 +0000 +++ src/character.h 2010-06-05 00:41:32 +0000 @@ -221,10 +221,6 @@ (ASCII_BYTE_P (byte) || LEADING_CODE_P (byte)) */ #define CHAR_HEAD_P(byte) (((byte) & 0xC0) != 0x80) -/* Kept for backward compatibility. This macro will be removed in the - future. */ -#define BASE_LEADING_CODE_P LEADING_CODE_P - /* How many bytes a character that starts with BYTE occupies in a multibyte form. */ #define BYTES_BY_CHAR_HEAD(byte) \ @@ -591,7 +587,7 @@ : 0) /* If C is a high surrogate, return 1. If C is a low surrogate, - return 0. Otherwise, return 0. */ + return 0. Otherwise, return 0. */ #define CHAR_SURROGATE_PAIR_P(c) \ ((c) < 0xD800 ? 0 \ === modified file 'src/indent.c' --- src/indent.c 2010-01-13 08:35:10 +0000 +++ src/indent.c 2010-06-05 00:41:32 +0000 @@ -506,7 +506,7 @@ width = XINT (prop) - col; else if (FLOATP (prop)) width = (int)(XFLOAT_DATA (prop) + 0.5) - col; - + if (width >= 0) { EMACS_INT start; @@ -628,7 +628,7 @@ to this character. */ if (dp != 0 - && ! (multibyte && BASE_LEADING_CODE_P (c)) + && ! (multibyte && LEADING_CODE_P (c)) && VECTORP (DISP_CHAR_VECTOR (dp, c))) { Lisp_Object charvec; @@ -679,7 +679,7 @@ col += tab_width; col = col / tab_width * tab_width; } - else if (multibyte && BASE_LEADING_CODE_P (c)) + else if (multibyte && LEADING_CODE_P (c)) { /* Start of multi-byte form. */ unsigned char *ptr; @@ -1577,7 +1577,7 @@ } if (dp != 0 - && ! (multibyte && BASE_LEADING_CODE_P (c)) + && ! (multibyte && LEADING_CODE_P (c)) && VECTORP (DISP_CHAR_VECTOR (dp, c))) { charvec = DISP_CHAR_VECTOR (dp, c); @@ -1683,7 +1683,7 @@ hpos = width; } } - else if (multibyte && BASE_LEADING_CODE_P (c)) + else if (multibyte && LEADING_CODE_P (c)) { /* Start of multi-byte form. */ unsigned char *ptr; === modified file 'src/insdel.c' --- src/insdel.c 2010-04-20 01:50:52 +0000 +++ src/insdel.c 2010-06-05 00:41:32 +0000 @@ -437,7 +437,7 @@ } /* Adjusting only markers whose insertion-type is t may result in - - disordered start and end in overlays, and + - disordered start and end in overlays, and - disordered overlays in the slot `overlays_before' of current_buffer. */ if (adjusted) { @@ -843,7 +843,7 @@ len = 1; p = BYTE_POS_ADDR (pos_byte - 1); while (! CHAR_HEAD_P (*p)) p--, len++; - if (! BASE_LEADING_CODE_P (*p)) /* case (3) */ + if (! LEADING_CODE_P (*p)) /* case (3) */ return 0; combining_bytes = BYTES_BY_CHAR_HEAD (*p) - len; @@ -906,7 +906,7 @@ i = pos_byte - 2; while (i >= 0 && ! CHAR_HEAD_P (p[i])) i--; - if (i < 0 || !BASE_LEADING_CODE_P (p[i])) + if (i < 0 || !LEADING_CODE_P (p[i])) return 0; bytes = BYTES_BY_CHAR_HEAD (p[i]); @@ -914,7 +914,7 @@ ? 0 : bytes - (pos_byte - 1 - i + length)); } - if (!BASE_LEADING_CODE_P (string[i])) + if (!LEADING_CODE_P (string[i])) return 0; bytes = BYTES_BY_CHAR_HEAD (string[i]) - (length - i); === modified file 'src/regex.c' --- src/regex.c 2010-06-03 19:02:32 +0000 +++ src/regex.c 2010-06-05 00:41:32 +0000 @@ -290,7 +290,6 @@ # define SWITCH_ENUM_CAST(x) (x) /* Dummy macros for non-Emacs environments. */ -# define BASE_LEADING_CODE_P(c) (0) # define CHAR_CHARSET(c) 0 # define CHARSET_LEADING_CODE_BASE(c) 0 # define MAX_MULTIBYTE_LENGTH 1 @@ -3805,7 +3804,7 @@ if (c1 != c2 && (c1 = RE_CHAR_TO_UNIBYTE (c2)) >= 0) c = c1; - } + } *b++ = c; len = 1; } @@ -4125,7 +4124,7 @@ if (/* Any leading code can possibly start a character which doesn't match the specified set of characters. */ not - || + || /* If we can match a character class, we can match any multibyte characters. */ (CHARSET_RANGE_TABLE_EXISTS_P (&p[-2]) ------------------------------------------------------------ revno: 100531 committer: Juri Linkov branch nick: trunk timestamp: Fri 2010-06-04 21:38:11 +0300 message: * lisp/simple.el (kill-new): Fix logic of kill-do-not-save-duplicates. Instead of setting `replace' to t and replacing the same string with itself, don't do certain actions when kill-do-not-save-duplicates is non-nil and string is equal to car of kill-ring: don't call menu-bar-update-yank-menu, don't push interprogram-paste strings to kill-ring, and don't push the input argument `string' to kill-ring. http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00072.html diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-06-04 14:13:35 +0000 +++ lisp/ChangeLog 2010-06-04 18:38:11 +0000 @@ -1,3 +1,14 @@ +2010-06-04 Juri Linkov + + * simple.el (kill-new): Fix logic of kill-do-not-save-duplicates. + Instead of setting `replace' to t and replacing the same string + with itself, don't do certain actions when + kill-do-not-save-duplicates is non-nil and string is equal to car + of kill-ring: don't call menu-bar-update-yank-menu, don't push + interprogram-paste strings to kill-ring, and don't push the input + argument `string' to kill-ring. + http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00072.html + 2010-06-04 Juanma Barranquero * subr.el (directory-sep-char): Move from fileio.c and make a defconst. === modified file 'lisp/simple.el' --- lisp/simple.el 2010-05-19 17:16:07 +0000 +++ lisp/simple.el 2010-06-04 18:38:11 +0000 @@ -2905,24 +2905,27 @@ (if yank-handler (signal 'args-out-of-range (list string "yank-handler specified for empty string")))) - (when (and kill-do-not-save-duplicates - (equal string (car kill-ring))) - (setq replace t)) - (if (fboundp 'menu-bar-update-yank-menu) - (menu-bar-update-yank-menu string (and replace (car kill-ring)))) + (unless (and kill-do-not-save-duplicates + (equal string (car kill-ring))) + (if (fboundp 'menu-bar-update-yank-menu) + (menu-bar-update-yank-menu string (and replace (car kill-ring))))) (when save-interprogram-paste-before-kill (let ((interprogram-paste (and interprogram-paste-function (funcall interprogram-paste-function)))) (when interprogram-paste - (if (listp interprogram-paste) - (dolist (s (nreverse interprogram-paste)) - (push s kill-ring)) - (push interprogram-paste kill-ring))))) - (if (and replace kill-ring) - (setcar kill-ring string) - (push string kill-ring) - (if (> (length kill-ring) kill-ring-max) - (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil))) + (dolist (s (if (listp interprogram-paste) + (nreverse interprogram-paste) + (list interprogram-paste))) + (unless (and kill-do-not-save-duplicates + (equal s (car kill-ring))) + (push s kill-ring)))))) + (unless (and kill-do-not-save-duplicates + (equal string (car kill-ring))) + (if (and replace kill-ring) + (setcar kill-ring string) + (push string kill-ring) + (if (> (length kill-ring) kill-ring-max) + (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil)))) (setq kill-ring-yank-pointer kill-ring) (if interprogram-cut-function (funcall interprogram-cut-function string (not replace)))) ------------------------------------------------------------ revno: 100530 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2010-06-04 16:13:35 +0200 message: Turn `directory-sep-char' into a noop. * lisp/subr.el (directory-sep-char): Move from fileio.c and make a defconst. * src/emacs.c (decode_env_path): Don't check DIRECTORY_SEP, call dostounix_filename directly. * src/fileio.c (CORRECT_DIR_SEPS): Remove. (Ffile_name_directory, directory_file_name, Fexpand_file_name) (Fsubstitute_in_file_name): Use dostounix_filename instead. (file_name_as_directory): Use dostounix_filename, DIRECTORY_SEP. (syms_of_fileio) : Move to subr.el. * src/lisp.h [WINDOWSNT] (Vdirectory_sep_char): Don't declare. (DIRECTORY_SEP): Define unconditionally. * src/w32proc.c (CORRECT_DIR_SEPS): Remove. (Fw32_short_file_name, Fw32_long_file_name): Use dostounix_filename. * src/s/ms-w32.h (DIRECTORY_SEP): Remove. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-06-04 11:26:54 +0000 +++ lisp/ChangeLog 2010-06-04 14:13:35 +0000 @@ -1,3 +1,7 @@ +2010-06-04 Juanma Barranquero + + * subr.el (directory-sep-char): Move from fileio.c and make a defconst. + 2010-06-04 Michael Albinus * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): Expand "~/". === modified file 'lisp/subr.el' --- lisp/subr.el 2010-06-01 02:34:49 +0000 +++ lisp/subr.el 2010-06-04 14:13:35 +0000 @@ -1089,7 +1089,11 @@ (make-obsolete 'process-filter-multibyte-p nil "23.1") (make-obsolete 'set-process-filter-multibyte nil "23.1") -(make-obsolete-variable 'directory-sep-char "do not use it." "21.1") +(defconst directory-sep-char ?/ + "Directory separator character for built-in functions that return file names. +The value is always ?/.") +(make-obsolete-variable 'directory-sep-char "do not use it, just use `/'." "21.1") + (make-obsolete-variable 'mode-line-inverse-video "use the appropriate faces instead." === modified file 'src/ChangeLog' --- src/ChangeLog 2010-06-03 22:16:02 +0000 +++ src/ChangeLog 2010-06-04 14:13:35 +0000 @@ -1,3 +1,24 @@ +2010-06-04 Juanma Barranquero + + Turn `directory-sep-char' into a noop. + + * lisp.h [WINDOWSNT] (Vdirectory_sep_char): Don't declare. + (DIRECTORY_SEP): Define unconditionally. + + * s/ms-w32.h (DIRECTORY_SEP): Remove. + + * emacs.c (decode_env_path): Don't check DIRECTORY_SEP, + call dostounix_filename directly. + + * fileio.c (CORRECT_DIR_SEPS): Remove. + (Ffile_name_directory, directory_file_name, Fexpand_file_name) + (Fsubstitute_in_file_name): Use dostounix_filename instead. + (file_name_as_directory): Use dostounix_filename, DIRECTORY_SEP. + (syms_of_fileio) : Move to subr.el. + + * w32proc.c (CORRECT_DIR_SEPS): Remove. + (Fw32_short_file_name, Fw32_long_file_name): Use dostounix_filename. + 2010-06-03 Dan Nicolaescu Move UNEXEC definition to autoconf. === modified file 'src/emacs.c' --- src/emacs.c 2010-05-15 21:16:20 +0000 +++ src/emacs.c 2010-06-04 14:13:35 +0000 @@ -1723,7 +1723,7 @@ #endif init_window (); init_font (); - + if (!initialized) { char *file; @@ -2384,10 +2384,7 @@ strcpy (p, path); path = p; - if ('/' == DIRECTORY_SEP) - dostounix_filename (path); - else - unixtodos_filename (path); + dostounix_filename (path); } #endif lpath = Qnil; === modified file 'src/fileio.c' --- src/fileio.c 2010-05-28 14:57:11 +0000 +++ src/fileio.c 2010-06-04 14:13:35 +0000 @@ -83,10 +83,6 @@ #endif #ifdef DOS_NT -#define CORRECT_DIR_SEPS(s) \ - do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \ - else unixtodos_filename (s); \ - } while (0) /* On Windows, drive letters must be alphabetic - on DOS, the Netware redirector allows the six letters between 'Z' and 'a' as well. */ #ifdef MSDOS @@ -474,7 +470,7 @@ p = beg + strlen (beg); } } - CORRECT_DIR_SEPS (beg); + dostounix_filename (beg); #endif /* DOS_NT */ return make_specified_string (beg, -1, p - beg, STRING_MULTIBYTE (filename)); @@ -561,12 +557,11 @@ /* For Unix syntax, Append a slash if necessary */ if (!IS_DIRECTORY_SEP (out[size])) { - /* Cannot use DIRECTORY_SEP, which could have any value */ - out[size + 1] = '/'; + out[size + 1] = DIRECTORY_SEP; out[size + 2] = '\0'; } #ifdef DOS_NT - CORRECT_DIR_SEPS (out); + dostounix_filename (out); #endif return out; } @@ -627,7 +622,7 @@ ) dst[slen - 1] = 0; #ifdef DOS_NT - CORRECT_DIR_SEPS (dst); + dostounix_filename (dst); #endif return 1; } @@ -1032,10 +1027,9 @@ if (!lose) { #ifdef DOS_NT - /* Make sure directories are all separated with / or \ as - desired, but avoid allocation of a new string when not - required. */ - CORRECT_DIR_SEPS (nm); + /* Make sure directories are all separated with /, but + avoid allocation of a new string when not required. */ + dostounix_filename (nm); #ifdef WINDOWSNT if (IS_DIRECTORY_SEP (nm[1])) { @@ -1381,7 +1375,7 @@ target[0] = '/'; target[1] = ':'; } - CORRECT_DIR_SEPS (target); + dostounix_filename (target); #endif /* DOS_NT */ result = make_specified_string (target, -1, o - target, multibyte); @@ -1659,7 +1653,7 @@ bcopy (SDATA (filename), nm, SBYTES (filename) + 1); #ifdef DOS_NT - CORRECT_DIR_SEPS (nm); + dostounix_filename (nm); substituted = (strcmp (nm, SDATA (filename)) != 0); #endif endp = nm + SBYTES (filename); @@ -5787,11 +5781,6 @@ Fput (Qfile_date_error, Qerror_message, make_pure_c_string ("Cannot set file date")); - DEFVAR_LISP ("directory-sep-char", &Vdirectory_sep_char, - doc: /* Directory separator character for built-in functions that return file names. -The value is always ?/. Don't use this variable, just use `/'. */); - XSETFASTINT (Vdirectory_sep_char, '/'); - DEFVAR_LISP ("file-name-handler-alist", &Vfile_name_handler_alist, doc: /* *Alist of elements (REGEXP . HANDLER) for file names handled specially. If a file name matches REGEXP, then all I/O on that file is done by calling === modified file 'src/lisp.h' --- src/lisp.h 2010-05-27 23:30:11 +0000 +++ src/lisp.h 2010-06-04 14:13:35 +0000 @@ -3509,16 +3509,10 @@ extern void init_system_name P_ ((void)); /* Some systems (e.g., NT) use a different path separator than Unix, - in addition to a device separator. Default the path separator + in addition to a device separator. Set the path separator to '/', and don't test for a device separator in IS_ANY_SEP. */ -#ifdef WINDOWSNT -extern Lisp_Object Vdirectory_sep_char; -#endif - -#ifndef DIRECTORY_SEP #define DIRECTORY_SEP '/' -#endif #ifndef IS_DIRECTORY_SEP #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) #endif === modified file 'src/s/ms-w32.h' --- src/s/ms-w32.h 2010-05-12 06:53:03 +0000 +++ src/s/ms-w32.h 2010-06-04 14:13:35 +0000 @@ -95,9 +95,6 @@ your system and must be used only through an encapsulation (which you should place, by convention, in sysdep.c). */ -/* Define this to be the separator between path elements. */ -#define DIRECTORY_SEP XINT (Vdirectory_sep_char) - /* Define this to be the separator between devices and paths. */ #define DEVICE_SEP ':' === modified file 'src/w32proc.c' --- src/w32proc.c 2010-01-13 08:35:10 +0000 +++ src/w32proc.c 2010-06-04 14:13:35 +0000 @@ -1762,12 +1762,6 @@ /* Some miscellaneous functions that are Windows specific, but not GUI specific (ie. are applicable in terminal or batch mode as well). */ -/* lifted from fileio.c */ -#define CORRECT_DIR_SEPS(s) \ - do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \ - else unixtodos_filename (s); \ - } while (0) - DEFUN ("w32-short-file-name", Fw32_short_file_name, Sw32_short_file_name, 1, 1, 0, doc: /* Return the short file name version (8.3) of the full path of FILENAME. If FILENAME does not exist, return nil. @@ -1786,7 +1780,7 @@ if (GetShortPathName (SDATA (ENCODE_FILE (filename)), shortname, MAX_PATH) == 0) return Qnil; - CORRECT_DIR_SEPS (shortname); + dostounix_filename (shortname); return build_string (shortname); } @@ -1815,7 +1809,7 @@ if (!w32_get_long_filename (SDATA (ENCODE_FILE (filename)), longname, MAX_PATH)) return Qnil; - CORRECT_DIR_SEPS (longname); + dostounix_filename (longname); /* If we were passed only a drive, make sure that a slash is not appended for consistency with directories. Allow for drive mapping via SUBST ------------------------------------------------------------ revno: 100529 committer: Michael Albinus branch nick: trunk timestamp: Fri 2010-06-04 13:26:54 +0200 message: * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): Expand "~/". (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p): Handle default-location. * net/tramp-smb.el (tramp-smb-handle-delete-directory): Don't try to move files to trash. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-06-04 01:38:12 +0000 +++ lisp/ChangeLog 2010-06-04 11:26:54 +0000 @@ -1,3 +1,12 @@ +2010-06-04 Michael Albinus + + * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): Expand "~/". + (tramp-gvfs-handler-mounted-unmounted) + (tramp-gvfs-connection-mounted-p): Handle default-location. + + * net/tramp-smb.el (tramp-smb-handle-delete-directory): Don't try to + move files to trash. + 2010-06-04 Juanma Barranquero * international/mule-cmds.el (nonascii-insert-offset) === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2010-06-02 09:53:00 +0000 +++ lisp/net/tramp-gvfs.el 2010-06-04 11:26:54 +0000 @@ -157,7 +157,7 @@ ;; ;; ;; ;; ;; @@ -167,11 +167,11 @@ ;; ;; ;; +;; type='{sosssssbay{aya{say}}ay}'/> ;; ;; ;; +;; type='{sosssssbay{aya{say}}ay}'/> ;; ;; ;; @@ -191,7 +191,7 @@ ;; STRUCT mount_spec_item ;; STRING key (server, share, type, user, host, port) ;; ARRAY BYTE value -;; STRING default_location Since GVFS 1.5 only !!! +;; ARRAY BYTE default_location Since GVFS 1.5 only !!! (defconst tramp-gvfs-interface-mountoperation "org.gtk.vfs.MountOperation" "Used by the dbus-proxying implementation of GMountOperation.") @@ -608,6 +608,14 @@ (tramp-run-real-handler 'expand-file-name (list name nil)) ;; Dissect NAME. (with-parsed-tramp-file-name name nil + ;; If there is a default location, expand tilde. + (when (string-match "\\`\\(~\\)\\(/\\|\\'\\)" localname) + (save-match-data + (tramp-gvfs-maybe-open-connection (vector method user host "/"))) + (setq localname + (replace-match + (tramp-get-file-property v "/" "default-location" "~") + nil t localname 1))) ;; Tilde expansion is not possible. (when (string-match "\\`\\(~[^/]*\\)\\(.*\\)\\'" localname) (tramp-error @@ -967,47 +975,55 @@ "Signal handler for the \"org.gtk.vfs.MountTracker.mounted\" and \"org.gtk.vfs.MountTracker.unmounted\" signals." (ignore-errors - ;; The last element could be the default location in newer gvfs - ;; versions. We must check this. - (unless (consp (car (last mount-info))) - (setq mount-info (butlast mount-info))) - (let* ((signal-name (dbus-event-member-name last-input-event)) - (mount-spec (cadar (last mount-info))) - (method (dbus-byte-array-to-string (cadr (assoc "type" mount-spec)))) - (user (dbus-byte-array-to-string (cadr (assoc "user" mount-spec)))) - (domain (dbus-byte-array-to-string - (cadr (assoc "domain" mount-spec)))) - (host (dbus-byte-array-to-string - (cadr (or (assoc "host" mount-spec) - (assoc "server" mount-spec))))) - (port (dbus-byte-array-to-string (cadr (assoc "port" mount-spec)))) - (ssl (dbus-byte-array-to-string (cadr (assoc "ssl" mount-spec)))) - (prefix (concat (dbus-byte-array-to-string (caar (last mount-info))) - (dbus-byte-array-to-string - (cadr (assoc "share" mount-spec)))))) - (when (string-match "^smb" method) - (setq method "smb")) - (when (string-equal "obex" method) - (setq host (tramp-bluez-device host))) - (when (and (string-equal "dav" method) (string-equal "true" ssl)) - (setq method "davs")) - (unless (zerop (length domain)) - (setq user (concat user tramp-prefix-domain-format domain))) - (unless (zerop (length port)) - (setq host (concat host tramp-prefix-port-format port))) - (with-parsed-tramp-file-name - (tramp-make-tramp-file-name method user host "") nil - (tramp-message - v 6 "%s %s" signal-name (tramp-gvfs-stringify-dbus-message mount-info)) - (tramp-set-file-property v "/" "list-mounts" 'undef) - (if (string-equal signal-name "unmounted") - (tramp-set-file-property v "/" "fuse-mountpoint" nil) - ;; Set prefix and mountpoint. - (unless (string-equal prefix "/") - (tramp-set-file-property v "/" "prefix" prefix)) - (tramp-set-file-property - v "/" "fuse-mountpoint" - (dbus-byte-array-to-string (car (last mount-info 2))))))))) + (let ((signal-name (dbus-event-member-name last-input-event)) + (elt mount-info)) + ;; Jump over the first elements of the mount info. Since there + ;; were changes in the antries, we cannot access dedicated + ;; elements. + (while (stringp (car elt)) (setq elt (cdr elt))) + (let* ((fuse-mountpoint (dbus-byte-array-to-string (cadr elt))) + (mount-spec (caddr elt)) + (default-location (dbus-byte-array-to-string (cadddr elt))) + (method (dbus-byte-array-to-string + (cadr (assoc "type" (cadr mount-spec))))) + (user (dbus-byte-array-to-string + (cadr (assoc "user" (cadr mount-spec))))) + (domain (dbus-byte-array-to-string + (cadr (assoc "domain" (cadr mount-spec))))) + (host (dbus-byte-array-to-string + (cadr (or (assoc "host" (cadr mount-spec)) + (assoc "server" (cadr mount-spec)))))) + (port (dbus-byte-array-to-string + (cadr (assoc "port" (cadr mount-spec))))) + (ssl (dbus-byte-array-to-string + (cadr (assoc "ssl" (cadr mount-spec))))) + (prefix (concat (dbus-byte-array-to-string (car mount-spec)) + (dbus-byte-array-to-string + (cadr (assoc "share" (cadr mount-spec))))))) + (when (string-match "^smb" method) + (setq method "smb")) + (when (string-equal "obex" method) + (setq host (tramp-bluez-device host))) + (when (and (string-equal "dav" method) (string-equal "true" ssl)) + (setq method "davs")) + (unless (zerop (length domain)) + (setq user (concat user tramp-prefix-domain-format domain))) + (unless (zerop (length port)) + (setq host (concat host tramp-prefix-port-format port))) + (with-parsed-tramp-file-name + (tramp-make-tramp-file-name method user host "") nil + (tramp-message + v 6 "%s %s" + signal-name (tramp-gvfs-stringify-dbus-message mount-info)) + (tramp-set-file-property v "/" "list-mounts" 'undef) + (if (string-equal signal-name "unmounted") + (tramp-set-file-property v "/" "fuse-mountpoint" nil) + ;; Set prefix, mountpoint and location. + (unless (string-equal prefix "/") + (tramp-set-file-property v "/" "prefix" prefix)) + (tramp-set-file-property v "/" "fuse-mountpoint" fuse-mountpoint) + (tramp-set-file-property + v "/" "default-location" default-location))))))) (dbus-register-signal :session nil tramp-gvfs-path-mounttracker @@ -1031,25 +1047,29 @@ :session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker tramp-gvfs-interface-mounttracker "listMounts")) nil) - ;; The last element could be the default location in newer gvfs - ;; versions. We must check this. - (unless (consp (car (last elt))) (setq elt (butlast elt))) - (let* ((mount-spec (cadar (last elt))) + ;; Jump over the first elements of the mount info. Since there + ;; were changes in the antries, we cannot access dedicated + ;; elements. + (while (stringp (car elt)) (setq elt (cdr elt))) + (let* ((fuse-mountpoint (dbus-byte-array-to-string (cadr elt))) + (mount-spec (caddr elt)) + (default-location (dbus-byte-array-to-string (cadddr elt))) (method (dbus-byte-array-to-string - (cadr (assoc "type" mount-spec)))) + (cadr (assoc "type" (cadr mount-spec))))) (user (dbus-byte-array-to-string - (cadr (assoc "user" mount-spec)))) + (cadr (assoc "user" (cadr mount-spec))))) (domain (dbus-byte-array-to-string - (cadr (assoc "domain" mount-spec)))) + (cadr (assoc "domain" (cadr mount-spec))))) (host (dbus-byte-array-to-string - (cadr (or (assoc "host" mount-spec) - (assoc "server" mount-spec))))) + (cadr (or (assoc "host" (cadr mount-spec)) + (assoc "server" (cadr mount-spec)))))) (port (dbus-byte-array-to-string - (cadr (assoc "port" mount-spec)))) - (ssl (dbus-byte-array-to-string (cadr (assoc "ssl" mount-spec)))) - (prefix (concat (dbus-byte-array-to-string (caar (last elt))) + (cadr (assoc "port" (cadr mount-spec))))) + (ssl (dbus-byte-array-to-string + (cadr (assoc "ssl" (cadr mount-spec))))) + (prefix (concat (dbus-byte-array-to-string (car mount-spec)) (dbus-byte-array-to-string - (cadr (assoc "share" mount-spec)))))) + (cadr (assoc "share" (cadr mount-spec))))))) (when (string-match "^smb" method) (setq method "smb")) (when (string-equal "obex" method) @@ -1068,12 +1088,11 @@ (string-equal host (tramp-file-name-host vec)) (string-match (concat "^" (regexp-quote prefix)) (tramp-file-name-localname vec))) - ;; Set prefix and mountpoint. + ;; Set prefix, mountpoint and location. (unless (string-equal prefix "/") (tramp-set-file-property vec "/" "prefix" prefix)) - (tramp-set-file-property - vec "/" "fuse-mountpoint" - (dbus-byte-array-to-string (car (last elt 2)))) + (tramp-set-file-property vec "/" "fuse-mountpoint" fuse-mountpoint) + (tramp-set-file-property vec "/" "default-location" default-location) (throw 'mounted t))))))) (defun tramp-gvfs-mount-spec (vec) === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2010-05-28 13:28:36 +0000 +++ lisp/net/tramp-smb.el 2010-06-04 11:26:54 +0000 @@ -382,7 +382,7 @@ (lambda (file) (if (file-directory-p file) (tramp-compat-delete-directory file recursive) - (tramp-compat-delete-file file 'trash))) + (delete-file file))) ;; We do not want to delete "." and "..". (directory-files directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"))) ------------------------------------------------------------ revno: 100528 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2010-06-04 03:38:12 +0200 message: mule-cmds.el: Add obsolescence information for nonascii-* vars. * international/mule-cmds.el (nonascii-insert-offset) (nonascii-translation-table): Add obsolescence information. * international/mule.el (make-translation-table-from-vector): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-06-03 23:26:39 +0000 +++ lisp/ChangeLog 2010-06-04 01:38:12 +0000 @@ -1,3 +1,10 @@ +2010-06-04 Juanma Barranquero + + * international/mule-cmds.el (nonascii-insert-offset) + (nonascii-translation-table): Add obsolescence information. + + * international/mule.el (make-translation-table-from-vector): Doc fix. + 2010-06-03 Dan Nicolaescu vc-log-incoming/vc-log-outgoing improvements for Git. === modified file 'lisp/international/mule-cmds.el' --- lisp/international/mule-cmds.el 2010-05-15 14:06:58 +0000 +++ lisp/international/mule-cmds.el 2010-06-04 01:38:12 +0000 @@ -287,7 +287,7 @@ (interactive) ;; We have to decode the file in any environment. (letf ((coding-system-for-read 'iso-2022-7bit)) - (view-file (expand-file-name "HELLO" data-directory)))) + (view-file (expand-file-name "HELLO" data-directory)))) (defun universal-coding-system-argument (coding-system) "Execute an I/O command using the specified coding system." @@ -2882,8 +2882,10 @@ :group 'mule :global t) -(defvar nonascii-insert-offset 0 "This variable is obsolete.") -(defvar nonascii-translation-table nil "This variable is obsolete.") +(defvar nonascii-insert-offset 0) +(make-obsolete-variable 'nonascii-insert-offset "do not use it." "23.1") +(defvar nonascii-translation-table nil) +(make-obsolete-variable 'nonascii-translation-table "do not use it." "23.1") (defvar ucs-names nil "Alist of cached (CHAR-NAME . CHAR-CODE) pairs.") === modified file 'lisp/international/mule.el' --- lisp/international/mule.el 2010-05-30 19:47:34 +0000 +++ lisp/international/mule.el 2010-06-04 01:38:12 +0000 @@ -2188,8 +2188,7 @@ (defun make-translation-table-from-vector (vec) "Make translation table from decoding vector VEC. VEC is an array of 256 elements to map unibyte codes to multibyte -characters. Elements may be nil for undefined code points. -See also the variable `nonascii-translation-table'." +characters. Elements may be nil for undefined code points." (let ((table (make-char-table 'translation-table)) (rev-table (make-char-table 'translation-table)) ch)