]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from trunk after cygw32 commit, and resolve conflicts.
authorEli Zaretskii <eliz@gnu.org>
Mon, 8 Oct 2012 13:06:31 +0000 (15:06 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 8 Oct 2012 13:06:31 +0000 (15:06 +0200)
12 files changed:
1  2 
lib-src/ChangeLog
lib-src/makefile.w32-in
lisp/ChangeLog
lisp/subr.el
src/ChangeLog
src/emacs.c
src/keyboard.c
src/makefile.w32-in
src/termhooks.h
src/w32fns.c
src/w32term.c
src/w32term.h

index a9031d74758642b14edbdb17f26ff03e41f5a198,85351d7f08de3ae6b663783f074fe6dbb0e5d2de..26525b6e6550a76df5bb8e3fb62f0d759bcc62f2
@@@ -1,7 -1,20 +1,24 @@@
+ 2012-10-08  Eli Zaretskii  <eliz@gnu.org>
+       * makefile.w32-in (obj): Add cygw32.o.
+ 2012-10-08  Daniel Colascione  <dancol@dancol.org>
+       * emacsclient.c: Include windows.h when HAVE_NTGUI.
+       (alt_display): New variable.  We send the display held by this
+       variable when the primary display is either unsupported or not
+       present.
+       (longopts): Allow display everywhere.
+       (w32_set_user_model_id): Move lower in file, inside HAVE_NTGUI
+       section.
+       (decode_options): Use alt_display.  Explain why.
+       (main): Retry connection with alt_display if connection with main
+       display fails.
 +2012-10-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (obj): Add w32notify.o.
 +
  2012-10-01  Fabrice Popineau  <fabrice.popineau@gmail.com>
  
        * make-docfile.c (write_globals): Special-case
index d53f768cfa8778c990fae74a06ae0a9f5046dde5,ecc5fb866b3d947c76b58de7651b15d9091927f4..9da61cd525553785171a387216ecf74dd26dfe59
@@@ -124,9 -124,9 +124,9 @@@ $(BLD)/profile.exe:        $(PROFILEOBJS
  obj =   dosfns.o msdos.o \
        xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
        fontset.o menu.o \
-       w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
+       w32.o w32console.o w32fns.o w32heap.o w32inevt.o cygw32.o \
        w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
 -      font.o w32font.o w32uniscribe.o \
 +      font.o w32font.o w32uniscribe.o w32notify.o \
        dispnew.o frame.o scroll.o xdisp.o window.o bidi.o \
        charset.o coding.o category.o ccl.o character.o chartab.o \
        cm.o term.o terminal.o xfaces.o \
diff --cc lisp/ChangeLog
index 7d40007f43589e2856ae1ae2b147237d5aab95f3,97d24ebf4d6f1b9e1f29bf62a856a8ee7458a8ea..406c50ee9c8c75467da219b39022d7d5d1769103
+ 2012-10-08  Glenn Morris  <rgm@gnu.org>
+       * cus-start.el (message-log-max): Set :version.
+       * calendar/calendar.el (calendar-intermonth-header): Doc fix.
+ 2012-10-08  Martin Rudalics  <rudalics@gmx.at>
+       * emacs-lisp/edebug.el (edebug-pop-to-buffer): Don't try to split
+       the minibuffer window (Bug#10851).
+ 2012-10-08  Fabián Ezequiel Gallina  <fgallina@cuca>
+       Enhancements on forward-sexp movement.
+       * progmodes/python.el (python-nav-beginning-of-statement)
+       (python-nav-end-of-statement): Return point-marker.
+       (python-nav-forward-sexp): lisp-like forward-sexp behavior.
+       (python-info-current-symbol)
+       (python-info-statement-starts-block-p): Rename from
+       python-info-beginning-of-block-p.
+       (python-info-statement-ends-block-p): Rename from
+       python-info-end-of-block-p.
+       (python-info-beginning-of-statement-p)
+       (python-info-end-of-statement-p)
+       (python-info-beginning-of-block-p, python-info-end-of-block-p):
+       New functions.
+ 2012-10-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+       * comint.el (comint-preinput-scroll-to-bottom): Preserve the
+       frame-selected-windows.
+ 2012-10-08  Daniel Colascione  <dancol@dancol.org>
+       * battery.el (battery-status-function): Check for
+       w32-battery-status itself, not system-time windows-nt.
+       * frame.el: Require cl-lib.
+       (display-format-alist): New variable mapping frame types to
+       functions that initialize them.
+       (window-system-for-display): New function: interprets
+       display-format-alist.
+       (make-frame-on-display): Remove existing display-selection logic
+       and just forward to make-frame, which will now DTRT.
+       (make-frame): Restructure to use window-system-for-display to
+       figure out how to create a frame on a given display.
+       (display-mouse-p): Look for frame-type w32, not a particular
+       system-type.
+       * loadup.el: Load w32 lisp code when we have the w32 feature.
+       * mouse.el (mouse-yank-primarY): Look for frame-type w32, not
+       system-type windows-nt.
+       * server.el (server-create-window-system-frame): Look for window
+       type.
+       (server-proces-filter): Only force a window system when windows-nt
+       _and_ w32.  Explain why.
+       * simple.el (normal-erase-is-backspace-mode): Add w32 to the list
+       of window systems we configure for the mode.
+       * startup.el (command-line): Mark window system is initialized
+       after we've done it.
+       * common-win.el (x-select-text): Look for w32, not windows-nt.
+       * ns-win.el: Require cl-lib.  Add ourselves to
+       display-format-alist.
+       (ns-initialize-window-system): Assert we're not initialized twice.
+       * w32-win.el: Enable lexical binding; require cl-lib; add
+       ourselves to display-format-alist.
+       (w32-handle-dropped-file): Convert incoming dropped files from
+       Windows paths to Cygwin ones before passing them on to the rest of
+       Emacs.
+       (w32-drag-n-drop): New paramter new-frame.  Simplify logic.
+       (w32-initialize-window-system): Assert we're not initialized twice.
+       * x-win.el: Require cl-lib; add ourselves to display-format-alist.
+       (x-initialize-window-system): Assert we're not initialized twice.
+       * w32-common-fns.el: New File.
+       (w32-version, w32-using-nt, w32-get-clipboard-data)
+       (w32-set-clipboard-data, x-set-selection, x-get-selection)
+       (w32-charset-info-alist, x-last-selected, text)
+       (x-get-selection-value, x-selection-value): Move here.
+       * w32-fns.el: Require w32-common-fns.
+       (w32-version, w32-using-nt, w32-get-clipboard-data)
+       (w32-set-clipboard-data, x-set-selection, x-get-selection)
+       (w32-charset-info-alist, x-last-selected, text)
+       (x-get-selection-value, x-selection-value): Move to
+       w32-common-fns.
+       * w32-vars.el:
+       (w32-allow-system-shell, w32-system-shells): Define only in
+       non-cygwin case.
+ 2012-10-07  Stefan Monnier  <monnier@iro.umontreal.ca>
+       * subr.el (read-passwd-map): Don't use `defconst' (bug#12597).
+       (read-passwd): Remove a few more potential sources of leaks.
+ 2012-10-07  Fabián Ezequiel Gallina  <fgallina@cuca>
+       * progmodes/python.el (inferior-python-mode)
+       (python-shell-make-comint): Fix initialization of local
+       variables copied from parent buffer.
+ 2012-10-07  Jan Djärv  <jan.h.d@swipnet.se>
+       * term/ns-win.el (ns-read-file-name): Update declaration to match
+       nsfns.m.
+       (ns-respond-to-change-font): Change fontsize separatly so we are sure
+       it is set when font is acted upon.
+ 2012-10-07  Fabián Ezequiel Gallina  <fgallina@cuca>
+       Enhancements to indentation.
+       * progmodes/python.el (python-indent-context): Give priority to
+       inside-string context.  Make comments indentation markers.
+       (python-indent-region): Do not mess with strings, unless it's the
+       enclosing set of quotes.
+ 2012-10-07  Stefan Monnier  <monnier@iro.umontreal.ca>
+       * window.el (internal--before-save-selected-window)
+       (internal--after-save-selected-window): New functions extracted from
+       save-selected-window.  Make sure we return the `alist' we construct.
+       (save-selected-window): Use them.
+       * textmodes/tex-mode.el (tex-recenter-output-buffer):
+       Use with-selected-window.
+       * emacs-lisp/autoload.el (make-autoload): Add `cl-defmacro' to the
+       forms that define macros (bug#12593).
+ 2012-10-07  Kenichi Handa  <handa@gnu.org>
+       * international/mule-conf.el (compound-text-with-extensions):
+       Add :mime-charset property as x-ctext.
+ 2012-10-07  Stefan Merten  <smerten@oekonux.de>
+       * textmodes/rst.el (rst-new-adornment-down, rst-indent-field)
+       (rst-indent-literal-normal, rst-indent-literal-minimized)
+       (rst-indent-comment): Correct :version tag.
+       (rst-official-cvs-rev): Correct version string.
 +2012-10-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * subr.el (w32notify-handle-event): New function.
 +
  2012-10-07  Glenn Morris  <rgm@gnu.org>
  
        * mail/rmailmm.el (rmail-mime-process-multipart):
diff --cc lisp/subr.el
Simple merge
diff --cc src/ChangeLog
index cb2aab2166c127d69988a89e10f11885590e70d9,9e8377c2f7c12669db52db90f50633b3044a455c..30db50fbcc8606f984129c3c7f33ae0aded3b1d4
+ 2012-10-08  Eli Zaretskii  <eliz@gnu.org>
+       * makefile.w32-in (FONT_H): Add $(FRAME_H).
+       (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
+       ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
+       (GLOBAL_SOURCES): Add cygw32.c.
+       * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
+       'const char *'.
+       (x_to_w32_color): Don't modify the argument, modify a copy instead.
+ 2012-10-08  Daniel Colascione  <dancol@dancol.org>
+       * image.c: Permanent fix for JPEG compilation issue --- limit
+       jpeglib `boolean' redefinition to Cygwin builds.
+ 2012-10-08  Eli Zaretskii  <eliz@gnu.org>
+       * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
+       * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
+       Cygwin.
+ 2012-10-08  Daniel Colascione  <dancol@dancol.org>
+       * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
+       w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
+       w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
+       w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
+       keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
+       emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
+       Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
+       operating system.  defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
+       now a supported configuration.
+       * Makefile.in: consolidate image variables into LIBIMAGE; add
+       W32_OBJ and W32_LIBS. Compile new files.
+       * conf_post.h:
+       (_DebPrint) declare tracing facility for W32 debugging.  We need
+       to unify tracing later.
+       (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
+       unconditional use of W32 Unicode functions.  Cygwin runs only on
+       100% Unicode operating systems.
+       * cygw32.c: New file.  Define Cygwin-specific facilities.
+       (Fcygwin_convert_path_to_windows)
+       (Fcygwin_convert_path_from_windows): New user functions for
+       accessing Cygwin path-munging routines.
+       * cygw32.h: New file.
+       (WCSDATA, to_unicode, from_unicode): Define facilities for storing
+       UTF-16LE strings temporarily inside non-Lisp-visible string
+       objects.
+       (w32_strerror): Just what it says on the tin.
+       * emacs.c: Make the NS fork-then-exec code for daemon-launching
+       also run for Cygwin; both systems have the same problem with using
+       GUI facilities in a forked child.  Also call syms_of_cygw32,
+       syms_of_w32select in correct places.
+       (DAEMON_MUST_EXEC): new macro defined to signal that a platform
+       needs fork-then-exec for daemon launching.
+       * font.h: Include frame.h.
+       * image.c: Use the image library cache machinery only when we're
+       compiling for native WINDOWSNT; Cygwin can use shared libraries
+       like any other Unixlike system.
+       * keyboard.c: Clarify a comment regarding the input loop.
+       * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
+       functions directly instead of trying to detect at runtime that our
+       host operating system supports them.  We make this change for two
+       reasons: Cygwin lacks support for the multibyte character
+       conversion functions used by the legacy menu code, and Cygwin
+       never needs to rely on non-Unicode APIs.
+       * unexw32.c (hinst): Declare extern.
+       * w32.c: Change header order;
+       (w32_strerror): Move to w32fns.c because we need it for
+       non-WINDOWSNT builds.
+       * w32.h: Add #error macro to make sure we don't include w32.h for
+       Cygwin builds.  Remove w32select declarations.
+       * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
+       w32fns.c. w32console.c is WINDOWSNT-only.
+       * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
+       NTGUI_UNICODE tweaks.  (See above.) Change _snprintf to the more
+       POSIXy alternative.
+       (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
+       (w32_major_version, w32_minor_version, w32_build_number)
+       (os_subtype, sound_type): Define here
+       (w32_defined_color): Make color parameter const for consistency
+       with other _defined_color functions.
+       (w32_createwindow): Unconditionally call w32_init_class instead of
+       doing so only when hprevinst is non-NULL.  Plumbing hprevinst
+       through the code is complex and unnecessary because class
+       registration is practically free.
+       (w32_name_of_message): New EMACSDEBUG-only function.
+       (Fset_message_beep): Move here
+       (Fx_open_connection): Require that the display name for Windows be
+       "w32" for consistency, emacsclient disambiguation, and maybe, one
+       day, multi-window-system support.
+       (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
+       Cygwin files for W32 GUI facilities, since these clearly don't
+       expect Cygwin names.
+       (_DebPrint): Define.
+       (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
+       (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
+       (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
+       (w32_last_error): Remove.
+       * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
+       * w32heap.c (syspage_mask): Declare here.
+       (cache_system_info): Remove.
+       * w32inevt.c (faked_key): Define globally, not statically.
+       (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
+       (w32_console_toggle_lock_key): Move to w32fns.c.
+       * w32menu.c: Include setjmp.h.  NTGUI_UNICODE changes throughout.
+       * w32proc.c (_DebPrint): Move to w32fns.c.
+       * w32select.c: Include string.h, stdio.h for Cygwin.
+       * w32select.h: New File.
+       * w32term.c: Include io.h for non-CYGWIN builds; needed for
+       get_osfhandle.
+       (w32_message_fd): New variable.  Under Cygwin, holds the file
+       descriptor the system used to tell us about pending thread
+       messages.
+       (w32_init_term): Remove incorrect calls to fcntl and init_sigio
+       that prevented compilation under non-WINDOWSNT systems.
+       (w32_initialize): Open /dev/windows and assign it to
+       w32_message_fd.  Provide w32 feature.
+       * w32term.h: Include frame.h, atimer.h.  Declare various frame functions.
+       (WM_EMACS_INPUT_READY): add.
+       (prepend_msg, w32_message_fd): Declare globally.
+       * w32xfns.c:
+       (keyboard_handle): Use only when WINDOWSNT.
+       (notify_msg_ready): New function.  Posts a message to the main
+       thread's message queue under CYGWIN, which wakes up the main
+       thread from select(2) by making the /dev/windows file descriptor
+       ready.  Under WINDOWSNT, it sets an event the same way the old
+       code did.
+       (post, prepend_msg): Actually call notify_msg_ready instead of
+       setting the input event directly.
+ 2012-10-07  Eli Zaretskii  <eliz@gnu.org>
+       * ralloc.c (relinquish): If a heap is ready to be relinquished,
+       but it still has blocs in it, don't return it to the system,
+       instead of aborting.  (Bug#12402)
 +2012-10-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32term.h (WM_EMACS_FILENOTIFY): New custom message.
 +      (WM_EMACS_END): Bump value by 1.
 +
 +      * w32term.c (lispy_file_action, queue_notifications): New functions.
 +      (syms_of_w32term) <Qadded, Qremoved, Qmodified, Qrenamed_from>
 +      <Qrenamed_to>: New symbols.
 +
 +      * w32notify.c: New file, implement file event notifications for
 +      MS-Windows.
 +
 +      * w32fns.c (w32_wnd_proc): Handle the WM_EMACS_FILENOTIFY message
 +      by posting it to the w32_read_socket queue.
 +
 +      * termhooks.h (enum event_kind) [WINDOWSNT]: New event kind
 +      FILE_NOTIFY_EVENT.
 +
 +      * makefile.w32-in (OBJ2): Add $(BLD)/w32notify.$(O).
 +      (GLOBAL_SOURCES): Add w32notify.c
 +      ($(BLD)/w32notify.$(O)): New set of dependencies.
 +
 +      * lisp.h (syms_of_w32notify) [WINDOWSNT]: Add prototype.
 +
 +      * keyboard.c (kbd_buffer_get_event) [WINDOWSNT]: Handle
 +      FILE_NOTIFY_EVENT.
 +      (syms_of_keyboard) [WINDOWSNT] <Qfile_notify>: New symbol.
 +      (keys_of_keyboard) [WINDOWSNT]: Bind file-notify to
 +      w32notify-handle-event by default.
 +
 +      * emacs.c (main) [WINDOWSNT]: Call syms_of_w32notify.
 +
 +      * alloc.c (NSTATICS): Enlarge to 0x660.
 +
  2012-10-07  Jan Djärv  <jan.h.d@swipnet.se>
  
-       * nsterm.m (ns_dumpglyphs_image): Only draw slize of image (Bug#12506).
+       * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
  
        * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
        MAC_OS_X_VERSION_10_6.
diff --cc src/emacs.c
Simple merge
diff --cc src/keyboard.c
index ad0c5db0fc3bf359feea3800239a18e162864289,05b9a9dde0133ec725650fcc582ea4a9ec6f687a..8316223cd286e423faa45c13994e5ff72c185115
@@@ -313,8 -313,8 +313,11 @@@ static Lisp_Object Qmouse_fixup_help_me
  /* Symbols to denote kinds of events.  */
  static Lisp_Object Qfunction_key;
  Lisp_Object Qmouse_click;
- #if defined (WINDOWSNT)
- Lisp_Object Qlanguage_change, Qfile_notify;
+ #if defined (HAVE_NTGUI)
+ Lisp_Object Qlanguage_change;
++#ifdef WINDOWSNT
++Lisp_Object Qfile_notify;
++#endif
  #endif
  static Lisp_Object Qdrag_n_drop;
  static Lisp_Object Qsave_session;
@@@ -11404,9 -11394,8 +11407,9 @@@ syms_of_keyboard (void
    DEFSYM (Qconfig_changed_event, "config-changed-event");
    DEFSYM (Qmenu_enable, "menu-enable");
  
- #if defined (WINDOWSNT)
+ #if defined (HAVE_NTGUI)
    DEFSYM (Qlanguage_change, "language-change");
 +  DEFSYM (Qfile_notify, "file-notify");
  #endif
  
  #ifdef HAVE_DBUS
index f051ed6a8a9cff9c9febdf6c945033f37b8ce955,120fda9ec438c1173ff7985e213ff91c81545b01..5fc5b6ece464bee09c755f540ccc2f6743af65ac
@@@ -208,9 -207,9 +208,9 @@@ make-buildobj-SH
  GLOBAL_SOURCES =   dosfns.c msdos.c \
        xterm.c xfns.c xmenu.c xselect.c xrdb.c xsmfns.c fringe.c image.c \
        fontset.c menu.c dbusbind.c \
-       w32.c w32console.c w32fns.c w32heap.c w32inevt.c \
+       w32.c w32console.c w32fns.c w32heap.c w32inevt.c cygw32.c \
        w32menu.c w32proc.c w32reg.c w32select.c w32term.c w32xfns.c \
 -      font.c w32font.c w32uniscribe.c \
 +      font.c w32font.c w32uniscribe.c w32notify.c \
        dispnew.c frame.c scroll.c xdisp.c window.c bidi.c \
        charset.c coding.c category.c ccl.c character.c chartab.c \
        cm.c term.c terminal.c xfaces.c \
diff --cc src/termhooks.h
Simple merge
diff --cc src/w32fns.c
Simple merge
diff --cc src/w32term.c
Simple merge
diff --cc src/w32term.h
index 7553745898169467aaa8c0b9089b31073a5a0dff,9fb37b9f0307ccf3da03010353a2e3c8116c8097..6e4f8594d67471a801699fa8cc58b7464cd94110
@@@ -583,9 -619,9 +619,10 @@@ do { 
  #define WM_EMACS_HIDE_CARET            (WM_EMACS_START + 18)
  #define WM_EMACS_SETCURSOR             (WM_EMACS_START + 19)
  #define WM_EMACS_PAINT                 (WM_EMACS_START + 20)
 -#define WM_EMACS_BRINGTOTOP            (WM_EMACS_START + 22)
 -#define WM_EMACS_INPUT_READY           (WM_EMACS_START + 23)
 +#define WM_EMACS_BRINGTOTOP            (WM_EMACS_START + 21)
- #define WM_EMACS_FILENOTIFY            (WM_EMACS_START + 22)
- #define WM_EMACS_END                   (WM_EMACS_START + 23)
++#define WM_EMACS_INPUT_READY           (WM_EMACS_START + 22)
++#define WM_EMACS_FILENOTIFY            (WM_EMACS_START + 23)
+ #define WM_EMACS_END                   (WM_EMACS_START + 24)
  
  #define WND_FONTWIDTH_INDEX    (0)
  #define WND_LINEHEIGHT_INDEX   (4)