Now on revision 111671. ------------------------------------------------------------ revno: 111671 fixes bug: http://debbugs.gnu.org/13543 committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-02-03 23:46:22 -0800 message: ert--explain-format-atom fix for non-characters * lisp/emacs-lisp/ert.el (ert--explain-format-atom): Don't try to print non-characters as characters. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-03 16:49:37 +0000 +++ lisp/ChangeLog 2013-02-04 07:46:22 +0000 @@ -1,3 +1,8 @@ +2013-02-04 Glenn Morris + + * emacs-lisp/ert.el (ert--explain-format-atom): + Don't try to print non-characters as characters. (Bug#13543) + 2013-02-03 Michael Albinus * net/tramp.el (tramp-debug-message): Extend function exclude list. === modified file 'lisp/emacs-lisp/ert.el' --- lisp/emacs-lisp/ert.el 2013-01-11 10:40:54 +0000 +++ lisp/emacs-lisp/ert.el 2013-02-04 07:46:22 +0000 @@ -568,7 +568,8 @@ (defun ert--explain-format-atom (x) "Format the atom X for `ert--explain-equal'." (cl-typecase x - (fixnum (list x (format "#x%x" x) (format "?%c" x))) + (character (list x (format "#x%x" x) (format "?%c" x))) + (fixnum (list x (format "#x%x" x))) (t x))) (defun ert--explain-equal-rec (a b) ------------------------------------------------------------ revno: 111670 [merge] committer: dancol@dancol.org branch nick: realtrunk timestamp: Sun 2013-02-03 09:02:56 -0800 message: Daniel Colascione 2013-02-03 * emacs.c: Use execvp, not execv, when DAEMON_MUST_EXEC diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-02-02 19:18:00 +0000 +++ src/ChangeLog 2013-02-03 16:45:37 +0000 @@ -1,3 +1,9 @@ +2013-02-03 Daniel Colascione + + * emacs.c: Use execvp, not execv, when DAEMON_MUST_EXEC, so that + daemon mode works on cygw32 when Emacs is installed and not just + during development. + 2013-02-02 Paul Eggert Avoid file time stamp bug on MS-Windows (Bug#13149). === modified file 'src/emacs.c' --- src/emacs.c 2013-02-02 17:14:24 +0000 +++ src/emacs.c 2013-02-03 16:45:37 +0000 @@ -1059,7 +1059,7 @@ argv[skip_args] = fdStr; - execv (argv[0], argv); + execvp (argv[0], argv); fprintf (stderr, "emacs daemon: exec failed: %d\n", errno); exit (1); } ------------------------------------------------------------ revno: 111669 committer: Michael Albinus branch nick: trunk timestamp: Sun 2013-02-03 17:49:37 +0100 message: * net/tramp.el (tramp-debug-message): Extend function exclude list. (tramp-backtrace): New defun. (tramp-handle-insert-file-contents): Use `visit' when inserting the local copy. * net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime): Use `remote-file-name-inhibit-cache'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-03 15:47:12 +0000 +++ lisp/ChangeLog 2013-02-03 16:49:37 +0000 @@ -1,3 +1,13 @@ +2013-02-03 Michael Albinus + + * net/tramp.el (tramp-debug-message): Extend function exclude list. + (tramp-backtrace): New defun. + (tramp-handle-insert-file-contents): Use `visit' when inserting + the local copy. + + * net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime): Use + `remote-file-name-inhibit-cache'. + 2013-02-03 Stefan Monnier * progmodes/cperl-mode.el (cperl-mode): Avoid byte-compile warning === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-01-31 08:33:03 +0000 +++ lisp/net/tramp-sh.el 2013-02-03 16:49:37 +0000 @@ -1330,7 +1330,8 @@ (let ((f (buffer-file-name)) coding-system-used) (with-parsed-tramp-file-name f nil - (let* ((attr (file-attributes f)) + (let* ((remote-file-name-inhibit-cache t) + (attr (file-attributes f)) ;; '(-1 65535) means file doesn't exists yet. (modtime (or (nth 5 attr) '(-1 65535)))) (when (boundp 'last-coding-system-used) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-02-02 03:38:21 +0000 +++ lisp/net/tramp.el 2013-02-03 16:49:37 +0000 @@ -1391,7 +1391,9 @@ (concat "^" (regexp-opt - '("tramp-compat-funcall" + '("tramp-backtrace" + "tramp-compat-condition-case-unless-debug" + "tramp-compat-funcall" "tramp-compat-with-temp-message" "tramp-debug-message" "tramp-error" @@ -1505,6 +1507,11 @@ "`M-x tramp-cleanup-this-connection'")) (sit-for 30)))))) +(defsubst tramp-backtrace (vec-or-proc) + "Dump a backtrace into the debug buffer. +This function is meant for debugging purposes." + (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace)))) + (defmacro with-parsed-tramp-file-name (filename var &rest body) "Parse a Tramp filename and make components available in the body. @@ -3023,13 +3030,15 @@ (setq tramp-temp-buffer-file-name local-copy)) ;; We must ensure that `file-coding-system-alist' - ;; matches `local-copy'. + ;; matches `local-copy'. We must also use `visit', + ;; otherwise there might be an error in the + ;; `revert-buffer' function under XEmacs. (let ((file-coding-system-alist (tramp-find-file-name-coding-system-alist filename local-copy))) (setq result (insert-file-contents - local-copy nil nil nil replace))))) + local-copy visit nil nil replace))))) ;; Save exit. (progn ------------------------------------------------------------ revno: 111668 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2013-02-03 11:13:36 -0500 message: * lisp/url/url-cache.el (url-cache-create-filename-using-md5): Don't waste your time `requiring' a builtin feature. * lisp/subr.el (internal--called-interactively-p--get-frame): Remove left-over message. diff: === modified file 'lisp/subr.el' --- lisp/subr.el 2013-02-03 15:28:47 +0000 +++ lisp/subr.el 2013-02-03 16:13:36 +0000 @@ -3979,7 +3979,6 @@ (defvar ,sym) (unless (boundp ',sym) (let ((i 1)) - (message "Computing base-index") (while (not (eq (indirect-function (nth 1 (backtrace-frame i)) t) (indirect-function 'called-interactively-p))) (setq i (1+ i))) === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2013-01-02 16:13:04 +0000 +++ lisp/url/ChangeLog 2013-02-03 16:13:36 +0000 @@ -1,3 +1,8 @@ +2013-02-03 Stefan Monnier + + * url-cache.el (url-cache-create-filename-using-md5): Don't waste your + time `requiring' a builtin feature. + 2012-12-22 Takafumi Arakaki (tiny change) * url-http.el (url-http-end-of-document-sentinel): Bind relevant === modified file 'lisp/url/url-cache.el' --- lisp/url/url-cache.el 2013-01-01 09:11:05 +0000 +++ lisp/url/url-cache.el 2013-02-03 16:13:36 +0000 @@ -149,7 +149,6 @@ (defun url-cache-create-filename-using-md5 (url) "Create a cached filename using MD5. Very fast if you have an `md5' primitive function, suitably fast otherwise." - (require 'md5) (if url (let* ((checksum (md5 url)) (urlobj (url-generic-parse-url url)) ------------------------------------------------------------ revno: 111667 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13614 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2013-02-03 10:47:12 -0500 message: * lisp/progmodes/cperl-mode.el (cperl-mode): Avoid byte-compile warning. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-03 15:28:47 +0000 +++ lisp/ChangeLog 2013-02-03 15:47:12 +0000 @@ -1,5 +1,8 @@ 2013-02-03 Stefan Monnier + * progmodes/cperl-mode.el (cperl-mode): Avoid byte-compile warning + (bug#13614). + * subr.el (internal--called-interactively-p--get-frame): Avoid filling current-load-list (bug#13366). === modified file 'lisp/progmodes/cperl-mode.el' --- lisp/progmodes/cperl-mode.el 2013-01-02 16:13:04 +0000 +++ lisp/progmodes/cperl-mode.el 2013-02-03 15:47:12 +0000 @@ -1839,7 +1839,7 @@ (make-local-variable 'cperl-syntax-state) (setq cperl-syntax-state nil) ; reset syntaxification cache (if cperl-use-syntax-table-text-property - (if (boundp 'syntax-propertize-function) + (if (eval-when-compile (fboundp 'syntax-propertize-rules)) (progn ;; Reset syntaxification cache. (set (make-local-variable 'cperl-syntax-done-to) nil) ------------------------------------------------------------ revno: 111666 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13366 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2013-02-03 10:28:47 -0500 message: * lisp/subr.el (internal--called-interactively-p--get-frame): Avoid filling current-load-list. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-02 08:41:02 +0000 +++ lisp/ChangeLog 2013-02-03 15:28:47 +0000 @@ -1,3 +1,8 @@ +2013-02-03 Stefan Monnier + + * subr.el (internal--called-interactively-p--get-frame): Avoid filling + current-load-list (bug#13366). + 2013-02-02 Christopher Schmidt * progmodes/compile.el (compilation-error-regexp-alist-alist): === modified file 'lisp/subr.el' --- lisp/subr.el 2013-01-13 01:23:48 +0000 +++ lisp/subr.el 2013-02-03 15:28:47 +0000 @@ -3976,12 +3976,14 @@ ;; "static" variables. (let ((sym (make-symbol "base-index"))) `(progn - (defvar ,sym + (defvar ,sym) + (unless (boundp ',sym) (let ((i 1)) + (message "Computing base-index") (while (not (eq (indirect-function (nth 1 (backtrace-frame i)) t) (indirect-function 'called-interactively-p))) (setq i (1+ i))) - i)) + (setq ,sym i))) ;; (unless (eq (nth 1 (backtrace-frame ,sym)) 'called-interactively-p) ;; (error "called-interactively-p: %s is out-of-sync!" ,sym)) (backtrace-frame (+ ,sym ,n))))) ------------------------------------------------------------ revno: 111665 committer: Chong Yidong branch nick: trunk timestamp: Sun 2013-02-03 16:55:45 +0800 message: Fix byte compilation warning in files testsuite. * automated/files.el (file-test--do-local-variables-test): Avoid compilation warning message. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-01-28 01:20:42 +0000 +++ test/ChangeLog 2013-02-03 08:55:45 +0000 @@ -1,3 +1,8 @@ +2013-02-03 Chong Yidong + + * automated/files.el (file-test--do-local-variables-test): Avoid + compilation warning message. + 2013-01-27 Dmitry Gutov * automated/ruby-mode-tests.el === modified file 'test/automated/files.el' --- test/automated/files.el 2013-01-01 09:11:05 +0000 +++ test/automated/files.el 2013-02-03 08:55:45 +0000 @@ -23,9 +23,9 @@ ;; Set to t if the local variable was set, `query' if the query was ;; triggered. -(defvar files-test-result) +(defvar files-test-result nil) -(defvar files-test-safe-result) +(defvar files-test-safe-result nil) (put 'files-test-safe-result 'safe-local-variable 'booleanp) (defun files-test-fun1 () @@ -123,11 +123,11 @@ (defun file-test--do-local-variables-test (str test-settings) (with-temp-buffer (insert str) + (setq files-test-result nil + files-test-safe-result nil) (let ((enable-local-variables (nth 0 test-settings)) (enable-local-eval (nth 1 test-settings)) - (files-test-result nil) - (files-test-queried nil) - (files-test-safe-result nil)) + (files-test-queried nil)) (hack-local-variables) (eval (nth 2 test-settings))))) ------------------------------------------------------------ revno: 111664 fixes bug: http://debbugs.gnu.org/13149 committer: Paul Eggert branch nick: trunk timestamp: Sat 2013-02-02 11:18:00 -0800 message: Avoid file time stamp bug on MS-Windows. * fileio.c (Fwrite_region): Don't use the heuristic on empty files, as FAT32 doesn't update time stamps when truncating them. Also, check that a file time stamp is not a multiple of 100 ns; this should catch all instances of the problem on MS-Windows, as its native file system resolution is 100 ns or worse, and checking for a non-multiple of 100 ns should impose only a small overhead on systems with ns resolution. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-02-02 17:14:24 +0000 +++ src/ChangeLog 2013-02-02 19:18:00 +0000 @@ -1,3 +1,14 @@ +2013-02-02 Paul Eggert + + Avoid file time stamp bug on MS-Windows (Bug#13149). + * fileio.c (Fwrite_region): Don't use the heuristic on empty files, + as FAT32 doesn't update time stamps when truncating them. + Also, check that a file time stamp is not a multiple of 100 ns; + this should catch all instances of the problem on MS-Windows, + as its native file system resolution is 100 ns or worse, and + checking for a non-multiple of 100 ns should impose only a small + overhead on systems with ns resolution. + 2013-02-02 Eli Zaretskii Avoid encoding file names on MS-Windows when they need to be run === modified file 'src/fileio.c' --- src/fileio.c 2013-02-02 17:14:24 +0000 +++ src/fileio.c 2013-02-02 19:18:00 +0000 @@ -5020,11 +5020,22 @@ if (fstat (desc1, &st1) == 0 && st.st_dev == st1.st_dev && st.st_ino == st1.st_ino) { + /* Use the heuristic if it appears to be valid. With neither + O_EXCL nor O_TRUNC, if Emacs happened to write nothing to the + file, the time stamp won't change. Also, some non-POSIX + systems don't update an empty file's time stamp when + truncating it. Finally, file systems with 100 ns or worse + resolution sometimes seem to have bugs: on a system with ns + resolution, checking ns % 100 incorrectly avoids the heuristic + 1% of the time, but the problem should be temporary as we will + try again on the next time stamp. */ + bool use_heuristic + = ((open_flags & (O_EXCL | O_TRUNC)) != 0 + && st.st_size != 0 + && EMACS_NSECS (modtime) % 100 != 0); + EMACS_TIME modtime1 = get_stat_mtime (&st1); - /* If neither O_EXCL nor O_TRUNC is used, and Emacs happened to - write nothing to the file, the file's time stamp won't change - so it should not be used in this heuristic. */ - if ((open_flags & (O_EXCL | O_TRUNC)) != 0 + if (use_heuristic && EMACS_TIME_EQ (modtime, modtime1) && st.st_size == st1.st_size) { ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.