Hopefully fix bug#6065.
* configure.in (OTHER_OBJ): Always include vm-limit.o on Cygwin.
Elsewhere, maybe include it.
* src/Makefile.in (vmlimitobj) [!SYSTEM_MALLOC]: New variable.
(OTHER_OBJ): Define as a separate variable, for clarity.
* configure.in (TOOLKIT_LIBW) [HAVE_GTK]: Set to $GTK_LIBS.
(OLDXMENU, LIBXMENU): New output variables.
* src/Makefile.in (OLDXMENU, LIBXMENU) [HAVE_MENUS]:
Set with configure, not cpp.
(LIBW): Remove, replace with $TOOLKIT_LIBW.
Replace some cpp with autoconf.
* configure.in (OTHER_OBJ): New output variable.
* src/Makefile.in (mallocobj): Remove.
(otherobj): Simplify using @OTHER_OBJ@.
* minibuffer.el (tags-completion-at-point-function): New function.
(completion-at-point-functions): Use it.
* cedet/semantic.el (semantic-completion-at-point-function): New function.
(semantic-mode): Use semantic-completion-at-point-function for
completion-at-point-functions instead.
* progmodes/etags.el (complete-tag): Revert last change.
Stefan Monnier [Thu, 29 Apr 2010 14:29:09 +0000 (10:29 -0400)]
Don't burp if process sentinel/filter kills the current buffer.
* process.c (read_process_output, exec_sentinel): Don't burp if the
sentinel/filter kills the current buffer.
Stefan Monnier [Thu, 29 Apr 2010 12:42:01 +0000 (08:42 -0400)]
Fix wrong-docstring problem introduced with hash-consing.
* eval.c (Fautoload): Set doc to a unique number rather than to 0.
Remove unused var `args'.
* lisp.h (XSETCARFASTINT, XSETCDRFASTINT): Remove.
(LOADHIST_ATTACH): Wrap with do...while to avoid surprises for callers.
* doc.c (store_function_docstring): Use XSETCAR.
* bindings.el (complete-symbol): Move into minibuffer.el.
* minibuffer.el (complete-tag): Move from etags.el. If tags
completion cannot be performed, return nil instead of signalling
an error.
(completion-at-point): Make it an alias for complete-symbol.
(complete-symbol): Move from bindings.el, and replace with the
body of completion-at-point.
* progmodes/etags.el (complete-tag): Move to minibuffer.el.
* cedet/semantic.el (semantic-mode): When enabled, add
semantic-ia-complete-symbol to completion-at-point-functions.
* cedet/semantic/ia.el (semantic-ia-complete-symbol): Return nil
if Semantic is not active.
Stefan Monnier [Wed, 28 Apr 2010 15:18:37 +0000 (11:18 -0400)]
Make it possible to locally disable a globally enabled mode.
* simple.el (fundamental-mode): Run fundamental-mode-hook.
* emacs-lisp/derived.el (define-derived-mode): Use fundamental-mode
rather than kill-all-local-variables so it runs fundamental-mode-hook.
* emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Use fundamental-mode-hook to run MODE-enable-in-buffers earlier, so
that subsequent hooks get a chance to disable it.
src/Makefile.in minor simplification,
* src/Makefile.in (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT): New variables.
(WINDOW_SUPPORT) [HAVE_WINDOW_SYSTEM]: Use them.
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.