commit 51d475a8d8a07e0edec92addd4bf96eb1be23b48 (HEAD, refs/remotes/origin/master) Author: Jan Djärv Date: Fri Feb 20 08:46:38 2015 +0100 Avoid endless loop when handling fatal signal. * src/emacs.c (terminate_due_to_signal): Move totally_unblock_input after setting fatal_error_in_progress, so gobble_input and *read_socket are not read if there are pending_signals. diff --git a/src/ChangeLog b/src/ChangeLog index 1126dde..dc33e41 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2015-02-20 Jan Djärv + + * emacs.c (terminate_due_to_signal): Move totally_unblock_input after + setting fatal_error_in_progress, so gobble_input and *read_socket are + not read if there are pending_signals. + 2015-02-20 Paul Eggert Simplify binary I/O configuration diff --git a/src/emacs.c b/src/emacs.c index f933eb1..5905799 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -345,13 +345,13 @@ _Noreturn void terminate_due_to_signal (int sig, int backtrace_limit) { signal (sig, SIG_DFL); - totally_unblock_input (); /* If fatal error occurs in code below, avoid infinite recursion. */ if (! fatal_error_in_progress) { fatal_error_in_progress = 1; + totally_unblock_input (); if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT) Fkill_emacs (make_number (sig)); commit 98cb7d9e4d7ff3e9cb8aad229e30dbd0a7963a8f Author: Glenn Morris Date: Thu Feb 19 22:24:34 2015 -0800 solar.el: Tweak sunrise-sunset output * lisp/calendar/solar.el (solar-sunrise-sunset-string): Shorten message a bit. (sunrise-sunset): Use message rather than a window. Fixes: debbugs:19859 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b043198..dc62555 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2015-02-20 Glenn Morris + * calendar/solar.el (solar-sunrise-sunset-string): + Shorten message a little. + (sunrise-sunset): Use message rather than a window. (Bug#19859) + * progmodes/f90.el (f90-keywords-re, f90-procedures-re) (f90-font-lock-keywords-2): Some F2008 additions. diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index 46cd8d3..25a24ee 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -657,7 +657,7 @@ Corresponding value is nil if there is no sunrise/sunset." Optional NOLOCATION non-nil means do not print the location." (let ((l (solar-sunrise-sunset date))) (format - "%s, %s%s (%s hours daylight)" + "%s, %s%s (%s hrs daylight)" (if (car l) (concat "Sunrise " (apply 'solar-time-string (car l))) "No sunrise") @@ -847,20 +847,12 @@ This function is suitable for execution in an init file." (date (if (< arg 4) (calendar-current-date) (calendar-read-date))) (date-string (calendar-date-string date t)) (time-string (solar-sunrise-sunset-string date)) - (msg (format "%s: %s" date-string time-string)) - (one-window (one-window-p t))) - (if (<= (length msg) (frame-width)) - (message "%s" msg) - (with-output-to-temp-buffer "*temp*" - (princ (concat date-string "\n" time-string))) - (message "%s" - (substitute-command-keys - (if one-window - (if pop-up-windows - "Type \\[delete-other-windows] to remove temp window." - "Type \\[switch-to-buffer] RET to remove temp window.") - "Type \\[switch-to-buffer-other-window] RET to restore old \ -contents of temp window.")))))) + (msg (format "%s%s" + (if (< arg 4) "" ; don't print date if it's today's + (format "%s: " date-string)) + time-string))) + (message "%s" msg) + msg)) ;;;###cal-autoload (defun calendar-sunrise-sunset (&optional event) commit 4fa6da01eb7883976313de119cd3c268ca639778 Author: Glenn Morris Date: Thu Feb 19 21:28:12 2015 -0800 f90.el: Add some F2008 keywords * lisp/progmodes/f90.el (f90-keywords-re, f90-procedures-re) (f90-font-lock-keywords-2): Some F2008 additions. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3d15b40..b043198 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-02-20 Glenn Morris + + * progmodes/f90.el (f90-keywords-re, f90-procedures-re) + (f90-font-lock-keywords-2): Some F2008 additions. + 2015-02-19 Dima Kogan * autorevert.el (auto-revert-buffers-counter) diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index aeb4dde..b923819e 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -342,8 +342,10 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil." "final" "generic" "import" "non_intrinsic" "non_overridable" "nopass" "pass" "protected" "same_type_as" "value" "volatile" ;; F2008. + ;; FIXME f90-change-keywords does not work right if + ;; there are spaces. "contiguous" "submodule" "concurrent" "codimension" - "sync all" "sync memory" "critical" "image_index" + "sync all" "sync memory" "critical" "image_index" "error stop" )) "\\_>") "Regexp used by the function `f90-change-keywords'.") @@ -417,6 +419,8 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil." "norm2" "parity" "findloc" "is_contiguous" "sync images" "lock" "unlock" "image_index" "lcobound" "ucobound" "num_images" "this_image" + "acosh" "asinh" "atanh" + "atomic_define" "atomic_ref" "execute_command_line" ;; F2008 iso_fortran_env module. "compiler_options" "compiler_version" ;; F2008 iso_c_binding module. @@ -649,7 +653,8 @@ logical\\|double[ \t]*precision\\|type[ \t]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ \t (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) "\\_" '("\\(&\\)[ \t]*\\(!\\|$\\)" (1 font-lock-keyword-face)) - "\\_<\\(then\\|continue\\|format\\|include\\|stop\\|return\\)\\_>" + "\\_<\\(then\\|continue\\|format\\|include\\|\\(?:error[ \t]+\\)?stop\\|\ +return\\)\\_>" '("\\_<\\(exit\\|cycle\\)[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>" (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) '("\\_<\\(case\\)[ \t]*\\(default\\|(\\)" . 1) @@ -2338,6 +2343,8 @@ CHANGE-WORD should be one of 'upcase-word, 'downcase-word, 'capitalize-word." (skip-chars-forward " \t0-9") (looking-at "#")))) (setq ref-point (point) + ;; FIXME this does not work for constructs with + ;; embedded space, eg "sync all". back-point (save-excursion (backward-word 1) (point)) saveword (buffer-substring back-point ref-point)) (funcall change-word -1) commit 3bbf5170722d9e555307259763623c74240a2555 Author: Paul Eggert Date: Thu Feb 19 19:20:35 2015 -0800 Simplify binary I/O configuration * lib-src/etags.c: Include rather than . (process_file_name, analyze_regex): Use FOPEN_BINARY rather than hard-coded "b". * src/lread.c (Fload): Prefer FOPEN_TEXT and FOPEN_BINARY to #ifdef DOS_NT. * src/sysstdio.h: Add copyright notice. Include . (FOPEN_BINARY, FOPEN_TEXT): New macros. * src/xfaces.c (Fx_load_color_file): Use FOPEN_TEXT, since POSIX doesn't guarantee that "t" will work. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 0551116..4ac9638 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,10 @@ +2015-02-20 Paul Eggert + + Simplify binary I/O configuration + * etags.c: Include rather than . + (process_file_name, analyze_regex): Use FOPEN_BINARY rather than + hard-coded "b". + 2015-02-19 Eli Zaretskii * etags.c (process_file_name) [!DOS_NT]: Use "r", not "rb" in the diff --git a/lib-src/etags.c b/lib-src/etags.c index cdac928..7f18755 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -122,7 +122,7 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; #include #include #include -#include +#include #include #include #include @@ -1532,18 +1532,11 @@ process_file_name (char *file, language *lang) if (real_name == compressed_name) { char *cmd = concat (compr->command, " ", real_name); - - /* Unix implementations of 'popen' generally don't support "rb", whereas - DOS_NT needs it. */ -#ifdef DOS_NT - inf = popen (cmd, "rb"); -#else - inf = popen (cmd, "r"); -#endif + inf = popen (cmd, "r" FOPEN_BINARY); free (cmd); } else - inf = fopen (real_name, "rb"); + inf = fopen (real_name, "r" FOPEN_BINARY); if (inf == NULL) { perror (real_name); @@ -5607,7 +5600,7 @@ analyze_regex (char *regex_arg) char *regexfile = regex_arg + 1; /* regexfile is a file containing regexps, one per line. */ - regexfp = fopen (regexfile, "rb"); + regexfp = fopen (regexfile, "r" FOPEN_BINARY); if (regexfp == NULL) pfatal (regexfile); linebuffer_init (®exbuf); diff --git a/src/ChangeLog b/src/ChangeLog index 38af1d8..1126dde 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2015-02-20 Paul Eggert + + Simplify binary I/O configuration + * lread.c (Fload): Prefer FOPEN_TEXT and FOPEN_BINARY to #ifdef DOS_NT. + * sysstdio.h: Add copyright notice. Include . + (FOPEN_BINARY, FOPEN_TEXT): New macros. + * xfaces.c (Fx_load_color_file): Use FOPEN_TEXT, since POSIX + doesn't guarantee that "t" will work. + 2015-02-19 Eli Zaretskii * keyboard.c (read_char): Make sure this_single_command_key_start diff --git a/src/lread.c b/src/lread.c index b42849f..ae17529 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1033,13 +1033,9 @@ Return t if the file exists and loads successfully. */) bool compiled = 0; Lisp_Object handler; bool safe_p = 1; - const char *fmode = "r"; + const char *fmode = "r" FOPEN_TEXT; int version; -#ifdef DOS_NT - fmode = "rt"; -#endif /* DOS_NT */ - CHECK_STRING (file); /* If file name is magic, call the handler. */ @@ -1223,10 +1219,7 @@ Return t if the file exists and loads successfully. */) compiled = 1; efound = ENCODE_FILE (found); - -#ifdef DOS_NT - fmode = "rb"; -#endif /* DOS_NT */ + fmode = "r" FOPEN_BINARY; /* openp already checked for newness, no point doing it again. FIXME would be nice to get a message when openp diff --git a/src/sysstdio.h b/src/sysstdio.h index e9dfb69..c97c4f8 100644 --- a/src/sysstdio.h +++ b/src/sysstdio.h @@ -1,2 +1,31 @@ +/* Standard I/O for Emacs. + +Copyright 2013-2015 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . */ + +#include #include + extern FILE *emacs_fopen (char const *, char const *); + +#if O_BINARY +# define FOPEN_BINARY "b" +# define FOPEN_TEXT "t" +#else +# define FOPEN_BINARY "" +# define FOPEN_TEXT "" +#endif diff --git a/src/xfaces.c b/src/xfaces.c index d0fe872..fcfdbc0 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6187,7 +6187,7 @@ where R,G,B are numbers between 0 and 255 and name is an arbitrary string. */) abspath = Fexpand_file_name (filename, Qnil); block_input (); - fp = emacs_fopen (SSDATA (abspath), "rt"); + fp = emacs_fopen (SSDATA (abspath), "r" FOPEN_TEXT); if (fp) { char buf[512]; commit 12ab9571935d79c69ffab0fb1ea3f6e20f475860 Author: Dima Kogan Date: Thu Feb 19 21:36:03 2015 +0100 auto-revert-mode can now revert immediately in response to a change event Fixes: debbugs:18958 * autorevert.el (auto-revert-buffers-counter) (auto-revert-buffers-counter-lockedout): New variables. (auto-revert-buffers): Increase `auto-revert-buffers-counter'. (auto-revert-notify-handler): Apply `auto-revert-handler' if not suppressed by lockout. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cdcb340..3d15b40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2015-02-19 Dima Kogan + + * autorevert.el (auto-revert-buffers-counter) + (auto-revert-buffers-counter-lockedout): New variables. + (auto-revert-buffers): Increase `auto-revert-buffers-counter'. + (auto-revert-notify-handler): Apply `auto-revert-handler' if not + suppressed by lockout. (Bug#18958) + 2015-02-19 Stefan Monnier * emacs-lisp/eieio-opt.el (eieio-help-class): `eieio-class-parents' @@ -29,7 +37,7 @@ * files.el (find-alternate-file, abort-if-file-too-large, write-file) (set-visited-file-name): * emacs-lisp/lisp.el (kill-backward-up-list): - Use user-error instead of error. (Bug#14480) + Use user-error instead of error. (Bug#14480) 2015-02-18 Stefan Monnier @@ -45,12 +53,12 @@ * emacs-lisp/easy-mmode.el (define-minor-mode): Process macro arguments correctly. (Bug#19685) (define-minor-mode): Clarify docstring. - Clarify mode switch messages for minor modes. (Bug#19690) + Clarify mode switch messages for minor modes. (Bug#19690) 2015-02-16 Kelly Dean * emacs-lisp/package-x.el (package-upload-buffer-internal): - Create valid tar files. (Bug#19536) + Create valid tar files. (Bug#19536) 2015-02-16 Kelly Dean @@ -60,7 +68,7 @@ 2015-02-16 Kelly Dean * help-mode.el (help-do-xref): Prevent duplicated display of Info - buffer, and prevent interference with existing buffer. (Bug#13190) + buffer, and prevent interference with existing buffer. (Bug#13190) 2015-02-16 Fabián Ezequiel Gallina diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 8c8c617..02cef24 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -531,6 +531,30 @@ will use an up-to-date value of `auto-revert-interval'" ;; Fallback to file checks. (set (make-local-variable 'auto-revert-use-notify) nil)))) +;; If we have file notifications, we want to update the auto-revert buffers +;; immediately when a notification occurs. Since file updates can happen very +;; often, we want to skip some revert operations so that we don't spend all our +;; time reverting the buffer. +;; +;; We do this by reverting immediately in response to the first in a flurry of +;; notifications. We suppress subsequent notifications until the next time +;; `auto-revert-buffers' is called (this happens on a timer with a period set by +;; `auto-revert-interval'). +(defvar auto-revert-buffers-counter 1 + "Incremented each time `auto-revert-buffers' is called") +(defvar-local auto-revert-buffers-counter-lockedout 0 + "Buffer-local value to indicate whether we should immediately +update the buffer on a notification event or not. If + + (= auto-revert-buffers-counter-lockedout + auto-revert-buffers-counter) + +then the updates are locked out, and we wait until the next call +of `auto-revert-buffers' to revert the buffer. If no lockout is +present, then we revert immediately and set the lockout, so that +no more reverts are possible until the next call of +`auto-revert-buffers'") + (defun auto-revert-notify-handler (event) "Handle an EVENT returned from file notification." (with-demoted-errors @@ -566,6 +590,14 @@ will use an up-to-date value of `auto-revert-interval'" (file-name-nondirectory buffer-file-name))))) ;; Mark buffer modified. (setq auto-revert-notify-modified-p t) + + ;; Revert the buffer now if we're not locked out + (when (/= auto-revert-buffers-counter-lockedout + auto-revert-buffers-counter) + (auto-revert-handler) + (setq auto-revert-buffers-counter-lockedout + auto-revert-buffers-counter)) + ;; No need to check other buffers. (cl-return))))))))) @@ -686,6 +718,10 @@ are checked first the next time this function is called. This function is also responsible for removing buffers no longer in Auto-Revert mode from `auto-revert-buffer-list', and for canceling the timer when no buffers need to be checked." + + (setq auto-revert-buffers-counter + (1+ auto-revert-buffers-counter)) + (save-match-data (let ((bufs (if global-auto-revert-mode (buffer-list) commit d4ed798d2598a914b1313e58acaff5b66c487318 Author: Stefan Monnier Date: Thu Feb 19 13:22:21 2015 -0500 * lisp/emacs-lisp/eieio-opt.el (eieio-help-class): Fix bug#19891 Fixes: debbugs:19891 * lisp/emacs-lisp/eieio-opt.el (eieio-help-class): `eieio-class-parents' returns classes, not class names. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bf6ea90..cdcb340 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2015-02-19 Stefan Monnier + * emacs-lisp/eieio-opt.el (eieio-help-class): `eieio-class-parents' + returns classes, not class names (bug#19891). + * emacs-lisp/cl-macs.el (cl-struct-slot-value): Handle a nil type. * emacs-lisp/smie.el (smie-prec2->grammar): Fix corner case problem. diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index 304ee36..a769ca7 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -99,6 +99,7 @@ If CLASS is actually an object, then also display current values of that object. (when pl (insert " Inherits from ") (while (setq cur (pop pl)) + (setq cur (eieio--class-symbol cur)) (insert "`") (help-insert-xref-button (symbol-name cur) 'help-function cur) commit 235c3cb105c3bac49e44296c8066cf7f1c585472 Author: Stefan Monnier Date: Thu Feb 19 13:14:51 2015 -0500 * lisp/emacs-lisp/cl-macs.el (cl-struct-slot-value): Handle a nil type. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 933e5bb..bf6ea90 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2015-02-19 Stefan Monnier + * emacs-lisp/cl-macs.el (cl-struct-slot-value): Handle a nil type. + * emacs-lisp/smie.el (smie-prec2->grammar): Fix corner case problem. 2015-02-18 Kelly Dean diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index caaf768..c5f49b0 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2978,9 +2978,9 @@ STRUCT and SLOT-NAME are symbols. INST is a structure instance." ;; We could use `elt', but since the byte compiler will resolve the ;; branch below at compile time, it's more efficient to use the ;; type-specific accessor. - (if (eq (cl-struct-sequence-type ,struct-type) 'vector) - (aref ,inst (cl-struct-slot-offset ,struct-type ,slot-name)) - (nth (cl-struct-slot-offset ,struct-type ,slot-name) ,inst)))))) + (if (eq (cl-struct-sequence-type ,struct-type) 'list) + (nth (cl-struct-slot-offset ,struct-type ,slot-name) ,inst) + (aref ,inst (cl-struct-slot-offset ,struct-type ,slot-name))))))) (run-hooks 'cl-macs-load-hook) commit a2f904981d10d68bd84b6c7233a79094f052fa8a Author: Eli Zaretskii Date: Thu Feb 19 18:48:39 2015 +0200 Avoid aborts when input-method-function changes this-command-keys (Bug#19774) src/keyboard.c (read_char): Make sure this_single_command_key_start is in sync with this_command_key_count, around the call to input-method-function. diff --git a/src/ChangeLog b/src/ChangeLog index 8713353..38af1d8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2015-02-19 Eli Zaretskii + + * keyboard.c (read_char): Make sure this_single_command_key_start + is in sync with this_command_key_count, around the call to + input-method-function. (Bug#19774) + 2015-02-19 Fujii Hironori (tiny change) * w32fns.c (w32_wnd_proc) : Pass the diff --git a/src/keyboard.c b/src/keyboard.c index 4f6a441..ab57553 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3034,6 +3034,7 @@ read_char (int commandflag, Lisp_Object map, Lisp_Object keys; ptrdiff_t key_count; bool key_count_reset; + ptrdiff_t command_key_start; struct gcpro gcpro1; ptrdiff_t count = SPECPDL_INDEX (); @@ -3057,6 +3058,7 @@ read_char (int commandflag, Lisp_Object map, /* Save the this_command_keys status. */ key_count = this_command_key_count; key_count_reset = this_command_key_count_reset; + command_key_start = this_single_command_key_start; if (key_count > 0) keys = Fcopy_sequence (this_command_keys); @@ -3067,6 +3069,7 @@ read_char (int commandflag, Lisp_Object map, /* Clear out this_command_keys. */ this_command_key_count = 0; this_command_key_count_reset = 0; + this_single_command_key_start = 0; /* Now wipe the echo area. */ if (!NILP (echo_area_buffer[0])) @@ -3090,6 +3093,7 @@ read_char (int commandflag, Lisp_Object map, and this_command_keys state. */ this_command_key_count = key_count; this_command_key_count_reset = key_count_reset; + this_single_command_key_start = command_key_start; if (key_count > 0) this_command_keys = keys; commit d10c3edaf21ebbc424d452f3f0ca5c1e51487201 Author: Eli Zaretskii Date: Thu Feb 19 18:13:31 2015 +0200 Fix generation of TAGS from compressed files (Bug#19735) lib-src/etags.c (process_file_name) [!DOS_NT]: Use "r", not "rb" in the call to 'popen'. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 534d253..0551116 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2015-02-19 Eli Zaretskii + + * etags.c (process_file_name) [!DOS_NT]: Use "r", not "rb" in the + call to 'popen'. (Bug#19735) + 2015-02-13 Paul Eggert Better support for future plugins diff --git a/lib-src/etags.c b/lib-src/etags.c index dc2ced5..cdac928 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -1532,7 +1532,14 @@ process_file_name (char *file, language *lang) if (real_name == compressed_name) { char *cmd = concat (compr->command, " ", real_name); + + /* Unix implementations of 'popen' generally don't support "rb", whereas + DOS_NT needs it. */ +#ifdef DOS_NT inf = popen (cmd, "rb"); +#else + inf = popen (cmd, "r"); +#endif free (cmd); } else commit 37e3549055fc153657f0a04b28cf29b7e15a97d8 Author: Fujii Hironori Date: Thu Feb 19 13:40:48 2015 +0200 Fix display of IME window on MS-Windows (Bug#11732) src/w32fns.c (w32_wnd_proc) : Pass the message to DefWindowProc, after positioning the IME window, to trigger its display. Copyright-paperwork-exempt: yes diff --git a/src/ChangeLog b/src/ChangeLog index 1c4758f..8713353 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2015-02-19 Fujii Hironori (tiny change) + + * w32fns.c (w32_wnd_proc) : Pass the + message to DefWindowProc, after positioning the IME window, to + trigger its display. (Bug#11732) + 2015-02-18 Eli Zaretskii * emacs.c (Fkill_emacs): Exit with specified exit code even if diff --git a/src/w32fns.c b/src/w32fns.c index 08000d8..1e685ad 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -3295,12 +3295,12 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) field being reset to nil. */ f = x_window_to_frame (dpyinfo, hwnd); if (!(f && FRAME_LIVE_P (f))) - break; + goto dflt; w = XWINDOW (FRAME_SELECTED_WINDOW (f)); /* Punt if someone changed the frame's selected window behind our back. */ if (w != w32_system_caret_window) - break; + goto dflt; form.dwStyle = CFS_RECT; form.ptCurrentPos.x = w32_system_caret_x; @@ -3318,17 +3318,19 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) /* Punt if the window was deleted behind our back. */ if (!BUFFERP (w->contents)) - break; + goto dflt; context = get_ime_context_fn (hwnd); if (!context) - break; + goto dflt; set_ime_composition_window_fn (context, &form); release_ime_context_fn (hwnd, context); } - break; + /* Pass WM_IME_STARTCOMPOSITION to DefWindowProc, so that the + composition window will actually be displayed. */ + goto dflt; case WM_IME_ENDCOMPOSITION: ignore_ime_char = 0;