Now on revision 111377. ------------------------------------------------------------ revno: 111377 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2012-12-29 23:18:05 +0000 message: lisp/gnus/nnfolder.el: Allow regenerating recursive nnfolder names diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2012-12-29 15:16:37 +0000 +++ lisp/gnus/ChangeLog 2012-12-29 23:18:05 +0000 @@ -1,3 +1,9 @@ +2012-12-29 Lars Magne Ingebrigtsen + + * nnfolder.el (nnfolder-recursive-directory-files): New function. + (nnfolder-generate-active-file): Make this function work with recursive + folder names. + 2012-12-27 Lars Ingebrigtsen * nntp.el (nntp-open-connection): Use HELP as the capability command === modified file 'lisp/gnus/nnfolder.el' --- lisp/gnus/nnfolder.el 2012-06-26 22:52:31 +0000 +++ lisp/gnus/nnfolder.el 2012-12-29 23:18:05 +0000 @@ -1004,6 +1004,28 @@ (nnfolder-save-nov)) (current-buffer)))))) +(defun nnfolder-recursive-directory-files (dir prefix) + (let ((files nil)) + (dolist (file (directory-files dir)) + (cond + ((or (file-symlink-p (expand-file-name file dir)) + (member file '("." ".."))) + ;; Ignore + ) + ((file-directory-p (expand-file-name file dir)) + (setq files (nconc (nnfolder-recursive-directory-files + (expand-file-name file dir) + (if prefix + (concat prefix "." (directory-file-name file)) + (file-name-nondirectory file))) + files))) + ((file-regular-p (expand-file-name file dir)) + (push (if prefix + (concat prefix "." file) + file) + files)))) + files)) + ;;;###autoload (defun nnfolder-generate-active-file () "Look for mbox folders in the nnfolder directory and make them into groups. @@ -1020,10 +1042,13 @@ (when (not (message-mail-file-mbox-p file)) (ignore-errors (delete-file file))))) - (dolist (file (directory-files nnfolder-directory)) + (dolist (file (if nnmail-use-long-file-names + (directory-files nnfolder-directory) + (nnfolder-recursive-directory-files + nnfolder-directory nil))) (when (and (not (backup-file-name-p file)) (message-mail-file-mbox-p - (nnheader-concat nnfolder-directory file))) + (nnfolder-group-pathname file))) (let ((oldgroup (assoc file nnfolder-group-alist))) (if oldgroup (nnheader-message 5 "Refreshing group %s..." file) ------------------------------------------------------------ revno: 111376 committer: Michael Albinus branch nick: trunk timestamp: Sat 2012-12-29 20:11:11 +0100 message: * net/tramp-sh.el (tramp-sh-handle-file-acl): Suppress basic attributes. (tramp-sh-handle-set-file-acl): Return `t' on success. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-29 14:58:41 +0000 +++ lisp/ChangeLog 2012-12-29 19:11:11 +0000 @@ -1,3 +1,8 @@ +2012-12-29 Michael Albinus + + * net/tramp-sh.el (tramp-sh-handle-file-acl): Suppress basic attributes. + (tramp-sh-handle-set-file-acl): Return `t' on success. + 2012-12-29 Eli Zaretskii * files.el (backup-buffer-copy, basic-save-buffer-2): If === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2012-12-27 19:00:57 +0000 +++ lisp/net/tramp-sh.el 2012-12-29 19:11:11 +0000 @@ -1547,25 +1547,31 @@ (when (and (tramp-remote-acl-p v) (tramp-send-command-and-check v (format - "getfacl -ac %s 2>/dev/null" + "getfacl -acs %s 2>/dev/null" (tramp-shell-quote-argument localname)))) (with-current-buffer (tramp-get-connection-buffer v) (goto-char (point-max)) (delete-blank-lines) - (substring-no-properties (buffer-string))))))) + (when (> (point-max) (point-min)) + (substring-no-properties (buffer-string)))))))) (defun tramp-sh-handle-set-file-acl (filename acl-string) "Like `set-file-acl' for Tramp files." (with-parsed-tramp-file-name filename nil - (if (and (stringp acl-string) - (tramp-remote-acl-p v) - (tramp-send-command-and-check - v (format "setfacl --set-file=- %s <<'EOF'\n%s\nEOF\n" - (tramp-shell-quote-argument localname) acl-string))) - (tramp-set-file-property v localname "file-acl" acl-string) - (tramp-set-file-property v localname "file-acl-string" 'undef))) - ;; We always return nil. - nil) + (when (tramp-remote-acl-p v) + (condition-case nil + (when (stringp acl-string) + (tramp-set-file-property v localname "file-acl" acl-string) + (dolist (line (split-string acl-string nil t) t) + (unless (tramp-send-command-and-check + v (format + "setfacl -m %s %s" + line (tramp-shell-quote-argument localname))) + (error)))) + ;; In case of errors, we return `nil'. + (error + (tramp-set-file-property v localname "file-acl" 'undef) + nil))))) ;; Simple functions using the `test' command. ------------------------------------------------------------ revno: 111375 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-12-29 10:15:47 -0800 message: How to uncommit diff: === modified file 'admin/notes/bzr' --- admin/notes/bzr 2011-11-13 07:48:23 +0000 +++ admin/notes/bzr 2012-12-29 18:15:47 +0000 @@ -182,6 +182,71 @@ You could also try `bzr add --file-ids-from', if you have a copy of another branch where file still exists. +* Undoing a commit (uncommitting) + +It is possible to undo/remove a bzr commit (ie, to uncommit). +Only do this if you really, really, need to. For example, if you +somehow made a commit that triggers a bug in bzr itself. +Don't do it because you made a typo in a commit or the log. + +If you do need to do this, do it as soon as possible, because the +longer you leave it, the more work is involved. + +0. First, tell emacs-devel that you are going to do this, and suggest +people not commit anything to the affected branch for the duration. + +In the following, replace USER with your Savannah username, and +BRANCH with the name of the branch. +Let's assume that revno 100 is the bad commit, and that there have +been two more commits after that (because nothing is ever easy). + +1. Ensure your copy of the branch is up-to-date (for a bound +branch, bzr up; for an unbound branch, bzr pull) and has no local +changes (bzr st). + +2. Make a record of the commits you are going to undo: +bzr diff -c 102 > /tmp/102.diff +etc + +Also record the commit message, author, and any --fixes information. + +3. Most Emacs branches are set up to prevent just this kind of thing. +So we need to disable that protection: + +bzr config append_revisions_only=False \ + -d bzr+ssh://USER@bzr.savannah.gnu.org/emacs/BRANCH/ + +4. Undo the commits: +bzr uncommit -r -4 + +This will show the commits it is going to undo, and prompt you to confirm. + +5. If using an unbound branch: +bzr push --overwrite + +6. Now, replay the commits you just undid (obviously, fix whatever it +was in the bad commit that caused the problem): + +patch -p0 < /tmp/100.diff +bzr commit --author ... --fixes ... -F /tmp/100.log +etc + +7. If using an unbound branch: +bzr push + +8. Finally, re-enable the branch protection: +bzr config append_revisions_only=True \ + -d bzr+ssh://USER@bzr.savannah.gnu.org/emacs/BRANCH/ + +9. Tell emacs-devel that it is ok to use the branch again. +Anyone with local changes should back them up before doing anything. + +For a bound branch, bzr up will convert any of the undone commits to a +pending merge. Just bzr revert these away. + +For an unbound branch, bzr pull will complain about diverged branches +and refuse to do anything. Use bzr pull --overwrite. + * Loggerhead Loggerhead is the bzr tool for viewing a repository over http (similar ------------------------------------------------------------ revno: 111374 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-12-29 19:47:39 +0200 message: Improve copy-file diagnostics on MS-Windows. src/fileio.c (Fcopy_file) [WINDOWSNT]: Improve diagnostics when CopyFile fails by looking at what GetLastError returns. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-12-29 14:32:36 +0000 +++ src/ChangeLog 2012-12-29 17:47:39 +0000 @@ -3,6 +3,7 @@ * fileio.c (Fset_file_selinux_context, Fset_file_acl): Return t if file's SELinux context or ACLs successfully set, nil otherwise. (Bug#13298) + (Fcopy_file) [WINDOWSNT]: Improve diagnostics when CopyFile fails. * w32proc.c (reader_thread): Avoid passing NULL handles to SetEvent and WaitForSingleObject. === modified file 'src/fileio.c' --- src/fileio.c 2012-12-29 17:02:34 +0000 +++ src/fileio.c 2012-12-29 17:47:39 +0000 @@ -2029,7 +2029,15 @@ if (!CopyFile (SDATA (encoded_file), SDATA (encoded_newname), FALSE)) - report_file_error ("Copying file", Fcons (file, Fcons (newname, Qnil))); + { + /* CopyFile doesn't set errno when it fails. By far the most + "popular" reason is that the target is read-only. */ + if (GetLastError () == 5) + errno = EACCES; + else + errno = EPERM; + report_file_error ("Copying file", Fcons (file, Fcons (newname, Qnil))); + } /* CopyFile retains the timestamp by default. */ else if (NILP (keep_time)) { ------------------------------------------------------------ revno: 111373 fixes bug: http://debbugs.gnu.org/13298 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-12-29 19:02:34 +0200 message: Fix return values of set-file-acl and set-file-selinux-context when ENOTSUP. diff: === modified file 'src/fileio.c' --- src/fileio.c 2012-12-29 14:32:36 +0000 +++ src/fileio.c 2012-12-29 17:02:34 +0000 @@ -3065,7 +3065,7 @@ context_free (parsed_con); freecon (con); - return Qt; + return fail ? Qnil : Qt; } else report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil)); @@ -3171,7 +3171,7 @@ report_file_error ("Setting ACL", Fcons (absname, Qnil)); acl_free (acl); - return Qt; + return fail ? Qnil : Qt; } #endif ------------------------------------------------------------ revno: 111372 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2012-12-29 16:28:42 +0100 message: Indent diff: === modified file 'src/data.c' --- src/data.c 2012-12-03 01:08:31 +0000 +++ src/data.c 2012-12-29 15:28:42 +0000 @@ -583,7 +583,7 @@ (register Lisp_Object symbol) { CHECK_SYMBOL (symbol); - return XSYMBOL (symbol)->function; + return XSYMBOL (symbol)->function; } DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, ------------------------------------------------------------ revno: 111371 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2012-12-29 16:16:37 +0100 message: Fix changelog diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2012-12-28 12:26:54 +0000 +++ lisp/gnus/ChangeLog 2012-12-29 15:16:37 +0000 @@ -26,11 +26,11 @@ 2012-12-27 Andreas Schwab - * mml2015.el (mml2015-epg-key-image): separate attribute stream from + * mml2015.el (mml2015-epg-key-image): Separate attribute stream from stderr. - * nnimap.el (nnimap-find-article-by-message-id): - Don't error out if group is nil. + * nnimap.el (nnimap-find-article-by-message-id): Don't error out if + group is nil. * shr.el (shr-tag-em): Render as italic, not bold. ------------------------------------------------------------ revno: 111370 fixes bug: http://debbugs.gnu.org/13298 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-12-29 16:58:41 +0200 message: Fix last commit. lisp/files.el (basic-save-buffer): If set-file-extended-attributes fails, fall back on set-file-modes. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-29 14:32:36 +0000 +++ lisp/ChangeLog 2012-12-29 14:58:41 +0000 @@ -3,6 +3,7 @@ * files.el (backup-buffer-copy, basic-save-buffer-2): If set-file-extended-attributes fails, fall back on set-file-modes instead of signaling an error. (Bug#13298) + (basic-save-buffer): Likewise. 2012-12-29 Fabián Ezequiel Gallina === modified file 'lisp/files.el' --- lisp/files.el 2012-12-29 14:32:36 +0000 +++ lisp/files.el 2012-12-29 14:58:41 +0000 @@ -4621,9 +4621,11 @@ (if setmodes (condition-case () (progn - (set-file-modes buffer-file-name (car setmodes)) - (set-file-extended-attributes buffer-file-name - (nth 1 setmodes))) + (unless + (with-demoted-errors + (set-file-modes buffer-file-name (car setmodes))) + (set-file-extended-attributes buffer-file-name + (nth 1 setmodes)))) (error nil)))) ;; If the auto-save file was recent before this command, ;; delete it now. ------------------------------------------------------------ revno: 111369 fixes bug: http://debbugs.gnu.org/13298 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-12-29 16:32:36 +0200 message: Fix bug #13298 with failed backups by falling back on set-file-modes. src/fileio.c (Fset_file_selinux_context, Fset_file_acl): Return t if file's SELinux context or ACLs successfully set, nil otherwise. lisp/files.el (backup-buffer-copy, basic-save-buffer-2): If set-file-extended-attributes fails, fall back on set-file-modes instead of signaling an error. doc/lispref/files.texi (Changing Files): Document the return values of set-file-selinux-context and set-file-acl. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-12-27 08:21:08 +0000 +++ doc/lispref/ChangeLog 2012-12-29 14:32:36 +0000 @@ -1,3 +1,8 @@ +2012-12-29 Eli Zaretskii + + * files.texi (Changing Files): Document the return values of + set-file-selinux-context and set-file-acl. + 2012-12-27 Glenn Morris * files.texi (File Names): Mention Cygwin conversion functions. === modified file 'doc/lispref/files.texi' --- doc/lispref/files.texi 2012-12-27 08:21:08 +0000 +++ doc/lispref/files.texi 2012-12-29 14:32:36 +0000 @@ -1703,9 +1703,11 @@ @var{filename} to @var{context}. @xref{File Attributes}, for a brief description of SELinux contexts. The @var{context} argument should be a list @code{(@var{user} @var{role} @var{type} @var{range})}, like the -return value of @code{file-selinux-context}. The function does -nothing if SELinux is disabled, or if Emacs was compiled without -SELinux support. +return value of @code{file-selinux-context}. The function returns +@code{t} if it succeeds to set the SELinux security context of +@var{filename}, @code{nil} otherwise. The function does nothing and +returns @code{nil} if SELinux is disabled, or if Emacs was compiled +without SELinux support. @end defun @defun set-file-acl filename acl-string @@ -1713,7 +1715,9 @@ @var{acl-string}. @xref{File Attributes}, for a brief description of ACLs. The @var{acl-string} argument should be a string containing the textual representation of the desired ACL entries as returned by -@code{file-acl} (@pxref{File Attributes, file-acl}). +@code{file-acl} (@pxref{File Attributes, file-acl}). The function +returns @code{t} if it succeeds to set the ACL entries of +@var{filename}, @code{nil} otherwise. @end defun @node File Names === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-29 12:57:49 +0000 +++ lisp/ChangeLog 2012-12-29 14:32:36 +0000 @@ -1,3 +1,9 @@ +2012-12-29 Eli Zaretskii + + * files.el (backup-buffer-copy, basic-save-buffer-2): If + set-file-extended-attributes fails, fall back on set-file-modes + instead of signaling an error. (Bug#13298) + 2012-12-29 Fabián Ezequiel Gallina * progmodes/python.el: Support other commands triggering === modified file 'lisp/files.el' --- lisp/files.el 2012-12-17 15:51:49 +0000 +++ lisp/files.el 2012-12-29 14:32:36 +0000 @@ -4019,10 +4019,12 @@ nil))) ;; Reset the umask. (set-default-file-modes umask))) - (and modes - (set-file-modes to-name (logand modes #o1777))) - (and extended-attributes - (set-file-extended-attributes to-name extended-attributes))) + ;; If set-file-extended-attributes fails, fall back on set-file-modes. + (unless (and extended-attributes + (with-demoted-errors + (set-file-extended-attributes to-name extended-attributes))) + (and modes + (set-file-modes to-name (logand modes #o1777))))) (defvar file-name-version-regexp "\\(?:~\\|\\.~[-[:alnum:]:#@^._]+\\(?:~[[:digit:]]+\\)?~\\)" @@ -4737,8 +4739,14 @@ (setq setmodes (list (file-modes buffer-file-name) (file-extended-attributes buffer-file-name) buffer-file-name)) - (set-file-modes buffer-file-name (logior (car setmodes) 128)) - (set-file-extended-attributes buffer-file-name (nth 1 setmodes))))) + ;; If set-file-extended-attributes fails, fall back on + ;; set-file-modes. + (unless + (with-demoted-errors + (set-file-extended-attributes buffer-file-name + (nth 1 setmodes))) + (set-file-modes buffer-file-name + (logior (car setmodes) 128)))))) (let (success) (unwind-protect (progn === modified file 'src/ChangeLog' --- src/ChangeLog 2012-12-29 10:09:49 +0000 +++ src/ChangeLog 2012-12-29 14:32:36 +0000 @@ -1,5 +1,9 @@ 2012-12-29 Eli Zaretskii + * fileio.c (Fset_file_selinux_context, Fset_file_acl): Return t if + file's SELinux context or ACLs successfully set, nil otherwise. + (Bug#13298) + * w32proc.c (reader_thread): Avoid passing NULL handles to SetEvent and WaitForSingleObject. === modified file 'src/fileio.c' --- src/fileio.c 2012-12-27 08:21:08 +0000 +++ src/fileio.c 2012-12-29 14:32:36 +0000 @@ -2996,8 +2996,10 @@ CONTEXT should be a list (USER ROLE TYPE RANGE), where the list elements are strings naming the components of a SELinux context. -This function does nothing if SELinux is disabled, or if Emacs was not -compiled with SELinux support. */) +Value is t if setting of SELinux context was successful, nil otherwise. + +This function does nothing and returns nil if SELinux is disabled, +or if Emacs was not compiled with SELinux support. */) (Lisp_Object filename, Lisp_Object context) { Lisp_Object absname; @@ -3063,6 +3065,7 @@ context_free (parsed_con); freecon (con); + return Qt; } else report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil)); @@ -3127,6 +3130,8 @@ ACL-STRING should contain the textual representation of the ACL entries in a format suitable for the platform. +Value is t if setting of ACL was successful, nil otherwise. + Setting ACL for local files requires Emacs to be built with ACL support. */) (Lisp_Object filename, Lisp_Object acl_string) @@ -3166,6 +3171,7 @@ report_file_error ("Setting ACL", Fcons (absname, Qnil)); acl_free (acl); + return Qt; } #endif ------------------------------------------------------------ revno: 111368 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Sat 2012-12-29 09:57:49 -0300 message: * progmodes/python.el: Support other commands triggering python-indent-line so indentation cycling continues to work. (python-indent-trigger-commands): New defcustom. (python-indent-line): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-29 12:33:33 +0000 +++ lisp/ChangeLog 2012-12-29 12:57:49 +0000 @@ -1,5 +1,12 @@ 2012-12-29 Fabián Ezequiel Gallina + * progmodes/python.el: Support other commands triggering + python-indent-line so indentation cycling continues to work. + (python-indent-trigger-commands): New defcustom. + (python-indent-line): Use it. + +2012-12-29 Fabián Ezequiel Gallina + * progmodes/python.el (python-shell-send-region): Add blank lines for non sent code so backtraces remain correct. === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-12-29 12:33:33 +0000 +++ lisp/progmodes/python.el 2012-12-29 12:57:49 +0000 @@ -607,6 +607,12 @@ :group 'python :safe 'booleanp) +(defcustom python-indent-trigger-commands + '(indent-for-tab-command yas-expand yas/expand) + "Commands that might trigger a `python-indent-line' call." + :type '(repeat symbol) + :group 'python) + (define-obsolete-variable-alias 'python-indent 'python-indent-offset "24.3") @@ -905,20 +911,21 @@ indicated by the variable `python-indent-levels' to set the current indentation. -When the variable `last-command' is equal to -`indent-for-tab-command' or FORCE-TOGGLE is non-nil it cycles -levels indicated in the variable `python-indent-levels' by -setting the current level in the variable -`python-indent-current-level'. +When the variable `last-command' is equal to one of the symbols +inside `python-indent-trigger-commands' or FORCE-TOGGLE is +non-nil it cycles levels indicated in the variable +`python-indent-levels' by setting the current level in the +variable `python-indent-current-level'. -When the variable `last-command' is not equal to -`indent-for-tab-command' and FORCE-TOGGLE is nil it calculates -possible indentation levels and saves it in the variable -`python-indent-levels'. Afterwards it sets the variable -`python-indent-current-level' correctly so offset is equal -to (`nth' `python-indent-current-level' `python-indent-levels')" +When the variable `last-command' is not equal to one of the +symbols inside `python-indent-trigger-commands' and FORCE-TOGGLE +is nil it calculates possible indentation levels and saves it in +the variable `python-indent-levels'. Afterwards it sets the +variable `python-indent-current-level' correctly so offset is +equal to (`nth' `python-indent-current-level' +`python-indent-levels')" (or - (and (or (and (eq this-command 'indent-for-tab-command) + (and (or (and (memq this-command python-indent-trigger-commands) (eq last-command this-command)) force-toggle) (not (equal python-indent-levels '(0))) ------------------------------------------------------------ revno: 111367 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Sat 2012-12-29 09:33:33 -0300 message: * progmodes/python.el (python-shell-send-region): Add blank lines for non sent code so backtraces remain correct. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-29 11:04:55 +0000 +++ lisp/ChangeLog 2012-12-29 12:33:33 +0000 @@ -1,5 +1,10 @@ 2012-12-29 Fabián Ezequiel Gallina + * progmodes/python.el (python-shell-send-region): Add blank lines + for non sent code so backtraces remain correct. + +2012-12-29 Fabián Ezequiel Gallina + * progmodes/python.el: Remove cl dependency. (python-syntax-count-quotes): Replace incf call. (python-fill-string): Replace setf call. === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-12-29 11:04:55 +0000 +++ lisp/progmodes/python.el 2012-12-29 12:33:33 +0000 @@ -2008,7 +2008,14 @@ (defun python-shell-send-region (start end) "Send the region delimited by START and END to inferior Python process." (interactive "r") - (python-shell-send-string (buffer-substring start end) nil t)) + (python-shell-send-string + (concat + (let ((line-num (line-number-at-pos start))) + ;; When sending a region, add blank lines for non sent code so + ;; backtraces remain correct. + (make-string (1- line-num) ?\n)) + (buffer-substring start end)) + nil t)) (defun python-shell-send-buffer (&optional arg) "Send the entire buffer to inferior Python process. ------------------------------------------------------------ revno: 111366 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Sat 2012-12-29 08:04:55 -0300 message: * progmodes/python.el: Remove cl dependency. (python-syntax-count-quotes): Replace incf call. (python-fill-string): Replace setf call. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-29 06:14:55 +0000 +++ lisp/ChangeLog 2012-12-29 11:04:55 +0000 @@ -1,3 +1,9 @@ +2012-12-29 Fabián Ezequiel Gallina + + * progmodes/python.el: Remove cl dependency. + (python-syntax-count-quotes): Replace incf call. + (python-fill-string): Replace setf call. + 2012-12-29 Damien Cassou * info.el (info-other-window): New arg, for consistency with info. === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-12-13 05:29:15 +0000 +++ lisp/progmodes/python.el 2012-12-29 11:04:55 +0000 @@ -204,7 +204,6 @@ (require 'ansi-color) (require 'comint) -(eval-when-compile (require 'cl-lib)) ;; Avoid compiler warnings (defvar view-return-to-alist) @@ -529,7 +528,7 @@ (while (and (< i 3) (or (not limit) (< (+ point i) limit)) (eq (char-after (+ point i)) quote-char)) - (cl-incf i)) + (setq i (1+ i))) i)) (defun python-syntax-stringify () @@ -2487,12 +2486,12 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." (let* ((marker (point-marker)) (str-start-pos - (let ((m (make-marker))) - (setf (marker-position m) - (or (python-syntax-context 'string) - (and (equal (string-to-syntax "|") - (syntax-after (point))) - (point)))) m)) + (set-marker + (make-marker) + (or (python-syntax-context 'string) + (and (equal (string-to-syntax "|") + (syntax-after (point))) + (point))))) (num-quotes (python-syntax-count-quotes (char-after str-start-pos) str-start-pos)) (str-end-pos ------------------------------------------------------------ revno: 111365 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-12-29 12:09:49 +0200 message: More cleanup in handling subprocess exiting on MS-Windows. src/w32proc.c (reader_thread): Avoid passing NULL handles to SetEvent and WaitForSingleObject. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-12-28 03:13:47 +0000 +++ src/ChangeLog 2012-12-29 10:09:49 +0000 @@ -1,3 +1,8 @@ +2012-12-29 Eli Zaretskii + + * w32proc.c (reader_thread): Avoid passing NULL handles to + SetEvent and WaitForSingleObject. + 2012-12-28 Paul Eggert Port EXTERNALLY_VISIBLE to Clang 3.2. === modified file 'src/w32proc.c' --- src/w32proc.c 2012-12-23 17:06:58 +0000 +++ src/w32proc.c 2012-12-29 10:09:49 +0000 @@ -970,6 +970,11 @@ else rc = _sys_read_ahead (cp->fd); + /* Don't bother waiting for the event if we already have been + told to exit by delete_child. */ + if (cp->status == STATUS_READ_ERROR || !cp->char_avail) + break; + /* The name char_avail is a misnomer - it really just means the read-ahead has completed, whether successfully or not. */ if (!SetEvent (cp->char_avail)) @@ -986,6 +991,11 @@ if (rc == STATUS_READ_FAILED) break; + /* Don't bother waiting for the acknowledge if we already have + been told to exit by delete_child. */ + if (cp->status == STATUS_READ_ERROR || !cp->char_consumed) + break; + /* Wait until our input is acknowledged before reading again */ if (WaitForSingleObject (cp->char_consumed, INFINITE) != WAIT_OBJECT_0) { @@ -993,6 +1003,8 @@ "%lu for fd %ld\n", GetLastError (), cp->fd)); break; } + /* delete_child sets status to STATUS_READ_ERROR when it wants + us to exit. */ if (cp->status == STATUS_READ_ERROR) break; } ------------------------------------------------------------ revno: 111364 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-12-29 14:14:55 +0800 message: Fix ChangeLog entry for last commit. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-29 06:14:00 +0000 +++ lisp/ChangeLog 2012-12-29 06:14:55 +0000 @@ -1,6 +1,6 @@ 2012-12-29 Damien Cassou - * info.el (info-other-window): + * info.el (info-other-window): New arg, for consistency with info. 2012-12-28 Martin Rudalics