commit f14275633851b047e5aecfa6d12f160ee4c2f149 (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Fri Jun 26 08:45:29 2015 +0200 Fix invisible mouse pointers on Windows. * src/w32fns.c: Include windowsx.h. (w32_wnd_proc): If the mouse moved and the mouse pointer is invisible, make it visible again even when the main (Lisp) thread is busy. * src/w32term.c (w32_toggle_invisible_pointer): Rather then garbaging the frame have the input thread call SetCursor. diff --git a/src/w32fns.c b/src/w32fns.c index 180d326..836dc10 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -73,6 +73,7 @@ along with GNU Emacs. If not, see . */ #include #include +#include #include "font.h" #include "w32font.h" @@ -3493,13 +3494,31 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONUP); case WM_MOUSEMOVE: - /* Ignore mouse movements as long as the menu is active. These - movements are processed by the window manager anyway, and - it's wrong to handle them as if they happened on the - underlying frame. */ f = x_window_to_frame (dpyinfo, hwnd); - if (f && f->output_data.w32->menubar_active) - return 0; + if (f) + { + /* Ignore mouse movements as long as the menu is active. + These movements are processed by the window manager + anyway, and it's wrong to handle them as if they happened + on the underlying frame. */ + if (f->output_data.w32->menubar_active) + return 0; + + /* If the mouse moved, and the mouse pointer is invisible, + make it visible again. We do this here so as to be able + to show the mouse pointer even when the main + (a.k.a. "Lisp") thread is busy doing something. */ + static int last_x, last_y; + int x = GET_X_LPARAM (lParam); + int y = GET_Y_LPARAM (lParam); + + if (f->pointer_invisible + && (x != last_x || y != last_y)) + f->pointer_invisible = false; + + last_x = x; + last_y = y; + } /* If the mouse has just moved into the frame, start tracking it, so we will be notified when it leaves the frame. Mouse diff --git a/src/w32term.c b/src/w32term.c index 7c5f2db..fbd31b1 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -6613,14 +6613,10 @@ w32_toggle_invisible_pointer (struct frame *f, bool invisible) if (f->pointer_invisible != invisible) { f->pointer_invisible = invisible; - SET_FRAME_GARBAGED (f); + w32_define_cursor (FRAME_W32_WINDOW (f), + f->output_data.w32->current_cursor); } - if (invisible) - SetCursor (NULL); - else - SetCursor (f->output_data.w32->current_cursor); - unblock_input (); } commit 605765af40831390be93264b36b31fad56907554 Author: Martin Rudalics Date: Fri Jun 26 08:28:08 2015 +0200 Provide invisible mouse pointers on Windows. (Bug#6105) (Bug#12922) * src/w32fns.c (w32_wnd_proc): Handle f->pointer_invisible for WM_SETCURSOR and WM_EMACS_SETCURSOR cases. * src/w32term.c (w32_hide_hourglass): Handle f->pointer_invisible. (w32_toggle_invisible_pointer): New function. (w32_create_terminal): Add w32_toggle_invisible_pointer as toggle_invisible_pointer_hook for this terminal. diff --git a/src/w32fns.c b/src/w32fns.c index 5f40729..180d326 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -3974,11 +3974,17 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if (LOWORD (lParam) == HTCLIENT) { f = x_window_to_frame (dpyinfo, hwnd); - if (f && f->output_data.w32->hourglass_p - && !menubar_in_use && !current_popup_menu) - SetCursor (f->output_data.w32->hourglass_cursor); - else if (f) - SetCursor (f->output_data.w32->current_cursor); + if (f) + { + if (f->output_data.w32->hourglass_p + && !menubar_in_use && !current_popup_menu) + SetCursor (f->output_data.w32->hourglass_cursor); + else if (f->pointer_invisible) + SetCursor (NULL); + else + SetCursor (f->output_data.w32->current_cursor); + } + return 0; } goto dflt; @@ -3991,7 +3997,12 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { f->output_data.w32->current_cursor = cursor; if (!f->output_data.w32->hourglass_p) - SetCursor (cursor); + { + if (f->pointer_invisible) + SetCursor (NULL); + else + SetCursor (cursor); + } } return 0; } diff --git a/src/w32term.c b/src/w32term.c index b7c6e13..7c5f2db 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -6590,7 +6590,10 @@ w32_hide_hourglass (struct frame *f) struct w32_output *w32 = FRAME_X_OUTPUT (f); w32->hourglass_p = 0; - SetCursor (w32->current_cursor); + if (f->pointer_invisible) + SetCursor (NULL); + else + SetCursor (w32->current_cursor); } /* FIXME: old code did that, but I don't know why. Anyway, @@ -6602,6 +6605,25 @@ w32_arrow_cursor (void) SetCursor (w32_load_cursor (IDC_ARROW)); } +static void +w32_toggle_invisible_pointer (struct frame *f, bool invisible) +{ + block_input (); + + if (f->pointer_invisible != invisible) + { + f->pointer_invisible = invisible; + SET_FRAME_GARBAGED (f); + } + + if (invisible) + SetCursor (NULL); + else + SetCursor (f->output_data.w32->current_cursor); + + unblock_input (); +} + /*********************************************************************** Initialization ***********************************************************************/ @@ -6741,6 +6763,7 @@ w32_create_terminal (struct w32_display_info *dpyinfo) terminal->ins_del_lines_hook = x_ins_del_lines; terminal->delete_glyphs_hook = x_delete_glyphs; terminal->ring_bell_hook = w32_ring_bell; + terminal->toggle_invisible_pointer_hook = w32_toggle_invisible_pointer; terminal->update_begin_hook = x_update_begin; terminal->update_end_hook = x_update_end; terminal->read_socket_hook = w32_read_socket; commit 135ae5d16d7edf122a8b72817987fd847668d3f9 Author: Xue Fuqiao Date: Fri Jun 26 09:05:40 2015 +0800 Doc fix for deletion commands 'delete-char' does not respect the value of 'delete-active-region'. * doc/emacs/killing.texi (Deletion): Fix documentation for some single-char deletion commands. diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 4b90bf4..7581f34 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -105,9 +105,9 @@ indentation following it (@code{delete-indentation}). (@code{delete-backward-char}), @key{delete} (@code{delete-forward-char}), and @kbd{C-d} (@code{delete-char}). @xref{Erasing}. With a numeric argument, they delete the specified -number of characters. If the numeric argument is omitted or one, they -delete all the text in the region if it is active (@pxref{Using -Region}). +number of characters. If the numeric argument is omitted or one, +@key{DEL} and @key{delete} delete all the text in the region if it is +active (@pxref{Using Region}). @kindex M-\ @findex delete-horizontal-space commit 99ad90dcb1beccde926d9b6475a393c6f8743f5c Author: Xue Fuqiao Date: Fri Jun 26 08:16:04 2015 +0800 * doc/emacs/help.texi (Apropos): Improve documentation of 'apropos-do-all'. diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index 746c51e..b3ff051 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi @@ -359,8 +359,11 @@ view, describe, default. @end quotation @vindex apropos-do-all - If the variable @code{apropos-do-all} is non-@code{nil}, the apropos -commands always behave as if they had been given a prefix argument. + If the variable @code{apropos-do-all} is non-@code{nil}, most +apropos commands behave as if they had been given a prefix +argument. There is one exception: @code{apropos-variable} without a +prefix argument will always search for all variables, no matter what +the value of @code{apropos-do-all} is. @vindex apropos-sort-by-scores @cindex apropos search results, order by score commit 4570918dff2f3899c592463f151e55c5a715e856 Author: Xue Fuqiao Date: Fri Jun 26 07:45:57 2015 +0800 * doc/emacs/help.texi (Help Summary): Improve documentation of 'describe-mode'. diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index d8e84c1..746c51e 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi @@ -122,7 +122,8 @@ Display the name and documentation of the command that @var{key} runs Display a description of your last 300 keystrokes (@code{view-lossage}). @item C-h m -Display documentation of the current major mode (@code{describe-mode}). +Display documentation of the current major mode and minor modes +(@code{describe-mode}). @item C-h n Display news of recent Emacs changes (@code{view-emacs-news}). @item C-h p commit d08e8a11e1a62e91a58829439f40e3741c5934b1 Author: Paul Eggert Date: Thu Jun 25 13:31:18 2015 -0700 Fix submake dependency bug with .h files * src/Makefile.in ($(libsrc)/make-docfile$(EXEEXT)): Depend on $(lib)/libgnu.a, so that we build $(lib)/*/*.h before the submake in $(libsrc) would spin off a subsubmake for $(lib) in parallel with our submake for $(lib) (Bug#20894). diff --git a/src/Makefile.in b/src/Makefile.in index bfb911e..1fb770d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -529,7 +529,7 @@ $(etc)/DOC: lisp.mk $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp) $(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \ $(shortlisp) -$(libsrc)/make-docfile$(EXEEXT): +$(libsrc)/make-docfile$(EXEEXT): $(lib)/libgnu.a $(MAKE) -C $(libsrc) make-docfile$(EXEEXT) buildobj.h: Makefile commit 671974ef79012c8123182a0990c6d5580f53311a Author: Artur Malabarba Date: Thu Jun 25 18:53:33 2015 +0100 * lisp/character-fold.el (character-fold-table): Reuse `table' diff --git a/lisp/character-fold.el b/lisp/character-fold.el index 7f5be83..1675e6e 100644 --- a/lisp/character-fold.el +++ b/lisp/character-fold.el @@ -36,7 +36,7 @@ some).") (let* ((equiv (make-char-table 'character-fold-table)) (table (unicode-property-table-internal 'decomposition)) (func (char-table-extra-slot table 1))) - ;; Ensure the table is populated + ;; Ensure the table is populated. (map-char-table (lambda (i v) (when (consp i) (funcall func (car i) v table))) table) @@ -77,7 +77,9 @@ some).") (aset equiv k (if multiletter chars (cons (apply #'string dec) chars))))))))) - (unicode-property-table-internal 'decomposition)) + table) + + ;; Add some manual entries. (dolist (it '((?\" """ "“" "”" "”" "„" "⹂" "〞" "‟" "‟" "❞" "❝" "❠" "“" "„" "〝" "〟" "🙷" "🙶" "🙸" "«" "»") (?' "❟" "❛" "❜" "‘" "’" "‚" "‛" "‚" "󠀢" "❮" "❯" "‹" "›") (?` "❛" "‘" "‛" "󠀢" "❮" "‹") @@ -85,6 +87,8 @@ some).") (let ((idx (car it)) (chars (cdr it))) (aset equiv idx (append chars (aref equiv idx))))) + + ;; Convert the lists of characters we compiled into regexps. (map-char-table (lambda (i v) (let ((re (regexp-opt (cons (char-to-string i) v)))) (if (consp i) commit ee80c1170916aae1bca62df5ca086fcc13486de1 Author: Paul Eggert Date: Thu Jun 25 07:21:20 2015 -0700 Translate undisplayable ‘ to ` * doc/lispref/help.texi (Keys in Documentation): * lisp/international/mule-cmds.el (set-locale-environment): * lisp/term/w32console.el (terminal-init-w32console): * src/doc.c (Fsubstitute_command_keys, Vhelp_quote_translation): If ‘ is not displayable, transliterate it to `, not to '. See: http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00542.html diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index 44a680c..fde985d 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi @@ -357,7 +357,7 @@ quotes. If the value is @code{?'} (apostrophe), the style is @t{'like this'} with apostrophes. If the value is @code{?`} (grave accent), the style is @t{`like this'} with grave accent and apostrophe. The default value @code{nil} means to use curved single quotes if -displayable and apostrophes otherwise. +displayable, and grave accent and apostrophe otherwise. @end defvar @defun substitute-command-keys string diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 16c1003..248c89c 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2731,9 +2731,9 @@ See also `locale-charset-language-names', `locale-language-names', (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8))) - ;; If curved quotes don't work, display straight ASCII approximations. + ;; If curved quotes don't work, display ASCII approximations. (unless frame - (dolist (char-repl '((?‘ . [?\']) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"]))) + (dolist (char-repl '((?‘ . [?\`]) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"]))) (when (not (char-displayable-p (car char-repl))) (or standard-display-table (setq standard-display-table (make-display-table))) diff --git a/lisp/term/w32console.el b/lisp/term/w32console.el index 29ab2f1..2df1378 100644 --- a/lisp/term/w32console.el +++ b/lisp/term/w32console.el @@ -69,7 +69,7 @@ ;; Since we changed the terminal encoding, we need to repeat ;; the test for Unicode quotes being displayable. (dolist (char-repl - '((?‘ . [?\']) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"]))) + '((?‘ . [?\`]) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"]))) (when (not (char-displayable-p (car char-repl))) (or standard-display-table (setq standard-display-table (make-display-table))) diff --git a/src/doc.c b/src/doc.c index d2d3c8d..655b911 100644 --- a/src/doc.c +++ b/src/doc.c @@ -761,8 +761,8 @@ Otherwise, return a new string. */) Lisp_Object dv = DISP_CHAR_VECTOR (XCHAR_TABLE (Vstandard_display_table), LEFT_SINGLE_QUOTATION_MARK); if (VECTORP (dv) && ASIZE (dv) == 1 - && EQ (AREF (dv, 0), make_number ('\''))) - quote_translation = apostrophe; + && EQ (AREF (dv, 0), make_number ('`'))) + quote_translation = grave_accent; } multibyte = STRING_MULTIBYTE (string); @@ -1040,7 +1040,7 @@ Quote \\=‘like this\\=’ if the value is ?\\=‘ (left single quotation mark) Quote 'like this' if the value is ?' (apostrophe). Quote \\=`like this' if the value is ?\\=` (grave accent). The default value is nil, which means quote with left single quotation mark -if displayable, and with apostrophe otherwise. */); +if displayable, and with grave accent otherwise. */); Vhelp_quote_translation = Qnil; defsubr (&Sdocumentation); commit 67dbc32afd8af2eaca9fdba9f17680cdcecb178f Author: Paul Eggert Date: Thu Jun 25 07:08:23 2015 -0700 Fix C99 incompatibilities in Cairo code * src/image.c (xpm_load) [USE_CAIRO]: * src/xterm.c (x_cr_accumulate_data) [USE_CAIRO]: Fix pointer signedness problem. diff --git a/src/image.c b/src/image.c index dfa8941..cf96cae 100644 --- a/src/image.c +++ b/src/image.c @@ -3690,7 +3690,7 @@ xpm_load (struct frame *f, struct image *img) int i; uint32_t *od = (uint32_t *)data; uint32_t *id = (uint32_t *)img->ximg->data; - unsigned char *mid = img->mask_img ? img->mask_img->data : 0; + char *mid = img->mask_img ? img->mask_img->data : 0; uint32_t bgcolor = get_spec_bg_or_alpha_as_argb (img, f); for (i = 0; i < height; ++i) diff --git a/src/xterm.c b/src/xterm.c index d573738..b7aacfa 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -552,7 +552,7 @@ x_cr_accumulate_data (void *closure, const unsigned char *data, { Lisp_Object *acc = (Lisp_Object *) closure; - *acc = Fcons (make_unibyte_string (data, length), *acc); + *acc = Fcons (make_unibyte_string ((char const *) data, length), *acc); return CAIRO_STATUS_SUCCESS; } commit 659199f2ca5f283fb246faa78a244e5ca25f53dd Author: Oleh Krehel Date: Thu Jun 25 13:14:29 2015 +0200 lisp/emacs-lisp/cl-indent.el: Fix indent of with-output-to-string * lisp/emacs-lisp/cl-indent.el (common-lisp-indent-function): `with-output-to-string' should have the same indent as `progn'. This is in line with the declaration of `with-output-to-string'. diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index 57da715..9314419 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el @@ -827,7 +827,7 @@ optional\\|rest\\|key\\|allow-other-keys\\|aux\\|whole\\|body\\|environment\ (with-accessors . multiple-value-bind) (with-condition-restarts . multiple-value-bind) (with-compilation-unit (&lambda &body)) - (with-output-to-string (4 2)) + (with-output-to-string 0) (with-slots . multiple-value-bind) (with-standard-io-syntax (2))))) (dolist (el l)