* 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.
Paul Eggert [Sun, 12 Oct 2014 06:09:50 +0000 (23:09 -0700)]
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.
Leo Liu [Sat, 11 Oct 2014 14:11:03 +0000 (22:11 +0800)]
* progmodes/cfengine.el (cfengine3-defuns, cfengine3-vartypes):
Use strings.
(cfengine3-create-imenu-index): New function.
(cfengine3-mode): Use it for `imenu-create-index-function'.
(cfengine-auto-mode): Improve and prefer cfengine3-mode when
buffer is empty.
Paul Eggert [Thu, 9 Oct 2014 06:54:10 +0000 (23:54 -0700)]
* 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
* 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
Eli Zaretskii [Wed, 8 Oct 2014 12:32:38 +0000 (15:32 +0300)]
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.
Eli Zaretskii [Wed, 8 Oct 2014 10:16:45 +0000 (13:16 +0300)]
Fix bug #18636 with documentation of multi-monitor displays.
doc/lispref/frames.texi (Multiple Terminals): Improve the description of X
display names. Add index entries.
(Basic Parameters): Add a cross-reference to where X display names
are described.
(Position Parameters): Mention that positional parameters of the
form (+ POS) can be negative if they are on a non-primary monitor
of a multi-monitor display.
(Creating Frames): Mention that on multi-monitor displays the
frame might be positioned differently than specified by the frame
parameters alist.
lisp/faces.el (display-grayscale-p): Mention in the doc string that
the argument can be either a display name or a frame.
lisp/frame.el (display-pixel-height, display-pixel-width)
(display-mm-height, display-mm-width, display-backing-store)
(display-save-under, display-planes, display-color-cells)
(display-visual-class, display-monitor-attributes-list)
(display-screens): Mention in the doc string that the argument can
be either a display name or a frame. Improve the docs of the
monitor attributes.
Glenn Morris [Tue, 7 Oct 2014 20:17:09 +0000 (16:17 -0400)]
* 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.
* lisp/progmodes/verilog-mode.el (verilog-mode-version): Bump.
(verilog-menu): Add AUTOINSERTLAST.
(verilog-no-indent-begin-re): When `verilog-indent-begin-after-if'
is nil, fix indenting initial/final to match always statements, bug825.
Reported by Tim Clapp.
(verilog-extended-complete-re): Fix indentation of DPI-C imports,
bug557. Reported by ZeDong Mao and Jason Forkey.
(verilog-read-decls): Fix parsing typed interfaces.
Fix AUTOINOUTMODPORT missing types. Reported by Stephan Bourduas.
(verilog-auto-arg-ports): Fix verilog-auto-arg-format single.
(verilog-auto-output-every): Add regexp to AUTOOUTPUTEVERY, bug793.
Reported by Pierre-David Pfister.
(verilog-auto-insert-lisp): Doc fix.
(verilog-auto-insert-last, verilog-auto): Add AUTOINSERTLAST to
allow post-AUTO user fixups, bug826. Reported by Dennis Muhlestein.
(verilog-sk-ovm-class, verilog-sk-uvm-object)
(verilog-sk-uvm-component): Fix missing string keyword in class
skeletons, bug824. Reported by eldad faruhi.
Glenn Morris [Mon, 6 Oct 2014 06:30:07 +0000 (23:30 -0700)]
* lisp/menu-bar.el (menu-bar-games-menu): Remove landmark.
It's not a game you can play, and is of no interest to the casual browser.
It was broken for years and no-one even noticed.
Ref: http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00288.html