# HG changeset patch # User Katsumi Yamaoka # Date 1270208170 0 # Node ID ede2e6005460b6c5ff9a673170ddfae73e6e4a81 # Parent 763c361da2e2b1380e9e33f2af96f811bad09fcb# Parent accaa16963c3d0a3a05e592ae077a328795b1ffb Merge from mainline. diff -r 763c361da2e2 -r ede2e6005460 ChangeLog --- a/ChangeLog Thu Apr 01 21:55:28 2010 +0000 +++ b/ChangeLog Fri Apr 02 11:36:10 2010 +0000 @@ -1,3 +1,7 @@ +2010-04-01 Dan Nicolaescu + + * configure.in: Remove all references to LIBX11_SYSTEM. + 2010-03-30 Dan Nicolaescu * configure.in: Remove all references to C_DEBUG_SWITCH. diff -r 763c361da2e2 -r ede2e6005460 admin/CPP-DEFINES --- a/admin/CPP-DEFINES Thu Apr 01 21:55:28 2010 +0000 +++ b/admin/CPP-DEFINES Fri Apr 02 11:36:10 2010 +0000 @@ -234,7 +234,6 @@ LIBS_MACHINE LIBS_SYSTEM LIBS_TERMCAP -LIBX11_SYSTEM LIBXMU LIB_GCC LIB_MATH diff -r 763c361da2e2 -r ede2e6005460 admin/ChangeLog --- a/admin/ChangeLog Thu Apr 01 21:55:28 2010 +0000 +++ b/admin/ChangeLog Fri Apr 02 11:36:10 2010 +0000 @@ -1,6 +1,6 @@ 2010-04-01 Eli Zaretskii - * CPP-DEFINES (__DJGPP__, __GO32__): Remove, o longer used. + * CPP-DEFINES (__DJGPP__, __GO32__): Remove, no longer used. 2010-03-10 Chong Yidong diff -r 763c361da2e2 -r ede2e6005460 configure --- a/configure Thu Apr 01 21:55:28 2010 +0000 +++ b/configure Fri Apr 02 11:36:10 2010 +0000 @@ -5796,10 +5796,7 @@ #define LIB_X11_LIB -lX11 #endif -#ifndef LIBX11_SYSTEM -#define LIBX11_SYSTEM -#endif -configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM +configure___ LIBX=LIB_X11_LIB #ifdef UNEXEC configure___ unexec=UNEXEC diff -r 763c361da2e2 -r ede2e6005460 configure.in --- a/configure.in Thu Apr 01 21:55:28 2010 +0000 +++ b/configure.in Fri Apr 02 11:36:10 2010 +0000 @@ -865,10 +865,7 @@ #define LIB_X11_LIB -lX11 #endif -#ifndef LIBX11_SYSTEM -#define LIBX11_SYSTEM -#endif -configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM +configure___ LIBX=LIB_X11_LIB #ifdef UNEXEC configure___ unexec=UNEXEC diff -r 763c361da2e2 -r ede2e6005460 lib-src/ChangeLog --- a/lib-src/ChangeLog Thu Apr 01 21:55:28 2010 +0000 +++ b/lib-src/ChangeLog Fri Apr 02 11:36:10 2010 +0000 @@ -1,3 +1,10 @@ +2010-04-02 Dan Nicolaescu + + Remove extern errno declarations. + * movemail.c: + * etags.c: + * emacsclient.c: Remove extern errno declarations. + 2010-03-20 Glenn Morris * Makefile.in (KRB4LIB, DESLIB, KRB5LIB, CRYPTOLIB, COM_ERRLIB) diff -r 763c361da2e2 -r ede2e6005460 lib-src/emacsclient.c --- a/lib-src/emacsclient.c Thu Apr 01 21:55:28 2010 +0000 +++ b/lib-src/emacsclient.c Fri Apr 02 11:36:10 2010 +0000 @@ -723,7 +723,6 @@ #define SEND_BUFFER_SIZE 4096 extern char *strerror (); -extern int errno; /* Buffer to accumulate data to send in TCP connections. */ char send_buffer[SEND_BUFFER_SIZE + 1]; diff -r 763c361da2e2 -r ede2e6005460 lib-src/etags.c --- a/lib-src/etags.c Thu Apr 01 21:55:28 2010 +0000 +++ b/lib-src/etags.c Fri Apr 02 11:36:10 2010 +0000 @@ -188,9 +188,6 @@ #include #include #include -#ifndef errno - extern int errno; -#endif #include #include diff -r 763c361da2e2 -r ede2e6005460 lib-src/movemail.c --- a/lib-src/movemail.c Thu Apr 01 21:55:28 2010 +0000 +++ b/lib-src/movemail.c Fri Apr 02 11:36:10 2010 +0000 @@ -140,9 +140,6 @@ #endif #endif -#ifndef errno -extern int errno; -#endif char *strerror (); #ifdef HAVE_INDEX extern char *index __P ((const char *, int)); diff -r 763c361da2e2 -r ede2e6005460 lisp/ChangeLog --- a/lisp/ChangeLog Thu Apr 01 21:55:28 2010 +0000 +++ b/lisp/ChangeLog Fri Apr 02 11:36:10 2010 +0000 @@ -1,3 +1,8 @@ +2010-04-02 Jan Djärv + + * tmm.el (tmm-get-keymap): Check with symbolp before passing + value to fboundp, it may not be a symbol. + 2010-03-31 Chong Yidong * cus-edit.el (custom-buffer-sort-alphabetically): Update diff -r 763c361da2e2 -r ede2e6005460 lisp/tmm.el --- a/lisp/tmm.el Thu Apr 01 21:55:28 2010 +0000 +++ b/lisp/tmm.el Fri Apr 02 11:36:10 2010 +0000 @@ -452,20 +452,21 @@ (unless (assoc event tmm-table-undef) (cond ((if (listp elt) (or (keymapp elt) (eq (car elt) 'lambda)) - (fboundp elt)) + (and (symbolp elt) (fboundp elt))) (setq km elt)) ((if (listp (cdr-safe elt)) (or (keymapp (cdr-safe elt)) (eq (car (cdr-safe elt)) 'lambda)) - (fboundp (cdr-safe elt))) + (and (symbolp (cdr-safe elt)) (fboundp (cdr-safe elt)))) (setq km (cdr elt)) (and (stringp (car elt)) (setq str (car elt)))) ((if (listp (cdr-safe (cdr-safe elt))) (or (keymapp (cdr-safe (cdr-safe elt))) (eq (car (cdr-safe (cdr-safe elt))) 'lambda)) - (fboundp (cdr-safe (cdr-safe elt)))) + (and (symbolp (cdr-safe (cdr-safe elt)) + (fboundp (cdr-safe (cdr-safe elt)))))) (setq km (cddr elt)) (and (stringp (car elt)) (setq str (car elt))) (and str @@ -499,7 +500,8 @@ ((if (listp (cdr-safe (cdr-safe (cdr-safe elt)))) (or (keymapp (cdr-safe (cdr-safe (cdr-safe elt)))) (eq (car (cdr-safe (cdr-safe (cdr-safe elt)))) 'lambda)) - (fboundp (cdr-safe (cdr-safe (cdr-safe elt))))) + (and (symbolp (cdr-safe (cdr-safe (cdr-safe elt)))) + (fboundp (cdr-safe (cdr-safe (cdr-safe elt)))))) ; New style of easy-menu (setq km (cdr (cddr elt))) (and (stringp (car elt)) (setq str (car elt))) diff -r 763c361da2e2 -r ede2e6005460 src/ChangeLog --- a/src/ChangeLog Thu Apr 01 21:55:28 2010 +0000 +++ b/src/ChangeLog Fri Apr 02 11:36:10 2010 +0000 @@ -1,26 +1,56 @@ +2010-04-02 Dan Nicolaescu + + Remove extern errno declarations. + * xterm.c: + * xrdb.c: + * w32term.c: + * unexec.c: + * unexaix.c: + * sysdep.c: + * process.c: + * lread.c: + * keyboard.c: + * floatfns.c: + * filelock.c: + * fileio.c: + * emacs.c (main): + * ecrt0.c: + * dispnew.c: + * callproc.c: + * buffer.c: Remove errno extern declarations. + * s/netbsd.h (NEED_ERRNO): Remove. + +2010-04-01 Dan Nicolaescu + + Remove all uses of LIBX11_SYSTEM. + * Makefile.in (LIBX11_SYSTEM): Remove. + * s/msdos.h (LIBX11_SYSTEM): Do not define, define LIBS_SYSTEM + instead. + 2010-04-01 Eli Zaretskii Remove support for DJGPP v1.x (bug#5813). * w16select.c (__dpmi_int): Remove DJGPP v1.x compatibility. - * s/msdos.h: - * unexec.c (make_hdr, copy_text_and_data): - * sysdep.c (wait_for_termination, sys_subshell): + * s/msdos.h: + * unexec.c (make_hdr, copy_text_and_data): + * sysdep.c (wait_for_termination, sys_subshell): * msdos.c (dos_set_window_size, msdos_set_cursor_shape) - (IT_set_terminal_modes): - (__write, _rename, gethostname, gettimeofday, alarm, fork, kill) - (dos_ttraw, dos_ttcooked, run_msdos_command, abort): Remove DJGPP - v1.x code and tests of the value of __DJGPP__. + (IT_set_terminal_modes, __write, _rename, gethostname) + (gettimeofday, alarm, fork, kill, dos_ttraw, dos_ttcooked) + (run_msdos_command, abort): Remove DJGPP v1.x code and tests of + the value of __DJGPP__. (nice, pause, sigsetmask, sigblock): Remove DJGPP v1.x compatibility code. - - * lread.c: - * gmalloc.c (memalign): - * fileio.c (Fcopy_file, check_executable, Ffile_modes): - * emacs.c (main): - * dosfns.c (init_dosfns): + * lread.c: + * gmalloc.c (memalign): + * fileio.c (Fcopy_file, check_executable, Ffile_modes): + * emacs.c (main): + * dosfns.c (init_dosfns): * dired.c (file_name_completion_stat): Remove tests of __DJGPP__. +2010-04-01 Eli Zaretskii + * xdisp.c (set_cursor_from_row): Fix cursor positioning when the string with `cursor' property comes from an `after-string' overlay. (Bug#5816) diff -r 763c361da2e2 -r ede2e6005460 src/Makefile.in --- a/src/Makefile.in Thu Apr 01 21:55:28 2010 +0000 +++ b/src/Makefile.in Fri Apr 02 11:36:10 2010 +0000 @@ -284,10 +284,6 @@ #endif $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $< -#ifndef LIBX11_SYSTEM -#define LIBX11_SYSTEM -#endif - #ifndef LIB_X11_LIB #define LIB_X11_LIB -lX11 #endif @@ -376,7 +372,7 @@ /* LD_SWITCH_X_DEFAULT comes after everything else that specifies options for where to find X libraries, but before those libraries. */ X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT -LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) $(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) LIB_X11_LIB LIBX11_SYSTEM $(XFT_LIBS) +LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) $(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) LIB_X11_LIB $(XFT_LIBS) #else /* not HAVE_X11 */ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE #endif /* not HAVE_X11 */ diff -r 763c361da2e2 -r ede2e6005460 src/buffer.c --- a/src/buffer.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/buffer.c Fri Apr 02 11:36:10 2010 +0000 @@ -28,11 +28,6 @@ #include #include -#ifndef USE_CRT_DLL -extern int errno; -#endif - - #ifdef HAVE_UNISTD_H #include #endif @@ -4627,7 +4622,6 @@ #endif #include -#include #if MAP_ANON == 0 #include diff -r 763c361da2e2 -r ede2e6005460 src/callproc.c --- a/src/callproc.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/callproc.c Fri Apr 02 11:36:10 2010 +0000 @@ -25,10 +25,6 @@ #include #include -#ifndef USE_CRT_DLL -extern int errno; -#endif - /* Define SIGCHLD as an alias for SIGCLD. */ #if !defined (SIGCHLD) && defined (SIGCLD) @@ -61,7 +57,6 @@ #include #include #include -#include #endif /* MSDOS */ #ifndef O_RDONLY diff -r 763c361da2e2 -r ede2e6005460 src/dispnew.c --- a/src/dispnew.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/dispnew.c Fri Apr 02 11:36:10 2010 +0000 @@ -5809,9 +5809,6 @@ int signalnum; /* some compilers complain in signal calls. */ { int width, height; -#ifndef USE_CRT_DLL - extern int errno; -#endif int old_errno = errno; struct tty_display_info *tty; diff -r 763c361da2e2 -r ede2e6005460 src/ecrt0.c --- a/src/ecrt0.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/ecrt0.c Fri Apr 02 11:36:10 2010 +0000 @@ -59,10 +59,6 @@ int data_start = 0; -#ifdef NEED_ERRNO -int errno; -#endif - #ifndef MSDOS char **environ; #endif diff -r 763c361da2e2 -r ede2e6005460 src/emacs.c --- a/src/emacs.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/emacs.c Fri Apr 02 11:36:10 2010 +0000 @@ -756,9 +756,6 @@ char stack_bottom_variable; int do_initial_setlocale; int skip_args = 0; -#ifndef USE_CRT_DLL - extern int errno; -#endif #ifdef HAVE_SETRLIMIT struct rlimit rlim; #endif diff -r 763c361da2e2 -r ede2e6005460 src/fileio.c --- a/src/fileio.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/fileio.c Fri Apr 02 11:36:10 2010 +0000 @@ -53,12 +53,6 @@ #include #include -#ifndef vax11c -#ifndef USE_CRT_DLL -extern int errno; -#endif -#endif - #include "lisp.h" #include "intervals.h" #include "buffer.h" diff -r 763c361da2e2 -r ede2e6005460 src/filelock.c --- a/src/filelock.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/filelock.c Fri Apr 02 11:36:10 2010 +0000 @@ -47,9 +47,6 @@ #endif /* __FreeBSD__ */ #include -#ifndef errno -extern int errno; -#endif #include "lisp.h" #include "buffer.h" diff -r 763c361da2e2 -r ede2e6005460 src/floatfns.c --- a/src/floatfns.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/floatfns.c Fri Apr 02 11:36:10 2010 +0000 @@ -99,10 +99,6 @@ #ifdef FLOAT_CHECK_ERRNO # include - -#ifndef USE_CRT_DLL -extern int errno; -#endif #endif #ifdef FLOAT_CATCH_SIGILL diff -r 763c361da2e2 -r ede2e6005460 src/keyboard.c --- a/src/keyboard.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/keyboard.c Fri Apr 02 11:36:10 2010 +0000 @@ -79,10 +79,6 @@ #include "nsterm.h" #endif -#ifndef USE_CRT_DLL -extern int errno; -#endif - /* Variables for blockinput.h: */ /* Non-zero if interrupt input is blocked right now. */ diff -r 763c361da2e2 -r ede2e6005460 src/lread.c --- a/src/lread.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/lread.c Fri Apr 02 11:36:10 2010 +0000 @@ -73,10 +73,6 @@ #define file_tell ftell #endif -#ifndef USE_CRT_DLL -extern int errno; -#endif - /* hash table read constants */ Lisp_Object Qhash_table, Qdata; Lisp_Object Qtest, Qsize; diff -r 763c361da2e2 -r ede2e6005460 src/process.c --- a/src/process.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/process.c Fri Apr 02 11:36:10 2010 +0000 @@ -195,10 +195,6 @@ extern void serial_configure (struct Lisp_Process *p, Lisp_Object contact); #endif -#ifndef USE_CRT_DLL -extern int errno; -#endif - #ifndef HAVE_H_ERRNO extern int h_errno; #endif diff -r 763c361da2e2 -r ede2e6005460 src/s/msdos.h --- a/src/s/msdos.h Thu Apr 01 21:55:28 2010 +0000 +++ b/src/s/msdos.h Fri Apr 02 11:36:10 2010 +0000 @@ -149,7 +149,7 @@ commentary below, in the non-X branch. The 140KB number was measured on GNU/Linux and on MS-WIndows. */ #define SYSTEM_PURESIZE_EXTRA (-170000+140000) -#define LIBX11_SYSTEM -lxext -lsys +#define LIBS_SYSTEM -lxext -lsys #else /* We need a little extra space, see ../../lisp/loadup.el. As of 20091024, DOS-specific files use up 62KB of pure space. But diff -r 763c361da2e2 -r ede2e6005460 src/s/netbsd.h --- a/src/s/netbsd.h Thu Apr 01 21:55:28 2010 +0000 +++ b/src/s/netbsd.h Fri Apr 02 11:36:10 2010 +0000 @@ -28,8 +28,6 @@ #define LIBS_TERMCAP -ltermcap -#define NEED_ERRNO - #define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1 #undef LIB_GCC diff -r 763c361da2e2 -r ede2e6005460 src/sysdep.c --- a/src/sysdep.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/sysdep.c Fri Apr 02 11:36:10 2010 +0000 @@ -94,12 +94,6 @@ extern unsigned start __asm__ ("start"); #endif -#ifndef USE_CRT_DLL -#ifndef errno -extern int errno; -#endif -#endif - #include #ifdef HAVE_FCNTL_H diff -r 763c361da2e2 -r ede2e6005460 src/unexaix.c --- a/src/unexaix.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/unexaix.c Fri Apr 02 11:36:10 2010 +0000 @@ -435,7 +435,6 @@ { int i, nwrite, ret; char buf[80]; - extern int errno; char zeros[UnexBlockSz]; for (i = 0; ptr < end;) diff -r 763c361da2e2 -r ede2e6005460 src/unexec.c --- a/src/unexec.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/unexec.c Fri Apr 02 11:36:10 2010 +0000 @@ -466,9 +466,6 @@ { register int i, nwrite, ret; char buf[80]; -#ifndef USE_CRT_DLL - extern int errno; -#endif /* This is the normal amount to write at once. It is the size of block that NFS uses. */ int writesize = 1 << 13; diff -r 763c361da2e2 -r ede2e6005460 src/w32term.c --- a/src/w32term.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/w32term.c Fri Apr 02 11:36:10 2010 +0000 @@ -228,10 +228,6 @@ extern Lisp_Object Vcommand_line_args, Vsystem_name; -#ifndef USE_CRT_DLL -extern int errno; -#endif - /* A mask of extra modifier bits to put into every keyboard char. */ extern EMACS_INT extra_keyboard_modifiers; diff -r 763c361da2e2 -r ede2e6005460 src/xdisp.c --- a/src/xdisp.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/xdisp.c Fri Apr 02 11:36:10 2010 +0000 @@ -12606,7 +12606,8 @@ } if (INTEGERP (glyph->object) && glyph->charpos < 0) --glyph; - /* By default, put the cursor on the rightmost glyph. */ + /* By default, in reversed rows we put the cursor on the + rightmost (first in the reading order) glyph. */ for (g = end + 1; g < glyph; g++) x += g->pixel_width; cursor_x = x; @@ -12683,7 +12684,16 @@ bpos_covered = bpos_max + XINT (chprop); /* If the `cursor' property covers buffer positions up to and including point, we should display cursor on - this glyph. */ + this glyph. Note that overlays and text properties + with string values stop bidi reordering, so every + buffer position to the left of the string is always + smaller than any position to the right of the + string. Therefore, if a `cursor' property on one + of the string's characters has an integer value, we + will break out of the loop below _before_ we get to + the position match above. IOW, integer values of + the `cursor' property override the "exact match for + point" strategy of positioning the cursor. */ /* Implementation note: bpos_max == pt_old when, e.g., we are in an empty line, where bpos_max is set to MATRIX_ROW_START_CHARPOS, see above. */ diff -r 763c361da2e2 -r ede2e6005460 src/xrdb.c --- a/src/xrdb.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/xrdb.c Fri Apr 02 11:36:10 2010 +0000 @@ -28,6 +28,7 @@ #include #endif +#include #include #include @@ -734,8 +735,6 @@ char *msg, *prog; int x1, x2, x3, x4, x5; { - extern int errno; - if (errno) perror (prog); diff -r 763c361da2e2 -r ede2e6005460 src/xterm.c --- a/src/xterm.c Thu Apr 01 21:55:28 2010 +0000 +++ b/src/xterm.c Fri Apr 02 11:36:10 2010 +0000 @@ -309,8 +309,6 @@ extern Lisp_Object Qeql; -extern int errno; - /* A mask of extra modifier bits to put into every keyboard char. */ extern EMACS_INT extra_keyboard_modifiers;