Define CYGWIN_OBJ with configure, not cpp.
* configure.in (CYGWIN_OBJ): New output variable.
* src/Makefile.in (CYGWIN_OBJ): Set with configure, not cpp.
Set GPM part of MOUSE_SUPPORT with configure, not cpp.
* configure.in (GPM_MOUSE_SUPPORT): New output variable.
* src/Makefile.in (GPM_MOUSE_SUPPORT): New, set by configure.
(MOUSE_SUPPORT) [!HAVE_MOUSE]: Use $GPM_MOUSE_SUPPORT.
Set FONT_DRIVERS with configure rather than cpp.
* configure.in (FONT_OBJ): New output variable.
* src/Makefile.in (FONT_OBJ): New, set by configure.
(FONT_DRIVERS): Use $FONT_OBJ.
* src/Makefile.in (LIBXMU): Set with configure, not cpp.
* src/s/aix4-2.h (LIBXMU):
* src/s/hpux10-20.h (LIBXMU):
Remove definition, now set in configure.
Move NS_OBJ, NS_SUPPORT from cpp to configure.
* configure.in (NS_OBJ, NS_SUPPORT): New output variables.
* src/Makefile.in (NS_OBJ, NS_SUPPORT): Set with configure, not cpp.
Stefan Monnier [Tue, 27 Apr 2010 18:14:16 +0000 (14:14 -0400)]
Let the user turn off locally a globalized minor mode
* emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Avoid re-enabling a minor mode after the user turned the minor mode
off if MODE-enable-in-buffers is run twice (typically once from
fundamental-mode's after-change-major-mode-hook and a second time from
run-mode-hook's own after-change-major-mode-hook).
* configure.in (HAVE_MOTIF_2_1): Remove unused variable.
(LIBXP): No longer substitute in Makefiles.
(MOTIF_LIBW): New output variable. Move system-specific settings here
from src/s files.
* src/Makefile.in (LIBXP): Remove, since included in MOTIF_LIBW.
(MOTIF_LIBW): Set with configure, not cpp.
* s/aix4-2.h (LIB_MOTIF):
* s/gnu-linux.h (LIB_MOTIF):
* s/unixware.h (LIB_MOTIF): Move to configure.in.
Dan Nicolaescu [Tue, 27 Apr 2010 05:24:53 +0000 (22:24 -0700)]
Reduce CPP usage.
* Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE, C_SWITCH_X_SITE): Remove
definitions and undefs. Inline definitions in the only user.
(ALL_CFLAGS): Substitute C_SWITCH_X_SYSTEM using autoconf.
* Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf.
* Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf.
* configure.in (C_SWITCH_X_SYSTEM): Define using autoconf, not cpp.
Dan Nicolaescu [Tue, 27 Apr 2010 03:47:47 +0000 (20:47 -0700)]
Reduce CPP usage.
* Makefile.in (LIB_X11_LIB): Remove, inline in the only user.
(obj): Use autoconf for unexec instead of cpp.
* configure.in (LIB_X11_LIB): Remove, inline in the only user.
(unexec): Define unconditionally, all platforms define
UNEXEC. AC_SUBST it.
(UNEXEC_SRC): Remove, unused.
* configure.in (--with-crt-dir): Doc fix (now valid for all platforms).
(CRT_DIR): On (powerpc64|sparc64)-*-linux-gnu*, default to /usr/lib64.
On hpux10-20, default to /lib.
* src/m/amdx86-64.h (START_FILES, LIB_STANDARD): Change the logic around,
since the defaults (set by the system file) are fine in most cases.
[GNU_LINUX, __OpenBSD__, __NetBSD__, __APPLE__]: Remove sections.
* src/m/ibms390x.h (START_FILES, LIB_STANDARD):
* src/m/macppc.h (START_FILES, LIB_STANDARD) [GNU_LINUX]:
* src/m/sparc.h (START_FILES, LIB_STANDARD) [__linux__]:
Remove definitions, since they are set correctly in s/gnu-linux.h.
* src/s/freebsd.h (START_FILES, LIB_STANDARD):
* src/s/gnu-linux.h (START_FILES, LIB_STANDARD):
* src/s/hpux10-20.h (START_FILES):
* src/s/netbsd.h (START_FILES, LIB_STANDARD, START_FILES_1, END_FILES_1):
Use $CRT_DIR in place of fixed /usr/lib, /lib directories.
Dan Nicolaescu [Mon, 26 Apr 2010 17:10:09 +0000 (10:10 -0700)]
Use autoconf instead of cpp for LIB_MATH.
* s/darwin.h (LIB_MATH): Do not define here, move to configure.
* s/cygwin.h (LIB_MATH): Likewise.
* Makefile.in (LIB_MATH): Do not define with cpp.
(LIBES): Use autoconf for LIB_MATH.
* configure.in (LIB_MATH): New output variable. Set it for some systems.
* m/amdx86-64.h (START_FILES, LIB_STANDARD) [__OpenBSD__]:
For clarity, revert to using fixed /usr/lib rather than $CRT_DIR.
(START_FILES, LIB_STANDARD) [__FreeBSD__]: Merge into the generic case,
since CRT_DIR defaults to /usr/lib. Suggested by Dan Nicolaescu.
Eli Zaretskii [Sat, 24 Apr 2010 11:11:40 +0000 (14:11 +0300)]
Fix cursor motion at end of line that ends in a composed character.
xdisp.c (display_line): Use `reseat' instead of `reseat_1', and
use `get_next_display_element' and `set_iterator_to_next' to
advance to the next character, when looking for the character that
begins the next row.
Eli Zaretskii [Sat, 24 Apr 2010 11:07:27 +0000 (14:07 +0300)]
Fix cursor motion at end of line that ends with a composite character.
xdisp.c (display_line): Use `reseat' instead of `reseat_1', and
use `get_next_display_element' and `set_iterator_to_next' to
advance to the next character, when looking for the character that
begins the next row.
* configure.in (CRT_DIR): New output variable.
(--with-crt-dir): New option. (Bug#5655)
(HAVE_LIB64_DIR): Remove.
* src/Makefile.in (CRT_DIR): New variable, set by configure.
* src/m/amdx86-64.h, m/ibms390x.h (START_FILES, LIB_STANDARD):
Use $CRT_DIR rather than HAVE_LIB64_DIR. (Bug#5655)
Dan Nicolaescu [Fri, 23 Apr 2010 22:14:14 +0000 (15:14 -0700)]
Simplify m/intel386.h.
* m/intel386.h (CRT0_DUMMIES): Remove, inline value in the only
user: ecrt0.c.
(SOLARIS2): Remove LOAD_AVE_TYPE, LOAD_AVE_CVT, LIBS_MACHINE, unused.
(USG5_4): Move LOAD_AVE_TYPE, LOAD_AVE_CVT, FSCALE definitions to
the only user: s/unixware.h.
* ecrt0.c: Remove #ifndef static. Inline CRT0_DUMMIES definition
from m/intel386.h.
* s/unixware.h (LOAD_AVE_TYPE, LOAD_AVE_CVT, FSCALE): Definitions
moved here from m/intel386.h.
Eli Zaretskii [Fri, 23 Apr 2010 18:10:31 +0000 (21:10 +0300)]
Fix display of composed characters from L2R scripts in bidi buffers.
xdisp.c (set_iterator_to_next, next_element_from_composition): After
advancing IT past the composition, resync the bidi iterator with
IT's position. (Bug#5977)
Stefan Monnier [Fri, 23 Apr 2010 16:26:11 +0000 (12:26 -0400)]
Provide byte-compiler warnings when set-default a read-only var.
* emacs-lisp/bytecomp.el (byte-compile-set-default): New function.
(byte-compile-setq-default): Optimize for the
single-var case and don't call byte-compile-form in this case to avoid
inf-loop with byte-compile-set-default.
Eli Zaretskii [Fri, 23 Apr 2010 15:09:11 +0000 (18:09 +0300)]
Support `display' text properties and overlay strings in bidi buffers.
xdisp.c (pop_it): When the stack is popped after displaying
from a string, bidi-iterate to exit from the text portion covered
by the `display' property or overlay. (Bug#5988, bug#5920)
Eli Zaretskii [Fri, 23 Apr 2010 15:05:23 +0000 (18:05 +0300)]
Support `display' text properties and overlays.
xdisp.c (pop_it): When the stack is popped after displaying
from a string, bidi-iterate to exit from the text portion covered
by the `display' property or overlay. (Bug#5988, bug#5920)
Dan Nicolaescu [Fri, 23 Apr 2010 07:21:18 +0000 (00:21 -0700)]
Simplify STARTFILES definition.
* s/hpux10-20.h (START_FILES): Explicitly define here instead of
relying on Makefile.in to define it.
* s/cygwin.h (START_FILES): Likewise.
* Makefile.in (STARTFILES): Remove conditional code, not needed anymore.
Dan Nicolaescu [Fri, 23 Apr 2010 07:00:38 +0000 (00:00 -0700)]
Clean up Solaris code.
* s/sol2-6.h (LD_SWITCH_SYSTEM_TEMACS, C_SWITCH_X_SYSTEM)
(LIB_MOTIF): Remove, configure takes care of this.
(NOT_USING_MOTIF): Remove, unused.
* xrdb.c: Remove #if 0-ed #include.
(SYSV): Remove conditional for old SysV.
* sysdep.c (closedir): Remove conditional code for Solaris,
Solaris has closedir.
(message-generate-headers): Record insertion of optional headers as well.
Otherwise the check to prevent repeated insertion of optional headers
is a no-op. By Andreas Seltenreich <seltenreich@gmx.de>.
Michael Albinus [Wed, 21 Apr 2010 19:48:42 +0000 (21:48 +0200)]
Fix Bug#5840.
* icomplete.el (icomplete-completions): Use `non-essential'.
* net/tramp.el (tramp-connectable-p): New defun.
(tramp-handle-expand-file-name)
(tramp-completion-handle-file-name-all-completions)
(tramp-completion-handle-file-name-completion): Use it.
Dan Nicolaescu [Wed, 21 Apr 2010 19:32:54 +0000 (12:32 -0700)]
Clean up HP-UX files.
* m/hp800.h (NO_REMAP, VIRT_ADDR_VARIES, DATA_SEG_BITS)
(DATA_START, TEXT_START, LOAD_AVE_TYPE, LOAD_AVE_CVT)
(LDAV_SYMBOL, index, rindex): Move definitions only used in HP-UX ...
* s/hpux10-20.h: ... to the only user, here.
Eli Zaretskii [Wed, 21 Apr 2010 17:59:39 +0000 (20:59 +0300)]
Fix bug #5992.
bidi.c (bidi_find_paragraph_start, bidi_at_paragraph_end): Don't
use buffer-local values of paragraph-start and paragraph-separate.
<paragraph_start_re, paragraph_separate_re>: Rename from
fallback_paragraph_start_re and fallback_paragraph_separate_re.
Jan Djärv [Tue, 20 Apr 2010 18:52:07 +0000 (20:52 +0200)]
Gtk tool bars can be text, icons with text or just icons.
* xsettings.c: Qmonospace_font_name, Qtool_bar_style and
current_tool_bar_style are new.
(store_config_changed_event): Rename from store_font_changed_event.
(XSETTINGS_TOOL_BAR_STYLE): New define.
(SEEN_FONT, SEEN_TB_STYLE): New enum values.
(struct xsettings): Add font and tb_style, set xft stuff inside #ifdef
HAVE_XFT.
(something_changedCB): store_font_changed_event is now
store_config_changed_event
(parse_settings): Rename from parse_xft_settings. Read
non-xft xsettings outside #ifdef HAVE_XFT.
(read_settings): Renamed from read_xft_settings.
(apply_xft_settings): Take current settings as parameter. Do not
call read_(xft)_settings.
(read_and_apply_settings): New function.
(xft_settings_event): Do non-xft stuff out of HAVE_XFT. Call
read_and_apply_settings if there are settings to be read.
(init_xsettings): Renamed from init_xfd_settings.
Call read_and_apply_settings unconditionally.
(xsettings_initialize): Call init_xsettings.
(Ftool_bar_get_system_style): New function.
(syms_of_xsettings): Define Qmonospace_font_name and
Qtool_bar_style. Initialize current_tool_bar_style to nil.
defsubr Stool_bar_get_system_style. Fprovide on
dynamic-setting.
* keyboard.c: QClabel is new.
(parse_tool_bar_item): Take out QClabel from tool bar items.
Try to construct a label if ther is no QClabel.
(syms_of_keyboard): Intern :label as QClabel.
* dispextern.h (tool_bar_item_idx): TOOL_BAR_ITEM_LABEL is new.
(Vtool_bar_style, tool_bar_max_label_size, DEFAULT_TOOL_BAR_LABEL_SIZE):
New.
* Makefile.in (SOME_MACHINE_LISP): font-setting.el renamed to
dynamic-setting.el.
* gtkutil.c (xg_tool_bar_menu_proxy): Handle label in tool bar item.
(xg_make_tool_item, xg_show_toolbar_item): New function.
(update_frame_tool_bar): Take label from TOOL_BAR_ITEM_LABEL.
Call xg_make_tool_item to make a tool bar item.
Call xg_show_toolbar_item. Use wtoolbar instead of x->toolbar_widget.
* xterm.c (x_draw_image_relief): Take Vtool_bar_button_margin
into account for toolbars.
* vc-dir.el (vc-dir-tool-bar-map): Add :label on some tool bar items.
* tool-bar.el (tool-bar-setup): Add :label on some tool bar items.
* loadup.el: Load dynamic-setting.el if feature dynamic-setting
is present.
* info.el (info-tool-bar-map): Add labels.
* cus-start.el (all): Add tool-bar-style and tool-bar-max-label-size.
* cus-edit.el (custom-commands): Add labels for tool bar.
(custom-buffer-create-internal, Custom-mode): Adjust for
labels in custom-commands.
* dynamic-setting.el: Renamed from font-setting.el.
Leo Liu [Wed, 21 Apr 2010 11:00:58 +0000 (07:00 -0400)]
Added C-o keybinding to toggle use of virtual buffers
* ido.el (ido-init-completion-maps): For ido-switch-buffer, C-o
toggles the use of virtual buffers.
(ido-buffer-internal): Guard `ido-use-virtual-buffers' global
value.
(ido-toggle-virtual-buffers): New function.