1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 03:40:56 -08:00
Commit graph

36429 commits

Author SHA1 Message Date
Eli Zaretskii
e23e97d504 Cherry-pick a fix from trunk; fix level handling in bidi_resolve_brackets. 2014-10-16 16:18:00 +03:00
Eli Zaretskii
48af58622b Fix initialization of flags when pushing BPA stack. 2014-10-15 15:23:59 +03:00
Eli Zaretskii
4669732cc0 Rewrote bracket resolution to match subtleties of Reference Implementation. 2014-10-15 13:22:15 +03:00
Eli Zaretskii
e3060a0c4d Merge from trunk and resolve conflicts. 2014-10-14 21:10:37 +03:00
Eli Zaretskii
b7e6292712 Fix resolution of neutrals that came out of the cache. 2014-10-14 16:32:53 +03:00
Eli Zaretskii
3fe73df071 Implement inhibit-bidi-mirroring; improve biditest.el. 2014-10-14 16:17:16 +03:00
Dmitry Antipov
bb75cdf9c7 Cleanup terminal handling code.
* dispextern.h (get_named_tty): Remove prototype but...
* termhooks.h (get_named_terminal): ...resurrect it under
more meaningful name.
(get_terminal): Likewise, but with...
(decode_live_terminal): ...this name.
(decode_tty_terminal): Add prototype.
* term.c (get_tty_terminal): Remove.
(get_named_tty): Remove.
(Ftty_display_color_p, Ftty_display_color_cells, Ftty_type)
(Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty):
Use decode_tty_terminal.
(Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal.
* terminal.c (get_terminal): Refactor to...
(decode_terminal, decode_live_terminal): ...new functions.
(decode_tty_terminal): Replacement for get_tty_terminal.
(get_named_terminal): Likewise for get_named_tty.
* coding.c (Fset_terminal_coding_system_internal)
(Fterminal_coding_system, Fset_keyboard_coding_system_internal):
(Fkeyboard_coding_system):
* composite.c (Fcomposition_get_gstring):
* dispnew.c (Fsend_string_to_terminal):
* frame.c (Fmake_terminal_frame):
* nsfns.m (check_ns_display_info):
* w32fns.c, xfns.c (check_x_display_info):
* xselect.c (frame_for_x_selection): Use decode_live_terminal.
* keyboard.c (handle_interrupt_signal, handle_interrupt)
(Fset_quit_char): Use get_named_terminal.
(Fset_output_flow_control, Fset_input_meta_mode):
Use decode_tty_terminal.
2014-10-14 16:45:41 +04:00
Eli Zaretskii
c1621a49bd Increase 'level' in glyph struct; convert bad type aborts into assertions. 2014-10-14 12:16:02 +03:00
Eli Zaretskii
2b882ee755 Fix bug #18699 with startup aborts of 32-bit MinGW64 build.
src/w32term.h (ALIGN_STACK): Use _WIN64, not _W64, to distinguish
 between 32-bit and 64-bit MinGW builds.
2014-10-13 15:44:03 +03:00
Eli Zaretskii
e5500a96a7 Fixed BPA stack overflow and infloop with nested brackets. 2014-10-13 14:26:58 +03:00
Glenn Morris
b1d5ab0352 Merge from emacs-24; up to 2014-07-26T11:58:24Z!schwab@linux-m68k.org 2014-10-12 15:56:45 -07:00
Paul Eggert
ec11ab9b78 * editfns.c (dump_tz_string): No longer const.
It might be modified.
2014-10-12 13:36:49 -07:00
Paul Eggert
cc541e588a Spelling fixes. 2014-10-12 13:09:15 -07:00
Paul Eggert
80b20192ee * nsmenu.m (clear): Assume OS X 10.6 or later. 2014-10-12 11:02:47 -07:00
Eli Zaretskii
84e5bb98bf Fix bidi_cache_find when NEUTRALS_OK is false; RLI no longer aborts. 2014-10-12 20:13:14 +03:00
Eli Zaretskii
942ba67827 Refactored saving prev info, resolve_neutrals, and high-level cache access. 2014-10-12 19:23:43 +03:00
Paul Eggert
b73d3f5834 Update doc to say Mac OS X 10.6 or later now required.
* doc/emacs/macos.texi (Mac OS / GNUstep, Mac / GNUstep Basics)
(Mac / GNUstep Customization):
* nextstep/README: Mac OS X 10.6 or later now required.
2014-10-12 07:56:58 -07:00
Jan Djärv
9a265587d2 Require OSX >= 10.6. Remove PowerPC unexec code.
* configure.ac: Require OSX 10.6.  Remove NSInteger test,
use nsfont for Gnustep, macfont for OSX.

* etc/NEWS: OSX required is 10.6 or newer.

* src/Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
comment.

* src/macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
(mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6

* src/nsfns.m: Always include src/macfont.h on COCOA.
(ns_filename_from_panel, ns_directory_from_panel)
(Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
(Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6

* src/nsterm.m: Always include src/macfont.h on COCOA.
(ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
(ns_dumpglyphs_image, ns_check_menu_open)
(applicationDidFinishLaunching)
(antialiasThresholdDidChange:)
(keyDown:, toggleFullScreen:, setPosition:portion:whole:): Remove
checks for OSX <= 10.5/10.6.
(changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
(syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
GNUSTEP.

* src/macfont.m: Remove >= 1050 check.
(macfont_create_family_with_symbol)
(macfont_get_glyph_for_character)
(mac_font_get_glyphs_for_variants)
(mac_ctfont_create_available_families, syms_of_macfont): Remove
code for OSX < 10.6.
(mac_font_family_group, mac_font_family_compare): Remove, only used
for OSX < 10.6.

* src/nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.

* src/nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
(x_activate_menubar, trackingNotification:): Remove check for
OSX >= 10.5.
(menuNeedsUpdate:): Remove check for OSX < 10.5.

* src/nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
(NS_HAVE_NSINTEGER): Remove block.
Remove >= OSX 10.6 tests.

* src/unexmacosx.c: Remove include ppc/reloc.h.
(unrelocate, copy_dysymtab): Remove PPC code.
(rebase_reloc_address): Remove, only used for PPC:
2014-10-12 10:35:50 +02:00
Paul Eggert
4c4c5b9121 Fix putenv race conditions with undefined behavior.
Do all putenv calls before Emacs creates any threads.
Use a safer way to modify the TZ environment variable in the
presence of multiple threads.  For further thread-safety,
prefer localtime_r and gmtime_r to localtime and gmtime,
and prefer struct tm's tm_gmtoff (if available) to calling
both localtime_r and gmtime_r.
* configure.ac (LOCALTIME_CACHE): Remove.
We needn't worry about SunOS 4 any more; Sun dropped support in 2003.
All uses of LOCALTIME_CACHE removed.  This simplifies the fix.
(tzalloc): Add check for this function.
* admin/merge-gnulib (GNULIB_MODULES): Add time_r, since Emacs now
calls localtime_r and gmtime_r directly.
* src/dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
(init_dbusbind): ... to this new function.
* src/emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
* src/xterm.c (x_term_init): Move xputenv call from here ...
(init_xterm): ... to this new function.
* src/emacs.c (main) [USE_GTK]: Call it before creating threads.
* src/editfns.c (HAVE_TM_GMTOFF): Default to false.
(dump_tz_string): New constant.
(init_editfns): Use it.  This centralizes the dump_tz stuff.
Call set_time_zone_rule here, so that its xputenv is done
before Emacs goes multithreaded.
(mktime_z) [!HAVE_TZALLOC]: New function, which is typically
thread-safe enough for Emacs.
(format_time_string, Fdecode_time, Fcurrent_time_string)
(Fcurrent_time_zone):
Prefer localtime_r and gmtime_r, which are more thread-safe, to
localtime and gmtime.  Remove now-unnecessary calls to block_input.
(tm_gmtoff): New static function.
(Fdecode_time, Fcurrent_time_zone): Use it.
(Fencode_time): Use mktime_z, for better thread-safety.
(set_time_zone_rule): Now static.  Rewrite to be mostly thread-safe,
i.e., not quite thread-safe but good enough for Emacs typical usage.
Do not reclaim storage that is in the environment; let it leak.
Always call tzset, since localtime_r does not.
* src/emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
This is now done in init_editfns.
* src/systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
New macros and declarations, for platforms lacking tzalloc & friends.

Fixes: debbugs:8705
2014-10-11 23:09:50 -07:00
Eli Zaretskii
4d5fab649d Reset bracket_resolved bit earlier; remove bytepos from bidi_saved_info. 2014-10-11 17:10:46 +03:00
Eli Zaretskii
8cc6103196 Rename type_after_w1 into type_after_wn. 2014-10-11 15:24:30 +03:00
Eli Zaretskii
4eb60cd3a1 Reset the bracket_resolved flag before advancing to next character. 2014-10-11 15:21:26 +03:00
Jan Djärv
da373d7b88 Fix mailaddress 2014-10-11 10:24:56 +02:00
Jan Djärv
1badfceee7 Fix mailaddress. 2014-10-11 10:22:00 +02:00
Paul Eggert
390c2f3bcc Fix port to Debian GNU/kFreeBSD 7 (wheezy).
* process.c (accept4) [!HAVE_ACCEPT4]: New macro.

Fixes: debbugs:18666
2014-10-10 11:02:09 -07:00
Eli Zaretskii
70939d8240 Fix assertion violations due to unresolvable neutrals in cache. 2014-10-10 16:31:23 +03:00
Eli Zaretskii
f6d76d1c6c Fixed crash at startup by starting bidi_bracket_type_t from 1, not zero. 2014-10-10 12:38:48 +03:00
Eli Zaretskii
18e91e6296 Added BPA. Emacs aborts at startup. 2014-10-09 20:54:42 +03:00
Paul Eggert
078c4dc635 Spelling fixes. 2014-10-09 08:59:41 -07:00
Stefan Monnier
d7a6097b57 * src/frame.c (Fmouse_pixel_position): Call Vmouse_position_function.
Fixes: debbugs:18638
2014-10-09 09:50:10 -04:00
Paul Eggert
8881986b3e * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS.
On x86 platforms this works around GCC bug 63495
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495>,
and more generally should fix a portability problem in Emacs.
Problem reported by Stefan Monnier in:
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00261.html
2014-10-08 23:54:10 -07:00
Glenn Morris
32ade3f01a Merge from emacs-24; up to 2014-07-22T06:37:31Z!yamaoka@jpl.org 2014-10-08 21:23:09 -07:00
Glenn Morris
01058f734a Doc tweaks
* doc/lispref/frames.texi (Multiple Terminals): Copyedits.

* lisp/frame.el (display-monitor-attributes-list): Doc tweaks.

* nt/README.W32, src/ChangeLog.10, src/w32term.c:
Standardize on "taskbar" rather than "task bar", since that is what
most references seem to use; e.g.
http://en.wikipedia.org/wiki/Taskbar
http://windows.microsoft.com/en-us/windows7/products/features/windows-taskbar
2014-10-08 20:47:30 -04:00
Leo Liu
2dbd7a37a8 Enhance terpri to allow conditionally output a newline
* doc/lispref/streams.texi (Output Functions): Document new argument ENSURE to
terpri.

* doc/misc/cl.texi (Porting Common Lisp): Remove parse-integer.

* lisp/emacs-lisp/cl-extra.el (cl-fresh-line): New function.

* src/keymap.c (describe_vector_princ):
* src/keyboard.c (Fcommand_error_default_function): Adapt to change to
Fterpri.

* src/print.c (printchar_stdout_last): Declare.
(printchar): Record the last char written to stdout.
(Fterpri): Add optional argument ENSURE.

* test/automated/print-tests.el: New file.
(terpri): Tests for terpri.  (Bug#18652)
2014-10-09 06:05:48 +08:00
Eli Zaretskii
c35e776245 Fix bug #18649 with handling C-g on MS-Windows in -nw sessions.
src/w32inevt.c (maybe_generate_resize_event): Pass non-zero as the
 DELAY argument to change_frame_size, so that the frame size
 changes, if any are needed, are delayed until the next redisplay.
 This is to avoid a too early QUIT inside change_frame_size, when
 it calls Lisp in frame_windows_min_size, in case one of the events
 we've read sets the quit-flag.
2014-10-08 15:32:38 +03:00
Eli Zaretskii
d295469e8e Accept terminal devices on MS-Windows in APIs that accept frame or display.
src/w32fns.c (check_x_display_info): Accept terminal objects as
 argument, to follow what xfns.c does.
2014-10-08 13:39:45 +03:00
Kenichi Handa
a7044030f3 Fix bug #18610 with crashes when visiting files with ESC and 8-bit bytes.
src/coding.c (detect_coding_iso_2022): Set coding->rejected
 correctly when an invalid escape sequence is found.

 Backported from trunk.
2014-10-08 10:30:57 +03:00
Glenn Morris
23755ba32b * admin/unidata/Makefile.in: Check for deleted uni- files.
(all): Use unifiles rather than charprop.el.
(FORCE): New variable and phony rule.
(${unidir}/charprop.el): Respect FORCE.
(unifiles): New rule.

* src/Makefile.in ($(srcdir)/macuvs.h)
($(lispsource)/international/charprop.el): Add explicit FORCE.

Fixes: debbugs:18489
2014-10-07 16:17:09 -04:00
Eli Zaretskii
8ca8fde8a2 Fix bug #18650 with warning about zlib when loading url-vars.el.
src/decompress.c (init_zlib_functions): Move the message about zlib
 being unavailable from here...
 (Fzlib_decompress_region): ...to here.

 lisp/url/url-http.el (url-http-create-request): Recheck zlib availability
 on windows-nt each time it might be required.
2014-10-07 20:18:07 +03:00
Dmitry Antipov
5bdd495965 * font.c (Ffont_get_glyphs): Use validate_subarray and fix
the case where an optional string is used.  Adjust docstring.
2014-10-07 20:00:35 +04:00
Stefan Monnier
3ef041ae3b * lisp/term/w32-win.el: Move all code from 32-common-fns.el here.
(gui-select-text, gui-selection-value): Use w32 handlers in the w32
console as well.
* lisp/w32-common-fns.el: Remove.
* lisp/loadup.el: Don't load w32-common-fns.el.
* w32-fns.elc: Don't require w32-common-fns.
* src/lisp.mk (lisp): Remove w32-common-fns.elc.

Fixes: debbugs:18629
2014-10-06 13:47:56 -04:00
Paul Eggert
918b5def3f * keyboard.c (Qleft, Qright): Remove duplicate definitions.
These were already defined in buffer.c, and the duplicate
definitions cause problems on platforms like 'gcc -fno-common'.
Reported by Peter Dyballa in: http://bugs.gnu.org/9927#137
2014-10-05 16:18:31 -07:00
Jan Djärv
d589d25223 Fix disable toolbar for GNUStep.
* nsterm.m (updateFrameSize:): Only call update_frame_tool_bar
if toolbar is visible.

Fixes: debbugs:18345
2014-10-05 20:03:42 +02:00
Jan Djärv
223ed51dc5 * nsfont.m (nsfont_draw): Use CGFloat for GNUstep newer than 0.23.
Fixes: debbugs:18030
2014-10-05 19:51:11 +02:00
Jan Djärv
6e604a82a0 * nsterm.m (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
line height (Bug#17977).

Fixes: debbugs:18345
2014-10-05 17:46:10 +02:00
Jan Djärv
08f27aa39c * nsterm.m (ns_select, ns_read_socket): Use unwind_protect to decrease
apploopnr.

Fixes: debbugs:18345
2014-10-05 16:17:43 +02:00
Jan Djärv
73267792f0 Add ns-use-fullscreen-animation for non-native fullscreen on NS.
* nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new.
(toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
2014-10-05 14:20:17 +02:00
Jan Djärv
6a4b1b1729 Import from macoport 24.3.94.
* macfont.m: Fix indentation and import changes from macport
24.3.94.
(macfont_closest_traits_index): New function.
(macfont_closest_traits_index_p): Renamed from
macfont_closest_traits_index.
(macfont_list): Use macfont_closest_traits_index_p.
2014-10-05 13:34:59 +02:00
Kenichi Handa
21c1abcae1 coding.c (detect_coding_iso_2022): Fix previous change. 2014-10-05 17:52:04 +09:00
Kenichi Handa
1943141cf6 coding.c (detect_coding_iso_2022): Set coding->rejected correctly when an invalid escape sequence is found (Bug#18610). 2014-10-05 17:17:15 +09:00