commit 1a15d14e143ed84d8116c6510f9619d936ea43a1 (HEAD, refs/remotes/origin/master) Author: Reuben Thomas Date: Sat Dec 17 19:09:41 2016 +0000 Fix spelling mistake in private defun name (Bug#25218) lisp/textmodes/flyspell.el (flyspell-ajust-cursor-point): Rename to `flyspell-adjust-cursor-point'. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index c63508d134..bfe839ac77 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1949,7 +1949,7 @@ This command proposes various successive corrections for the current word." (funcall flyspell-insert-function word) (flyspell-word) (flyspell-display-next-corrections flyspell-auto-correct-ring)) - (flyspell-ajust-cursor-point pos (point) old-max) + (flyspell-adjust-cursor-point pos (point) old-max) (setq flyspell-auto-correct-pos (point))) ;; Fetch the word to be checked. (let ((word (flyspell-get-word))) @@ -2016,7 +2016,7 @@ This command proposes various successive corrections for the current word." (flyspell-word) (flyspell-display-next-corrections (cons new-word flyspell-auto-correct-ring)) - (flyspell-ajust-cursor-point pos + (flyspell-adjust-cursor-point pos (point) old-max)))))))))) (setq flyspell-auto-correct-pos (point)) @@ -2185,15 +2185,15 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." (funcall flyspell-insert-function new-word) (if flyspell-abbrev-p (flyspell-define-abbrev word new-word))) - (flyspell-ajust-cursor-point save cursor-location old-max))) + (flyspell-adjust-cursor-point save cursor-location old-max))) (t (goto-char save) nil))) ;;*---------------------------------------------------------------------*/ -;;* flyspell-ajust-cursor-point ... */ +;;* flyspell-adjust-cursor-point ... */ ;;*---------------------------------------------------------------------*/ -(defun flyspell-ajust-cursor-point (save cursor-location old-max) +(defun flyspell-adjust-cursor-point (save cursor-location old-max) (if (>= save cursor-location) (let ((new-pos (+ save (- (point-max) old-max)))) (goto-char (cond commit 63f827ab022e84e603bb5fff6f7d185d11950c40 Author: Reuben Thomas Date: Sat Dec 17 19:06:34 2016 +0000 Remove XEmacs support from flyspell.el (Bug#25218) lisp/textmodes/flyspell.el (flyspell-prog-mode, flyspell-mode-on): (flyspell-word, flyspell-delete-region-overlays): (flyspell-correct-word-before-point): Remove XEmacs support. (flyspell-xemacs-popup): Remove XEmacs-specific defun. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 29aa231252..c63508d134 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -447,12 +447,7 @@ like \"Some." ;;* The minor mode declaration. */ ;;*---------------------------------------------------------------------*/ (defvar flyspell-mouse-map - (let ((map (make-sparse-keymap))) - (if (featurep 'xemacs) - (define-key map [button2] #'flyspell-correct-word) - (define-key map [down-mouse-2] #'flyspell-correct-word) - (define-key map [mouse-2] 'undefined)) - map) + (make-sparse-keymap) "Keymap for Flyspell to put on erroneous words.") (defvar flyspell-mode-map @@ -652,9 +647,7 @@ in your init file. ;; the welcome message (if (and flyspell-issue-message-flag flyspell-issue-welcome-flag - (if (featurep 'xemacs) - (interactive-p) ;; XEmacs does not have (called-interactively-p) - (called-interactively-p 'interactive))) + (called-interactively-p 'interactive)) (let ((binding (where-is-internal 'flyspell-auto-correct-word nil 'non-ascii))) (message "%s" @@ -1179,9 +1172,7 @@ misspelling and skips redundant spell-checking step." (ispell-send-string (concat "^" word "\n")) ;; we mark the ispell process so it can be killed ;; when emacs is exited without query - (if (featurep 'xemacs) - (process-kill-without-query ispell-process) - (set-process-query-on-exit-flag ispell-process nil)) + (set-process-query-on-exit-flag ispell-process nil) ;; Wait until ispell has processed word. (while (progn (accept-process-output ispell-process) @@ -1716,15 +1707,7 @@ FLYSPELL-BUFFER." ;;*---------------------------------------------------------------------*/ (defun flyspell-delete-region-overlays (beg end) "Delete overlays used by flyspell in a given region." - (if (featurep 'emacs) - (remove-overlays beg end 'flyspell-overlay t) - ;; XEmacs does not have `remove-overlays' - (let ((l (overlays-in beg end))) - (while (consp l) - (progn - (if (flyspell-overlay-p (car l)) - (delete-overlay (car l))) - (setq l (cdr l))))))) + (remove-overlays beg end 'flyspell-overlay t)) (defun flyspell-delete-all-overlays () "Delete all the overlays used by flyspell." @@ -2156,10 +2139,7 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." ((null poss) ;; ispell error (error "Ispell: error in Ispell process")) - ((featurep 'xemacs) - (flyspell-xemacs-popup - poss word cursor-location start end opoint)) - (t + (t ;; The word is incorrect, we have to propose a replacement. (flyspell-do-correct (flyspell-emacs-popup event poss word) poss word cursor-location start end opoint))) @@ -2170,17 +2150,12 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." ;;*---------------------------------------------------------------------*/ (defun flyspell-do-correct (replace poss word cursor-location start end save) "The popup menu callback." - ;; Originally, the XEmacs code didn't do the (goto-char save) here and did - ;; it instead right after calling the function. (cond ((eq replace 'ignore) (goto-char save) nil) ((eq replace 'save) (goto-char save) (ispell-send-string (concat "*" word "\n")) - ;; This was added only to the XEmacs side in revision 1.18 of - ;; flyspell. I assume its absence on the Emacs side was an - ;; oversight. --Stef (ispell-send-string "#\n") (flyspell-unhighlight-at cursor-location) (setq ispell-pdict-modified-p '(t))) @@ -2197,8 +2172,6 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." (if (eq replace 'buffer) (ispell-add-per-file-word-list word))) (replace - ;; This was added only to the Emacs side. I assume its absence on - ;; the XEmacs side was an oversight. --Stef (flyspell-unhighlight-at cursor-location) (let ((old-max (point-max)) (new-word (if (atom replace) @@ -2212,8 +2185,6 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." (funcall flyspell-insert-function new-word) (if flyspell-abbrev-p (flyspell-define-abbrev word new-word))) - ;; In the original Emacs code, this was only called in the body - ;; of the if. I arbitrarily kept the XEmacs behavior instead. (flyspell-ajust-cursor-point save cursor-location old-max))) (t (goto-char save) @@ -2276,78 +2247,6 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." menu))))) ;;*---------------------------------------------------------------------*/ -;;* flyspell-xemacs-popup ... */ -;;*---------------------------------------------------------------------*/ -(defun flyspell-xemacs-popup (poss word cursor-location start end save) - "The XEmacs popup menu." - (let* ((corrects (flyspell-sort (car (cdr (cdr poss))) word)) - (cor-menu (if (consp corrects) - (mapcar (lambda (correct) - (vector correct - (list 'flyspell-do-correct - correct - (list 'quote poss) - word - cursor-location - start - end - save) - t)) - corrects) - '())) - (affix (car (cdr (cdr (cdr poss))))) - show-affix-info - (menu (let ((save (if (and (consp affix) show-affix-info) - (vector - (concat "Save affix: " (car affix)) - (list 'flyspell-do-correct - ''save - (list 'quote poss) - word - cursor-location - start - end - save) - t) - (vector - "Save word" - (list 'flyspell-do-correct - ''save - (list 'quote poss) - word - cursor-location - start - end - save) - t))) - (session (vector "Accept (session)" - (list 'flyspell-do-correct - ''session - (list 'quote poss) - word - cursor-location - start - end - save) - t)) - (buffer (vector "Accept (buffer)" - (list 'flyspell-do-correct - ''buffer - (list 'quote poss) - word - cursor-location - start - end - save) - t))) - (if (consp cor-menu) - (append cor-menu (list "-" save session buffer)) - (list save session buffer))))) - (popup-menu (cons (format "%s [%s]" word (or ispell-local-dictionary - ispell-dictionary)) - menu)))) - -;;*---------------------------------------------------------------------*/ ;;* Some example functions for real autocorrecting */ ;;*---------------------------------------------------------------------*/ (defun flyspell-maybe-correct-transposition (beg end poss) commit cfa2fb26263d741dca3c941febc0eb092a62b52e Author: Michael Albinus Date: Sat Dec 17 19:52:38 2016 +0100 More tests for Tramp * lisp/net/tramp.el (tramp-drop-volume-letter): Handle quoted file names. * lisp/net/tramp-sh.el (tramp-make-copy-program-file-name): Quote file name properly. * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name): Mark quoted file name as absolute. (Bug#25183) (tramp--test-windows-nt-and-batch) (tramp--test-windows-nt-and-pscp-psftp-p): New defuns. (tramp--test-windows-nt-or-smb-p): Rename from `tramp--test-smb-windows-nt-p'. Adapt callees. (tramp--test-check-files): Improve checks for environment variables. (tramp-test33-special-characters) (tramp-test33-special-characters-with-stat) (tramp-test33-special-characters-with-perl) (tramp-test33-special-characters-with-ls, tramp-test34-utf8) (tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl) (tramp-test34-utf8-with-ls): Add more checks for skip. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 31ef2efbf2..fbf44b77a1 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -5169,8 +5169,8 @@ Return ATTR." ((tramp-get-method-parameter vec 'tramp-remote-copy-program) localname) ((not (zerop (length user))) - (tramp-shell-quote-argument (format "%s@%s:%s" user host localname))) - (t (tramp-shell-quote-argument (format "%s:%s" host localname)))))) + (format "%s@%s:%s" user host (shell-quote-argument localname))) + (t (format "%s:%s" host (shell-quote-argument localname)))))) (defun tramp-method-out-of-band-p (vec size) "Return t if this is an out-of-band method, nil otherwise." diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 7987029dc4..da745524a1 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1691,9 +1691,13 @@ locally on a remote file name. When the local system is a W32 system but the remote system is Unix, this introduces a superfluous drive letter into the file name. This function removes it." (save-match-data - (if (string-match "\\`[a-zA-Z]:/" name) - (replace-match "/" nil t name) - name))) + (funcall + (if (tramp-compat-file-name-quoted-p name) + 'tramp-compat-file-name-quote 'identity) + (let ((name (tramp-compat-file-name-unquote name))) + (if (string-match "\\`[a-zA-Z]:/" name) + (replace-match "/" nil t name) + name))))) ;;; Config Manipulation Functions: diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 893dc543f3..ee8a95e7bd 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -682,8 +682,8 @@ handled properly. BODY shall not contain a timeout." (expand-file-name "/method:host:/:/path/../file") "/method:host:/:/file")) (should (string-equal - (expand-file-name "/method:host:/:~/path/./file") - "/method:host:/:~/path/file"))) + (expand-file-name "/method:host:/:/~/path/./file") + "/method:host:/:/~/path/file"))) (ert-deftest tramp-test06-directory-file-name () "Check `directory-file-name'. @@ -2120,6 +2120,14 @@ This does not support globbing characters in file names (yet)." This requires restrictions of file name syntax." (tramp-gvfs-file-name-p tramp-test-temporary-file-directory)) +(defun tramp--test-hpux-p () + "Check, whether the remote host runs HP-UX. +Several special characters do not work properly there." + ;; We must refill the cache. `file-truename' does it. + (with-parsed-tramp-file-name + (file-truename tramp-test-temporary-file-directory) nil + (string-match "^HP-UX" (tramp-get-connection-property v "uname" "")))) + (defun tramp--test-rsync-p () "Check, whether the rsync method is used. This does not support special file names." @@ -2132,23 +2140,28 @@ This does not support special file names." (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory) 'tramp-sh-file-name-handler)) -(defun tramp--test-smb-or-windows-nt-p () +(defun tramp--test-windows-nt-and-batch () + "Check, whether the locale host runs MS Windows in batch mode. +This does not support scpecial characters." + (and (eq system-type 'windows-nt) noninteractive)) + +(defun tramp--test-windows-nt-and-pscp-psftp-p () + "Check, whether the locale host runs MS Windows, and ps{cp,ftp} is used. +This does not support utf8 based file transfer." + (and (eq system-type 'windows-nt) + (string-match + (regexp-opt '("pscp" "psftp")) + (file-remote-p tramp-test-temporary-file-directory 'method)))) + +(defun tramp--test-windows-nt-or-smb-p () "Check, whether the locale or remote host runs MS Windows. This requires restrictions of file name syntax." (or (eq system-type 'windows-nt) (tramp-smb-file-name-p tramp-test-temporary-file-directory))) -(defun tramp--test-hpux-p () - "Check, whether the remote host runs HP-UX. -Several special characters do not work properly there." - ;; We must refill the cache. `file-truename' does it. - (with-parsed-tramp-file-name - (file-truename tramp-test-temporary-file-directory) nil - (string-match "^HP-UX" (tramp-get-connection-property v "uname" "")))) - (defun tramp--test-check-files (&rest files) "Run a simple but comprehensive test over every file in FILES." - (dolist (quoted '(if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) ;; We must use `file-truename' for the temporary directory, ;; because it could be located on a symlinked directory. This ;; would let the test fail. @@ -2156,11 +2169,25 @@ Several special characters do not work properly there." (file-truename tramp-test-temporary-file-directory)) (tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name 'local quoted)) - (files (delq nil files))) + (files (delq nil files)) + (process-environment process-environment)) (unwind-protect (progn + ;; Add environment variables. + (dolist (elt files) + ;; The check command (heredoc file) does not support + ;; environment variables with leading spaces. + (let* ((elt (replace-regexp-in-string "^\\s-+" "" elt)) + (envvar (concat "VAR_" (upcase (md5 elt))))) + (setenv envvar elt))) + + ;; We force a reconnect, in order to have a clean environment. + (tramp-cleanup-connection + (tramp-dissect-file-name tramp-test-temporary-file-directory) + 'keep-debug 'keep-password) (make-directory tmp-name1) (make-directory tmp-name2) + (dolist (elt files) (let* ((file1 (expand-file-name elt tmp-name1)) (file2 (expand-file-name elt tmp-name2)) @@ -2287,30 +2314,30 @@ Several special characters do not work properly there." ;; Check, that environment variables are set correctly. (when (and tramp--test-expensive-test (tramp--test-sh-p)) - (dolist (elt files) - ;; Tramp does not support environment variables with - ;; leading or trailing spaces. It also does not - ;; support the tab character. - (setq elt (replace-regexp-in-string "\t" " " elt) - elt (replace-regexp-in-string "^\\s-+\\|\\s-+$" "" elt)) - (let* ((default-directory tramp-test-temporary-file-directory) - (shell-file-name "/bin/sh") - (envvar - (concat "VAR_" (upcase (md5 (current-time-string))))) - (tramp-remote-process-environment - (cons - (format "%s=%s" envvar elt) - tramp-remote-process-environment))) - ;; We force a reconnect, in order to have a clean - ;; environment. - (tramp-cleanup-connection - (tramp-dissect-file-name tramp-test-temporary-file-directory) - 'keep-debug 'keep-password) - (should - (string-equal - elt + (dolist (elt process-environment) + (when (string-match "^VAR_" elt) + (let* ((default-directory tramp-test-temporary-file-directory) + (shell-file-name "/bin/sh") + (heredoc (md5 (current-time-string))) + (envvar (car (split-string elt "=" t))) + (file1 (tramp-compat-file-name-unquote + (expand-file-name "bar" tmp-name1)))) + ;; Cleanup. + (ignore-errors (delete-file file1)) + ;; Save the variable in a file. The echo command + ;; does not work properly, it suppresses leading/ + ;; trailing spaces as well as tabs. (shell-command-to-string - (format "echo -n $%s" envvar)))))))) + (format + "cat <<%s >%s\n$%s\n%s" + heredoc (file-remote-p file1 'localname) envvar heredoc)) + (with-temp-buffer + (insert-file-contents file1) + (should + (string-equal + (buffer-string) (concat (getenv envvar) "\n")))) + (delete-file file1) + (should-not (file-exists-p file1))))))) ;; Cleanup. (ignore-errors (delete-directory tmp-name1 'recursive)) @@ -2324,7 +2351,7 @@ Several special characters do not work properly there." ;; interpreted as a path separator, preventing "\t" from being ;; expanded to . (tramp--test-check-files - (if (or (tramp--test-gvfs-p) (tramp--test-smb-or-windows-nt-p)) + (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) "foo bar baz" (if (or (tramp--test-adb-p) (tramp--test-docker-p) @@ -2337,23 +2364,23 @@ Several special characters do not work properly there." "&foo&bar&baz&" (unless (or (tramp--test-ftp-p) (tramp--test-gvfs-p) - (tramp--test-smb-or-windows-nt-p)) + (tramp--test-windows-nt-or-smb-p)) "?foo?bar?baz?") (unless (or (tramp--test-ftp-p) (tramp--test-gvfs-p) - (tramp--test-smb-or-windows-nt-p)) + (tramp--test-windows-nt-or-smb-p)) "*foo*bar*baz*") - (if (or (tramp--test-gvfs-p) (tramp--test-smb-or-windows-nt-p)) + (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) "'foo'bar'baz'" "'foo\"bar'baz\"") "#foo~bar#baz~" - (if (or (tramp--test-gvfs-p) (tramp--test-smb-or-windows-nt-p)) + (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) "!foo!bar!baz!" "!foo|bar!baz|") - (if (or (tramp--test-gvfs-p) (tramp--test-smb-or-windows-nt-p)) + (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) ";foo;bar;baz;" ":foo;bar:baz;") - (unless (or (tramp--test-gvfs-p) (tramp--test-smb-or-windows-nt-p)) + (unless (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) "bar") "(foo)bar(baz)" (unless (or (tramp--test-ftp-p) (tramp--test-gvfs-p)) "[foo]bar[baz]") @@ -2364,6 +2391,7 @@ Several special characters do not work properly there." "Check special characters in file names." (skip-unless (tramp--test-enabled)) (skip-unless (not (tramp--test-rsync-p))) + (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p))) (tramp--test-special-characters)) @@ -2372,7 +2400,9 @@ Several special characters do not work properly there." Use the `stat' command." :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) - (skip-unless (and (tramp--test-sh-p) (not (tramp--test-rsync-p)))) + (skip-unless (tramp--test-sh-p)) + (skip-unless (not (tramp--test-rsync-p))) + (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p))) (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil (skip-unless (tramp-get-remote-stat v))) @@ -2388,7 +2418,9 @@ Use the `stat' command." Use the `perl' command." :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) - (skip-unless (and (tramp--test-sh-p) (not (tramp--test-rsync-p)))) + (skip-unless (tramp--test-sh-p)) + (skip-unless (not (tramp--test-rsync-p))) + (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p))) (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil (skip-unless (tramp-get-remote-perl v))) @@ -2407,7 +2439,10 @@ Use the `perl' command." Use the `ls' command." :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) - (skip-unless (and (tramp--test-sh-p) (not (tramp--test-rsync-p)))) + (skip-unless (tramp--test-sh-p)) + (skip-unless (not (tramp--test-rsync-p))) + (skip-unless (not (tramp--test-windows-nt-and-batch))) + (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p))) (let ((tramp-connection-properties (append @@ -2441,6 +2476,8 @@ Use the `ls' command." (skip-unless (tramp--test-enabled)) (skip-unless (not (tramp--test-docker-p))) (skip-unless (not (tramp--test-rsync-p))) + (skip-unless (not (tramp--test-windows-nt-and-batch))) + (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p))) (tramp--test-utf8)) @@ -2449,8 +2486,11 @@ Use the `ls' command." Use the `stat' command." :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) + (skip-unless (tramp--test-sh-p)) (skip-unless (not (tramp--test-docker-p))) - (skip-unless (and (tramp--test-sh-p) (not (tramp--test-rsync-p)))) + (skip-unless (not (tramp--test-rsync-p))) + (skip-unless (not (tramp--test-windows-nt-and-batch))) + (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p))) (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil (skip-unless (tramp-get-remote-stat v))) @@ -2466,8 +2506,11 @@ Use the `stat' command." Use the `perl' command." :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) + (skip-unless (tramp--test-sh-p)) (skip-unless (not (tramp--test-docker-p))) - (skip-unless (and (tramp--test-sh-p) (not (tramp--test-rsync-p)))) + (skip-unless (not (tramp--test-rsync-p))) + (skip-unless (not (tramp--test-windows-nt-and-batch))) + (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p))) (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil (skip-unless (tramp-get-remote-perl v))) @@ -2486,8 +2529,11 @@ Use the `perl' command." Use the `ls' command." :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) + (skip-unless (tramp--test-sh-p)) (skip-unless (not (tramp--test-docker-p))) - (skip-unless (and (tramp--test-sh-p) (not (tramp--test-rsync-p)))) + (skip-unless (not (tramp--test-rsync-p))) + (skip-unless (not (tramp--test-windows-nt-and-batch))) + (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p))) (let ((tramp-connection-properties (append commit 0390edcb81f748d00d54d37fc4e6233a70dbda50 Author: Eli Zaretskii Date: Sat Dec 17 19:38:36 2016 +0200 Fix comments * src/thread.h (struct thread_state): Fix comments. * src/process.c (wait_reading_process_output): Fix a typo in commentary. diff --git a/src/process.c b/src/process.c index 31c9d74a3f..9139a36d4f 100644 --- a/src/process.c +++ b/src/process.c @@ -4937,8 +4937,8 @@ wait_reading_process_output_1 (void) READ_KBD is: 0 to ignore keyboard input, or 1 to return when input is available, or - -1 meaning caller will actually read the input, so don't throw to - the quit handler, or + -1 meaning caller will actually read the input, so don't throw to + the quit handler DO_DISPLAY means redisplay should be done to show subprocess output that arrives. diff --git a/src/thread.h b/src/thread.h index 739069a630..e6084b13c2 100644 --- a/src/thread.h +++ b/src/thread.h @@ -78,7 +78,7 @@ struct thread_state /* Chain of condition handlers currently in effect. The elements of this chain are contained in the stack frames of Fcondition_case and internal_condition_case. - When an error is signaled (by calling Fsignal, below), + When an error is signaled (by calling Fsignal), this chain is searched for an element that applies. */ struct handler *m_handlerlist; #define handlerlist (current_thread->m_handlerlist) @@ -143,7 +143,7 @@ struct thread_state Lisp_Object m_re_match_object; #define re_match_object (current_thread->m_re_match_object) - /* This variable is different from waiting_for_input in keyboard.c. + /* This member is different from waiting_for_input. It is used to communicate to a lisp process-filter/sentinel (via the function Fwaiting_for_user_input_p) whether Emacs was waiting for user-input when that process-filter was called. commit 0757b4f2f73daa67e5c5217964b423c6a0239e95 Author: Eli Zaretskii Date: Sat Dec 17 13:08:52 2016 +0200 Fix crashes on MS-Windows during dumping * src/unexw32.c (get_section_info): Make extra_bss_size be the maximum of extra_bss_size and extra_bss_size_static. This avoids computing the size of the output file smaller than it actually needs to be, which then causes copy_executable_and_dump_data to write beyond the requested size of the file mapping, thus relying on the OS roundup to page boundary to save us from ourselves. See http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00642.html for the details. * lib/stdio-impl.h: Revert the workaround fix of not including errno.h for MinGW. diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 1972a33ab1..766d693659 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h @@ -26,9 +26,7 @@ # include #endif -#ifndef __MINGW32__ #include /* For detecting Plan9. */ -#endif #if defined __sferror || defined __DragonFly__ || defined __ANDROID__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ diff --git a/src/unexw32.c b/src/unexw32.c index f4183dc976..54224858a8 100644 --- a/src/unexw32.c +++ b/src/unexw32.c @@ -465,6 +465,7 @@ get_section_info (file_data *p_infile) bss_start = min (bss_start, bss_start_static); bss_size = max (my_endbss, my_endbss_static) - bss_start; bss_section_static = 0; + extra_bss_size = max (extra_bss_size, extra_bss_size_static); extra_bss_size_static = 0; } }