Now on revision 110610. ------------------------------------------------------------ revno: 110610 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-10-20 18:35:46 -0700 message: Put back old Emacs 22 icons, just don't install them Some people prefer them to the newer icon * Makefile.in (install-etc): Don't install emacs22 icons. * etc/images/icons/hicolor/32x32/apps/emacs22.png: * etc/images/icons/hicolor/16x16/apps/emacs22.png: * etc/images/icons/hicolor/48x48/apps/emacs22.png: * etc/images/icons/hicolor/24x24/apps/emacs22.png: Restore old icons. * etc/images/icons/README: Restore info about emacs22 icons diff: === modified file 'ChangeLog' --- ChangeLog 2012-10-21 01:27:09 +0000 +++ ChangeLog 2012-10-21 01:35:46 +0000 @@ -1,5 +1,7 @@ 2012-10-21 Glenn Morris + * Makefile.in (install-etc): Don't install emacs22 icons. + * Makefile.in (emacs_transform): New variable. (install-etc): Prefer a make variable to a shell variable. === modified file 'Makefile.in' --- Makefile.in 2012-10-21 01:27:09 +0000 +++ Makefile.in 2012-10-21 01:35:46 +0000 @@ -648,7 +648,7 @@ for dir in */*/apps */*/mimetypes; do \ [ -d $${dir} ] || continue ; \ ( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \ - for icon in $${dir}/*.*; do \ + for icon in $${dir}/emacs[.-]*; do \ [ -r $${icon} ] || continue ; \ dest=`echo "$${icon}" | sed -e 's|.*/||' -e '$(TRANSFORM)'` ; \ ( cd $${thisdir}; \ === modified file 'etc/ChangeLog' --- etc/ChangeLog 2012-10-14 08:06:11 +0000 +++ etc/ChangeLog 2012-10-21 01:35:46 +0000 @@ -1,3 +1,10 @@ +2012-10-21 Glenn Morris + + * images/icons/hicolor/32x32/apps/emacs22.png: + * images/icons/hicolor/16x16/apps/emacs22.png: + * images/icons/hicolor/48x48/apps/emacs22.png: + * images/icons/hicolor/24x24/apps/emacs22.png: Restore old icons. + 2012-10-14 Kenichi Handa * charsets/JISC6226.map: Re-generated. @@ -9,12 +16,12 @@ 2012-10-11 Kenichi Handa - * charsets/CNS-2.map, charsets/CNS-3.map, charsets/CNS-4.map, - charsets/CNS-5.map, charsets/CNS-6.map, charsets/CNS-7.map, - charsets/CP932-2BYTE.map, charsets/GB180302.map, - charsets/GB180304.map, charsets/JISC6226.map, - charsets/JISX2131.map, charsets/MIK.map, charsets/PTCP154.map, - charsets/stdenc.map, charsets/symbol.map: Re-generated. + * charsets/CNS-2.map, charsets/CNS-3.map, charsets/CNS-4.map: + * charsets/CNS-5.map, charsets/CNS-6.map, charsets/CNS-7.map: + * charsets/CP932-2BYTE.map, charsets/GB180302.map: + * charsets/GB180304.map, charsets/JISC6226.map: + * charsets/JISX2131.map, charsets/MIK.map, charsets/PTCP154.map: + * charsets/stdenc.map, charsets/symbol.map: Re-generate. 2012-10-07 Jan Djärv === modified file 'etc/images/icons/README' --- etc/images/icons/README 2012-10-01 06:59:22 +0000 +++ etc/images/icons/README 2012-10-21 01:35:46 +0000 @@ -9,6 +9,13 @@ License: GNU General Public License version 3 or later (see COPYING) +Files: hicolor/16x16/apps/emacs22.png hicolor/24x24/apps/emacs22.png + hicolor/32x32/apps/emacs22.png hicolor/48x48/apps/emacs22.png + +Author: Andrew Zhilin +Copyright (C) 2005-2012 Free Software Foundation, Inc. +License: GNU General Public License version 3 or later (see COPYING) + Files: allout-widgets-dark-bg/closed.png allout-widgets-dark-bg/closed.xpm allout-widgets-dark-bg/empty.png === added file 'etc/images/icons/hicolor/16x16/apps/emacs22.png' Binary files etc/images/icons/hicolor/16x16/apps/emacs22.png 1970-01-01 00:00:00 +0000 and etc/images/icons/hicolor/16x16/apps/emacs22.png 2012-10-21 01:35:46 +0000 differ === added file 'etc/images/icons/hicolor/24x24/apps/emacs22.png' Binary files etc/images/icons/hicolor/24x24/apps/emacs22.png 1970-01-01 00:00:00 +0000 and etc/images/icons/hicolor/24x24/apps/emacs22.png 2012-10-21 01:35:46 +0000 differ === added file 'etc/images/icons/hicolor/32x32/apps/emacs22.png' Binary files etc/images/icons/hicolor/32x32/apps/emacs22.png 1970-01-01 00:00:00 +0000 and etc/images/icons/hicolor/32x32/apps/emacs22.png 2012-10-21 01:35:46 +0000 differ === added file 'etc/images/icons/hicolor/48x48/apps/emacs22.png' Binary files etc/images/icons/hicolor/48x48/apps/emacs22.png 1970-01-01 00:00:00 +0000 and etc/images/icons/hicolor/48x48/apps/emacs22.png 2012-10-21 01:35:46 +0000 differ ------------------------------------------------------------ revno: 110609 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-10-20 18:27:09 -0700 message: In Makefile.in, use a make variable rather than a shell variable. * Makefile.in (emacs_transform): New variable. (install-etc): Prefer a make variable to a shell variable. diff: === modified file 'ChangeLog' --- ChangeLog 2012-10-19 19:25:18 +0000 +++ ChangeLog 2012-10-21 01:27:09 +0000 @@ -1,3 +1,8 @@ +2012-10-21 Glenn Morris + + * Makefile.in (emacs_transform): New variable. + (install-etc): Prefer a make variable to a shell variable. + 2012-10-18 Stefan Monnier * Makefile.in ($(MAKEFILE_NAME)): Depend on src/lisp.mk as well. === modified file 'Makefile.in' --- Makefile.in 2012-10-18 12:56:10 +0000 +++ Makefile.in 2012-10-21 01:27:09 +0000 @@ -631,14 +631,17 @@ done ## Install those items from etc/ that need to end up elsewhere. + +# Like EMACS, but without EXEEXT. +emacs_transform = `echo emacs | sed '$(TRANSFORM)'` + install-etc: umask 022; ${MKDIR_P} $(DESTDIR)${desktopdir} - dest=`echo emacs | sed '$(TRANSFORM)'`; \ tmp=etc/emacs.tmpdesktop; rm -f $${tmp}; \ - sed -e "/^Exec=emacs/ s/emacs/$${dest}/" \ - -e "/^Icon=emacs/ s/emacs/$${dest}/" \ + sed -e '/^Exec=emacs/ s/emacs/${emacs_transform}/' \ + -e '/^Icon=emacs/ s/emacs/${emacs_transform}/' \ ${srcdir}/etc/emacs.desktop > $${tmp}; \ - ${INSTALL_DATA} $${tmp} $(DESTDIR)${desktopdir}/$${dest}.desktop; \ + ${INSTALL_DATA} $${tmp} $(DESTDIR)${desktopdir}/${emacs_transform}.desktop; \ rm -f $${tmp} thisdir=`/bin/pwd`; \ cd ${iconsrcdir} || exit 1; umask 022 ; \ ------------------------------------------------------------ revno: 110608 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-10-20 18:19:46 -0700 message: Recognize that cp51932.el and eucjp-ms.el are loaded during dumping * src/lisp.mk (lisp): Add cp51932.el and eucjp-ms.el. * lib-src/make-docfile.c (scan_lisp_file): Add cp51932.el and eucjp-ms.el. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-10-20 15:26:10 +0000 +++ lib-src/ChangeLog 2012-10-21 01:19:46 +0000 @@ -1,3 +1,7 @@ +2012-10-21 Glenn Morris + + * make-docfile.c (scan_lisp_file): Add cp51932.el and eucjp-ms.el. + 2012-10-20 Eli Zaretskii * make-docfile.c (IS_SLASH, DEF_ELISP_FILE): New macros. === modified file 'lib-src/make-docfile.c' --- lib-src/make-docfile.c 2012-10-20 15:26:10 +0000 +++ lib-src/make-docfile.c 2012-10-21 01:19:46 +0000 @@ -1118,7 +1118,9 @@ } const uncompiled[] = { DEF_ELISP_FILE (loaddefs.el), DEF_ELISP_FILE (loadup.el), - DEF_ELISP_FILE (charprop.el) + DEF_ELISP_FILE (charprop.el), + DEF_ELISP_FILE (cp51932.el), + DEF_ELISP_FILE (eucjp-ms.el) }; int i, match; size_t flen = strlen (filename); === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-20 21:30:51 +0000 +++ src/ChangeLog 2012-10-21 01:19:46 +0000 @@ -1,3 +1,7 @@ +2012-10-21 Glenn Morris + + * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el. + 2012-10-20 Paul Eggert Port to OpenBSD 5.1. === modified file 'src/lisp.mk' --- src/lisp.mk 2012-09-04 17:40:25 +0000 +++ src/lisp.mk 2012-10-21 01:19:46 +0000 @@ -35,7 +35,8 @@ ## no-byte-compile ones. ## Confusingly, term/internal is not in loadup, but is unconditionally -## loaded by pc-win, which is. +## loaded by pc-win, which is. Ditto for international/cp51932 and +## international/eucjp-ms, loaded from language/japanese. ## Note that this list should not include lisp files which might not ## be present, like site-load.el and site-init.el; this makefile @@ -94,6 +95,8 @@ $(lispsource)/language/greek.elc \ $(lispsource)/language/hebrew.elc \ $(lispsource)/language/japanese.elc \ + $(lispsource)/international/cp51932.el \ + $(lispsource)/international/eucjp-ms.el \ $(lispsource)/language/korean.elc \ $(lispsource)/language/lao.elc \ $(lispsource)/language/tai-viet.elc \ ------------------------------------------------------------ revno: 110607 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-10-20 14:30:51 -0700 message: Port to OpenBSD 5.1. * frame.c (Fmouse_position, Fmouse_pixel_position): * xdisp.c (produce_stretch_glyph): Declare local vars only when they're needed. This is clearer and avoids a warning on OpenBSD about unused vars. * frame.h (FRAME_WINDOW_P): Always evaluate its argument. This is safer, and avoids OpenBSD warnings about unused vars. * keyboard.c (record_menu_key): Remove unnecessary decl. (poll_timer): Define only if POLL_FOR_INPUT is defined. * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined, as our definition clashes with OpenBSD's. * xfaces.c (load_face_colors, check_lface_attrs) (get_lface_attributes_no_remap, get_lface_attributes) (lface_fully_specified_p, x_supports_face_attributes_p) (tty_supports_face_attributes_p, face_fontset, realize_face) (realize_x_face, realize_tty_face): Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not merely Lisp_Object *. This is more informative and avoids a warning on OpenBSD about accessing beyond an object's size. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-20 12:50:49 +0000 +++ src/ChangeLog 2012-10-20 21:30:51 +0000 @@ -1,3 +1,25 @@ +2012-10-20 Paul Eggert + + Port to OpenBSD 5.1. + * frame.c (Fmouse_position, Fmouse_pixel_position): + * xdisp.c (produce_stretch_glyph): + Declare local vars only when they're needed. + This is clearer and avoids a warning on OpenBSD about unused vars. + * frame.h (FRAME_WINDOW_P): Always evaluate its argument. + This is safer, and avoids OpenBSD warnings about unused vars. + * keyboard.c (record_menu_key): Remove unnecessary decl. + (poll_timer): Define only if POLL_FOR_INPUT is defined. + * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined, + as our definition clashes with OpenBSD's. + * xfaces.c (load_face_colors, check_lface_attrs) + (get_lface_attributes_no_remap, get_lface_attributes) + (lface_fully_specified_p, x_supports_face_attributes_p) + (tty_supports_face_attributes_p, face_fontset, realize_face) + (realize_x_face, realize_tty_face): + Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not + merely Lisp_Object *. This is more informative and avoids + a warning on OpenBSD about accessing beyond an object's size. + 2012-10-20 Chong Yidong * lread.c (Fload): Doc fix (Bug#12592). === modified file 'src/frame.c' --- src/frame.c 2012-10-09 17:58:18 +0000 +++ src/frame.c 2012-10-20 21:30:51 +0000 @@ -1501,10 +1501,7 @@ { FRAME_PTR f; Lisp_Object lispy_dummy; - enum scroll_bar_part party_dummy; Lisp_Object x, y, retval; - int col, row; - Time long_dummy; struct gcpro gcpro1; f = SELECTED_FRAME (); @@ -1513,14 +1510,19 @@ #if defined (HAVE_MOUSE) || defined (HAVE_GPM) /* It's okay for the hook to refrain from storing anything. */ if (FRAME_TERMINAL (f)->mouse_position_hook) - (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1, - &lispy_dummy, &party_dummy, - &x, &y, - &long_dummy); + { + enum scroll_bar_part party_dummy; + Time time_dummy; + (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1, + &lispy_dummy, &party_dummy, + &x, &y, + &time_dummy); + } + if (! NILP (x)) { - col = XINT (x); - row = XINT (y); + int col = XINT (x); + int row = XINT (y); pixel_to_glyph_coords (f, col, row, &col, &row, NULL, 1); XSETINT (x, col); XSETINT (y, row); @@ -1547,9 +1549,7 @@ { FRAME_PTR f; Lisp_Object lispy_dummy; - enum scroll_bar_part party_dummy; Lisp_Object x, y; - Time long_dummy; f = SELECTED_FRAME (); x = y = Qnil; @@ -1557,10 +1557,15 @@ #if defined (HAVE_MOUSE) || defined (HAVE_GPM) /* It's okay for the hook to refrain from storing anything. */ if (FRAME_TERMINAL (f)->mouse_position_hook) - (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1, - &lispy_dummy, &party_dummy, - &x, &y, - &long_dummy); + { + enum scroll_bar_part party_dummy; + Time time_dummy; + (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1, + &lispy_dummy, &party_dummy, + &x, &y, + &time_dummy); + } + #endif XSETFRAME (lispy_dummy, f); return Fcons (lispy_dummy, Fcons (x, y)); === modified file 'src/frame.h' --- src/frame.h 2012-10-07 22:31:58 +0000 +++ src/frame.h 2012-10-20 21:30:51 +0000 @@ -646,7 +646,7 @@ #define FRAME_WINDOW_P(f) FRAME_NS_P(f) #endif #ifndef FRAME_WINDOW_P -#define FRAME_WINDOW_P(f) (0) +#define FRAME_WINDOW_P(f) ((void) (f), 0) #endif /* Return a pointer to the structure holding information about the === modified file 'src/keyboard.c' --- src/keyboard.c 2012-10-10 20:09:47 +0000 +++ src/keyboard.c 2012-10-20 21:30:51 +0000 @@ -365,7 +365,6 @@ static Lisp_Object Qextended_command_history; EMACS_TIME timer_check (void); -static void record_menu_key (Lisp_Object c); static void echo_now (void); static ptrdiff_t echo_length (void); @@ -1963,13 +1962,13 @@ int poll_suppress_count; + +#ifdef POLL_FOR_INPUT + /* Asynchronous timer for polling. */ static struct atimer *poll_timer; - -#ifdef POLL_FOR_INPUT - /* Poll for input, so that we catch a C-g if it comes in. This function is called from x_make_frame_visible, see comment there. */ === modified file 'src/unexelf.c' --- src/unexelf.c 2012-05-21 15:36:54 +0000 +++ src/unexelf.c 2012-10-20 21:30:51 +0000 @@ -507,10 +507,12 @@ #ifndef ElfW # define ElfBitsW(bits, type) Elf##bits##_##type -# ifdef _LP64 -# define ELFSIZE 64 -# else -# define ELFSIZE 32 +# ifndef ELFSIZE +# ifdef _LP64 +# define ELFSIZE 64 +# else +# define ELFSIZE 32 +# endif # endif /* This macro expands `bits' before invoking ElfBitsW. */ # define ElfExpandBitsW(bits, type) ElfBitsW (bits, type) === modified file 'src/xdisp.c' --- src/xdisp.c 2012-10-17 13:30:56 +0000 +++ src/xdisp.c 2012-10-20 21:30:51 +0000 @@ -24076,17 +24076,16 @@ Lisp_Object prop, plist; int width = 0, height = 0, align_to = -1; int zero_width_ok_p = 0; - int ascent = 0; double tem; - struct face *face = NULL; struct font *font = NULL; #ifdef HAVE_WINDOW_SYSTEM + int ascent = 0; int zero_height_ok_p = 0; if (FRAME_WINDOW_P (it->f)) { - face = FACE_FROM_ID (it->f, it->face_id); + struct face *face = FACE_FROM_ID (it->f, it->face_id); font = face->font ? face->font : FRAME_FONT (it->f); PREPARE_FACE_FOR_DISPLAY (it->f, face); } === modified file 'src/xfaces.c' --- src/xfaces.c 2012-10-07 22:31:58 +0000 +++ src/xfaces.c 2012-10-20 21:30:51 +0000 @@ -1323,7 +1323,8 @@ try to emulate gray colors with a stipple from Vface_default_stipple. */ static void -load_face_colors (struct frame *f, struct face *face, Lisp_Object *attrs) +load_face_colors (struct frame *f, struct face *face, + Lisp_Object attrs[LFACE_VECTOR_SIZE]) { Lisp_Object fg, bg; @@ -1802,7 +1803,7 @@ /* Check consistency of Lisp face attribute vector ATTRS. */ static void -check_lface_attrs (Lisp_Object *attrs) +check_lface_attrs (Lisp_Object attrs[LFACE_VECTOR_SIZE]) { eassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX]) || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX]) @@ -2049,7 +2050,8 @@ static int get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name, - Lisp_Object *attrs, int signal_p) + Lisp_Object attrs[LFACE_VECTOR_SIZE], + int signal_p) { Lisp_Object lface; @@ -2071,7 +2073,7 @@ static int get_lface_attributes (struct frame *f, Lisp_Object face_name, - Lisp_Object *attrs, int signal_p, + Lisp_Object attrs[LFACE_VECTOR_SIZE], int signal_p, struct named_merge_point *named_merge_points) { Lisp_Object face_remapping; @@ -2108,7 +2110,7 @@ specified, i.e. are non-nil. */ static int -lface_fully_specified_p (Lisp_Object *attrs) +lface_fully_specified_p (Lisp_Object attrs[LFACE_VECTOR_SIZE]) { int i; @@ -4760,7 +4762,8 @@ \(2) `close in spirit' to what the attributes specify, if not exact. */ static int -x_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs, +x_supports_face_attributes_p (struct frame *f, + Lisp_Object attrs[LFACE_VECTOR_SIZE], struct face *def_face) { Lisp_Object *def_attrs = def_face->lface; @@ -4862,7 +4865,8 @@ substitution of a `dim' face for italic. */ static int -tty_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs, +tty_supports_face_attributes_p (struct frame *f, + Lisp_Object attrs[LFACE_VECTOR_SIZE], struct face *def_face) { int weight, slant; @@ -5245,7 +5249,7 @@ attribute of ATTRS doesn't name a fontset. */ static int -face_fontset (Lisp_Object *attrs) +face_fontset (Lisp_Object attrs[LFACE_VECTOR_SIZE]) { Lisp_Object name; @@ -5474,7 +5478,8 @@ face. Value is a pointer to the newly created realized face. */ static struct face * -realize_face (struct face_cache *cache, Lisp_Object *attrs, int former_face_id) +realize_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE], + int former_face_id) { struct face *face; @@ -5551,7 +5556,7 @@ created realized face. */ static struct face * -realize_x_face (struct face_cache *cache, Lisp_Object *attrs) +realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) { struct face *face = NULL; #ifdef HAVE_WINDOW_SYSTEM @@ -5878,7 +5883,8 @@ Value is a pointer to the newly created realized face. */ static struct face * -realize_tty_face (struct face_cache *cache, Lisp_Object *attrs) +realize_tty_face (struct face_cache *cache, + Lisp_Object attrs[LFACE_VECTOR_SIZE]) { struct face *face; int weight, slant; ------------------------------------------------------------ revno: 110606 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-10-20 17:26:10 +0200 message: Fix last changes in make-docfile.c. lib-src/make-docfile.c (IS_SLASH, DEF_ELISP_FILE): New macros. (scan_lisp_file): Only pass a .el file if its basename matches a known file in its entirety. Use IS_SLASH and DEF_ELISP_FILE. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-10-20 14:56:09 +0000 +++ lib-src/ChangeLog 2012-10-20 15:26:10 +0000 @@ -1,3 +1,9 @@ +2012-10-20 Eli Zaretskii + + * make-docfile.c (IS_SLASH, DEF_ELISP_FILE): New macros. + (scan_lisp_file): Only pass a .el file if its basename matches a + known file in its entirety. Use IS_SLASH and DEF_ELISP_FILE. + 2012-10-20 Andreas Schwab * make-docfile.c (scan_lisp_file): Add bounds checking. === modified file 'lib-src/make-docfile.c' --- lib-src/make-docfile.c 2012-10-20 13:28:42 +0000 +++ lib-src/make-docfile.c 2012-10-20 15:26:10 +0000 @@ -58,9 +58,11 @@ #undef chdir #define READ_TEXT "rt" #define READ_BINARY "rb" +#define IS_SLASH(c) ((c) == '/' || (c) == '\\' || (c) == ':') #else /* not DOS_NT */ #define READ_TEXT "r" #define READ_BINARY "r" +#define IS_SLASH(c) ((c) == '/') #endif /* not DOS_NT */ static int scan_file (char *filename); @@ -1098,6 +1100,8 @@ return 1; } +#define DEF_ELISP_FILE(fn) { #fn, sizeof(#fn) - 1 } + static int scan_lisp_file (const char *filename, const char *mode) { @@ -1108,12 +1112,14 @@ follow the conventions of the doc strings expected by this function. These conventions are automatically followed by the byte compiler when it produces the .elc files. */ - static const char *const uncompiled[] = - { - "loaddefs.el", - "loadup.el", - "charprop.el" - }; + static struct { + const char *fn; + size_t fl; + } const uncompiled[] = { + DEF_ELISP_FILE (loaddefs.el), + DEF_ELISP_FILE (loadup.el), + DEF_ELISP_FILE (charprop.el) + }; int i, match; size_t flen = strlen (filename); @@ -1124,9 +1130,10 @@ for (i = 0, match = 0; i < sizeof (uncompiled) / sizeof (uncompiled[0]); i++) { - if (strlen (uncompiled[i]) <= flen - && !strcmp (filename + flen - strlen (uncompiled[i]), - uncompiled[i])) + if (uncompiled[i].fl <= flen + && !strcmp (filename + flen - uncompiled[i].fl, uncompiled[i].fn) + && (flen == uncompiled[i].fl + || IS_SLASH (filename[flen - uncompiled[i].fl - 1]))) { match = 1; break; ------------------------------------------------------------ revno: 110605 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-10-20 16:56:09 +0200 message: Fix a typo in lib-src/ChangeLog. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-10-20 13:28:42 +0000 +++ lib-src/ChangeLog 2012-10-20 14:56:09 +0000 @@ -4,7 +4,7 @@ 2012-10-20 Eli Zaretskii - Prevent silent omission of doc strings from uncompile Lisp files. + Prevent silent omission of doc strings from uncompiled Lisp files. * make-docfile.c (scan_lisp_file): Barf if called with a .el file other than one of a small list of supported un-compiled files. ------------------------------------------------------------ revno: 110604 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2012-10-20 15:28:42 +0200 message: * make-docfile.c (scan_lisp_file): Add bounds checking. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-10-20 10:01:19 +0000 +++ lib-src/ChangeLog 2012-10-20 13:28:42 +0000 @@ -1,3 +1,7 @@ +2012-10-20 Andreas Schwab + + * make-docfile.c (scan_lisp_file): Add bounds checking. + 2012-10-20 Eli Zaretskii Prevent silent omission of doc strings from uncompile Lisp files. === modified file 'lib-src/make-docfile.c' --- lib-src/make-docfile.c 2012-10-20 10:01:19 +0000 +++ lib-src/make-docfile.c 2012-10-20 13:28:42 +0000 @@ -1108,24 +1108,25 @@ follow the conventions of the doc strings expected by this function. These conventions are automatically followed by the byte compiler when it produces the .elc files. */ - static struct { - const char *fn; - size_t fl; - } uncompiled[] = { - { "loaddefs.el", sizeof("loaddefs.el") - 1 }, - { "loadup.el", sizeof("loadup.el") - 1 }, - { "charprop.el", sizeof("charprop.el") - 1 } - }; + static const char *const uncompiled[] = + { + "loaddefs.el", + "loadup.el", + "charprop.el" + }; int i, match; size_t flen = strlen (filename); if (generate_globals) fatal ("scanning lisp file when -g specified", 0); - if (!strcmp (filename + flen - 3, ".el")) + if (flen > 3 && !strcmp (filename + flen - 3, ".el")) { - for (i = 0, match = 0; i < sizeof(uncompiled)/sizeof(uncompiled[0]); i++) + for (i = 0, match = 0; i < sizeof (uncompiled) / sizeof (uncompiled[0]); + i++) { - if (!strcmp (filename + flen - uncompiled[i].fl, uncompiled[i].fn)) + if (strlen (uncompiled[i]) <= flen + && !strcmp (filename + flen - strlen (uncompiled[i]), + uncompiled[i])) { match = 1; break; ------------------------------------------------------------ revno: 110603 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-10-20 15:20:44 +0200 message: Add comments with instructions for creating new Lisp data types. diff: === modified file 'src/lisp.h' --- src/lisp.h 2012-10-19 19:25:18 +0000 +++ src/lisp.h 2012-10-20 13:20:44 +0000 @@ -222,7 +222,9 @@ /* Define the fundamental Lisp data structures. */ -/* This is the set of Lisp data types. */ +/* This is the set of Lisp data types. If you want to define a new + data type, read the comments after Lisp_Fwd_Type definition + below. */ /* Lisp integers use 2 tags, to give them one extra bit, thus extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1. */ @@ -298,6 +300,53 @@ Lisp_Fwd_Kboard_Obj, /* Fwd to a Lisp_Object field of kboards. */ }; +/* If you want to define a new Lisp data type, here are some + instructions. See the thread at + http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00561.html + for more info. + + First, there are already a couple of Lisp types that can be used if + your new type does not need to be exposed to Lisp programs nor + displayed to users. These are Lisp_Save_Value, a Lisp_Misc + subtype, and PVEC_OTHER, a kind of vectorlike object. The former + is suitable for temporarily stashing away pointers and integers in + a Lisp object (see the existing uses of make_save_value and + XSAVE_VALUE). The latter is useful for vector-like Lisp objects + that need to be used as part of other objects, but which are never + shown to users or Lisp code (search for PVEC_OTHER in xterm.c for + an example). + + These two types don't look pretty when printed, so they are + unsuitable for Lisp objects that can be exposed to users. + + To define a new data type, add one more Lisp_Misc subtype or one + more pseudovector subtype. Pseudovectors are more suitable for + objects with several slots that need to support fast random access, + whil Lisp_Misc types are foreverything else. A pseudovector object + provides one or more slots for Lisp objects, followed by struct + members that are accessible only from C. A Lisp_Misc object is a + wrapper for a C struct that can contain anything you like. + + To add a new pseudovector type, extend the pvec_type enumeration; + to add a new Lisp_Misc, extend the Lisp_Misc_Type enumeration. + + For a Lisp_Misc, you will also need to add your entry to union + Lisp_Misc (but make sure the first word has the same structure as + the others, starting with a 16-bit member of the Lisp_Misc_Type + enumeration and a 1-bit GC markbit) and make sure the overall size + of the union is not increased by your addition. + + Then you will need to add switch branches in print.c (in + print_object, to print your object, and possibly also in + print_preprocess) and to alloc.c, to mark your object (in + mark_object) and to free it (in gc_sweep). The latter is also the + right place to call any code specific to your data type that needs + to run when the object is recycled -- e.g., free any additional + resources allocated for it that are not Lisp objects. You can even + make a pointer to the function that frees the resources a slot in + your object -- this way, the same object could be used to represent + several disparate C structures. */ + #ifdef CHECK_LISP_OBJECT_TYPE typedef struct { EMACS_INT i; } Lisp_Object; ------------------------------------------------------------ revno: 110602 fixes bug: http://debbugs.gnu.org/12592 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-10-20 20:50:49 +0800 message: * lread.c (Fload): Doc fix. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-19 19:25:18 +0000 +++ src/ChangeLog 2012-10-20 12:50:49 +0000 @@ -1,3 +1,7 @@ +2012-10-20 Chong Yidong + + * lread.c (Fload): Doc fix (Bug#12592). + 2012-10-19 Kazuhiro Ito (tiny change) * font.c (Ffont_at): Fix previous change. === modified file 'src/lread.c' --- src/lread.c 2012-10-19 19:25:18 +0000 +++ src/lread.c 2012-10-20 12:50:49 +0000 @@ -996,18 +996,17 @@ the suffix `.elc' or `.el'; don't accept just FILE unless it ends in one of those suffixes or includes a directory name. -If this function fails to find a file, it may look for different -representations of that file before trying another file. -It does so by adding the non-empty suffixes in `load-file-rep-suffixes' -to the file name. Emacs uses this feature mainly to find compressed -versions of files when Auto Compression mode is enabled. +If NOSUFFIX is nil, then if a file could not be found, try looking for +a different representation of the file by adding non-empty suffixes to +its name, before trying another file. Emacs uses this feature to find +compressed versions of files when Auto Compression mode is enabled. +If NOSUFFIX is non-nil, disable this feature. -The exact suffixes that this function tries out, in the exact order, -are given by the value of the variable `load-file-rep-suffixes' if -NOSUFFIX is non-nil and by the return value of the function -`get-load-suffixes' if MUST-SUFFIX is non-nil. If both NOSUFFIX and -MUST-SUFFIX are nil, this function first tries out the latter suffixes -and then the former. +The suffixes that this function tries out, when NOSUFFIX is nil, are +given by the return value of `get-load-suffixes' and the values listed +in `load-file-rep-suffixes'. If MUST-SUFFIX is non-nil, only the +return value of `get-load-suffixes' is used, i.e. the file name is +required to have a non-empty suffix. Loading a file records its definitions, and its `provide' and `require' calls, in an element of `load-history' whose ------------------------------------------------------------ revno: 110601 fixes bug: http://debbugs.gnu.org/12586 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-10-20 20:04:45 +0800 message: Fix *vc-diff* buffer's behavior for empty diffs. * vc/vc.el (vc-diff-internal): Set up Diff mode even if there are no changes to show. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-20 11:54:24 +0000 +++ lisp/ChangeLog 2012-10-20 12:04:45 +0000 @@ -1,5 +1,8 @@ 2012-10-20 Chong Yidong + * vc/vc.el (vc-diff-internal): Set up Diff mode even if there are + no changes to show (Bug#12586). + * eshell/esh-cmd.el (eshell-rewrite-for-command): Copy the body list explicitly (Bug#12571). === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2012-09-27 06:59:21 +0000 +++ lisp/vc/vc.el 2012-10-20 12:04:45 +0000 @@ -1584,21 +1584,21 @@ (let ((vc-disable-async-diff (not async))) (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer)) (set-buffer buffer) + (diff-mode) + (set (make-local-variable 'diff-vc-backend) (car vc-fileset)) + (set (make-local-variable 'revert-buffer-function) + `(lambda (ignore-auto noconfirm) + (vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose))) + ;; Make the *vc-diff* buffer read only, the diff-mode key + ;; bindings are nicer for read only buffers. pcl-cvs does the + ;; same thing. + (setq buffer-read-only t) (if (and (zerop (buffer-size)) (not (get-buffer-process (current-buffer)))) ;; Treat this case specially so as not to pop the buffer. (progn (message "%s" (cdr messages)) nil) - (diff-mode) - (set (make-local-variable 'diff-vc-backend) (car vc-fileset)) - (set (make-local-variable 'revert-buffer-function) - `(lambda (ignore-auto noconfirm) - (vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose))) - ;; Make the *vc-diff* buffer read only, the diff-mode key - ;; bindings are nicer for read only buffers. pcl-cvs does the - ;; same thing. - (setq buffer-read-only t) ;; Display the buffer, but at the end because it can change point. (pop-to-buffer (current-buffer)) ;; The diff process may finish early, so call `vc-diff-finish' ------------------------------------------------------------ revno: 110600 fixes bug: http://debbugs.gnu.org/12571 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-10-20 19:54:24 +0800 message: Fix for Eshell's for loop. * eshell/esh-cmd.el (eshell-rewrite-for-command): Copy the body list explicitly. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-20 11:35:05 +0000 +++ lisp/ChangeLog 2012-10-20 11:54:24 +0000 @@ -1,3 +1,8 @@ +2012-10-20 Chong Yidong + + * eshell/esh-cmd.el (eshell-rewrite-for-command): Copy the body + list explicitly (Bug#12571). + 2012-10-20 Arne Jørgensen * progmodes/flymake.el (flymake-create-temp-inplace): Use === modified file 'lisp/eshell/esh-cmd.el' --- lisp/eshell/esh-cmd.el 2012-09-24 18:38:14 +0000 +++ lisp/eshell/esh-cmd.el 2012-10-20 11:54:24 +0000 @@ -484,20 +484,22 @@ (let ((body (car (last terms)))) (setcdr (last terms 2) nil) `(let ((for-items - (append - ,@(mapcar - (lambda (elem) - (if (listp elem) - elem - `(list ,elem))) - (cdr (cddr terms))))) - (eshell-command-body '(nil)) + (copy-tree + (append + ,@(mapcar + (lambda (elem) + (if (listp elem) + elem + `(list ,elem))) + (cdr (cddr terms)))))) + (eshell-command-body '(nil)) (eshell-test-body '(nil))) - (while (consp for-items) - (let ((,(intern (cadr terms)) (car for-items))) - (eshell-protect - ,(eshell-invokify-arg body t))) - (setq for-items (cdr for-items))) + (while (car for-items) + (let ((,(intern (cadr terms)) (car for-items))) + (eshell-protect + ,(eshell-invokify-arg body t))) + (setcar for-items (cadr for-items)) + (setcdr for-items (cddr for-items))) (eshell-close-handles eshell-last-command-status (list 'quote eshell-last-command-result)))))) ------------------------------------------------------------ revno: 110599 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-10-20 19:35:05 +0800 message: Fix last ChangeLog entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-20 11:34:06 +0000 +++ lisp/ChangeLog 2012-10-20 11:35:05 +0000 @@ -1,4 +1,4 @@ -2012-10-20 Chong Yidong +2012-10-20 Arne Jørgensen * progmodes/flymake.el (flymake-create-temp-inplace): Use file-truename. ------------------------------------------------------------ revno: 110598 author: Arne Jørgensen committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-10-20 19:34:06 +0800 message: * progmodes/flymake.el (flymake-create-temp-inplace): Use file-truename. Patch from: http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00444.html diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-20 10:01:19 +0000 +++ lisp/ChangeLog 2012-10-20 11:34:06 +0000 @@ -1,3 +1,8 @@ +2012-10-20 Chong Yidong + + * progmodes/flymake.el (flymake-create-temp-inplace): Use + file-truename. + 2012-10-20 Eli Zaretskii * loadup.el: Update comment about uncompiled Lisp files. (Bug#12395) === modified file 'lisp/progmodes/flymake.el' --- lisp/progmodes/flymake.el 2012-10-06 20:30:26 +0000 +++ lisp/progmodes/flymake.el 2012-10-20 11:34:06 +0000 @@ -1535,10 +1535,11 @@ (error "Invalid file-name")) (or prefix (setq prefix "flymake")) - (let* ((temp-name (concat (file-name-sans-extension file-name) - "_" prefix - (and (file-name-extension file-name) - (concat "." (file-name-extension file-name)))))) + (let* ((ext (file-name-extension file-name)) + (temp-name (file-truename + (concat (file-name-sans-extension file-name) + "_" prefix + (and ext (concat "." ext)))))) (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) temp-name)) ------------------------------------------------------------ revno: 110597 fixes bug: http://debbugs.gnu.org/12395 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-10-20 12:01:19 +0200 message: Fix bug #12395 with doc strings silently omitted from DOC on MS-Windows. lib-src/make-docfile.c (scan_lisp_file): Barf if called with a .el file other than one of a small list of supported un-compiled files. lib-src/makefile.w32-in (lisp1, lisp2): Name .elc files wherever they exist. lisp/loadup.el: Update comment about uncompiled Lisp files. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-10-17 21:13:20 +0000 +++ lib-src/ChangeLog 2012-10-20 10:01:19 +0000 @@ -1,3 +1,12 @@ +2012-10-20 Eli Zaretskii + + Prevent silent omission of doc strings from uncompile Lisp files. + * make-docfile.c (scan_lisp_file): Barf if called with a .el file + other than one of a small list of supported un-compiled files. + + * makefile.w32-in (lisp1, lisp2): Name .elc files wherever they + exist. (Bug#12395) + 2012-10-17 Eli Zaretskii * ntlib.c: Include , to avoid compiler warning about === modified file 'lib-src/make-docfile.c' --- lib-src/make-docfile.c 2012-10-01 14:22:23 +0000 +++ lib-src/make-docfile.c 2012-10-20 10:01:19 +0000 @@ -1025,9 +1025,9 @@ arglist, but the doc string must still have a backslash and newline immediately after the double quote. The only source files that must follow this convention are preloaded - uncompiled ones like loaddefs.el and bindings.el; aside - from that, it is always the .elc file that we look at, and they are no - problem because byte-compiler output follows this convention. + uncompiled ones like loaddefs.el; aside from that, it is always the .elc + file that we should look at, and they are no problem because byte-compiler + output follows this convention. The NAME and DOCSTRING are output. NAME is preceded by `F' for a function or `V' for a variable. An entry is output only if DOCSTRING has \ newline just after the opening ". @@ -1104,9 +1104,36 @@ FILE *infile; register int c; char *saved_string = 0; + /* These are the only files that are loaded uncompiled, and must + follow the conventions of the doc strings expected by this + function. These conventions are automatically followed by the + byte compiler when it produces the .elc files. */ + static struct { + const char *fn; + size_t fl; + } uncompiled[] = { + { "loaddefs.el", sizeof("loaddefs.el") - 1 }, + { "loadup.el", sizeof("loadup.el") - 1 }, + { "charprop.el", sizeof("charprop.el") - 1 } + }; + int i, match; + size_t flen = strlen (filename); if (generate_globals) fatal ("scanning lisp file when -g specified", 0); + if (!strcmp (filename + flen - 3, ".el")) + { + for (i = 0, match = 0; i < sizeof(uncompiled)/sizeof(uncompiled[0]); i++) + { + if (!strcmp (filename + flen - uncompiled[i].fl, uncompiled[i].fn)) + { + match = 1; + break; + } + } + if (!match) + fatal ("uncompiled lisp file %s is not supported", filename); + } infile = fopen (filename, mode); if (infile == NULL) === modified file 'lib-src/makefile.w32-in' --- lib-src/makefile.w32-in 2012-10-08 12:21:04 +0000 +++ lib-src/makefile.w32-in 2012-10-20 10:01:19 +0000 @@ -209,38 +209,38 @@ $(lispsource)emacs-lisp/map-ynp.elc \ $(lispsource)menu-bar.elc \ $(lispsource)international/mule.elc \ - $(lispsource)international/mule-conf.el \ + $(lispsource)international/mule-conf.elc \ $(lispsource)international/mule-cmds.elc \ $(lispsource)international/characters.elc \ $(lispsource)international/charprop.el \ $(lispsource)case-table.elc lisp2 = \ - $(lispsource)language/chinese.el \ - $(lispsource)language/cyrillic.el \ - $(lispsource)language/indian.el \ - $(lispsource)language/sinhala.el \ - $(lispsource)language/english.el \ + $(lispsource)language/chinese.elc \ + $(lispsource)language/cyrillic.elc \ + $(lispsource)language/indian.elc \ + $(lispsource)language/sinhala.elc \ + $(lispsource)language/english.elc \ $(lispsource)language/ethiopic.elc \ $(lispsource)language/european.elc \ - $(lispsource)language/czech.el \ - $(lispsource)language/slovak.el \ - $(lispsource)language/romanian.el \ - $(lispsource)language/greek.el \ + $(lispsource)language/czech.elc \ + $(lispsource)language/slovak.elc \ + $(lispsource)language/romanian.elc \ + $(lispsource)language/greek.elc \ $(lispsource)language/hebrew.elc \ - $(lispsource)language/japanese.el \ - $(lispsource)language/korean.el \ - $(lispsource)language/lao.el \ - $(lispsource)language/cham.el \ - $(lispsource)language/tai-viet.el \ - $(lispsource)language/thai.el \ + $(lispsource)language/japanese.elc \ + $(lispsource)language/korean.elc \ + $(lispsource)language/lao.elc \ + $(lispsource)language/cham.elc \ + $(lispsource)language/tai-viet.elc \ + $(lispsource)language/thai.elc \ $(lispsource)language/tibetan.elc \ - $(lispsource)language/vietnamese.el \ - $(lispsource)language/misc-lang.el \ - $(lispsource)language/utf-8-lang.el \ - $(lispsource)language/georgian.el \ - $(lispsource)language/khmer.el \ - $(lispsource)language/burmese.el \ + $(lispsource)language/vietnamese.elc \ + $(lispsource)language/misc-lang.elc \ + $(lispsource)language/utf-8-lang.elc \ + $(lispsource)language/georgian.elc \ + $(lispsource)language/khmer.elc \ + $(lispsource)language/burmese.elc \ $(lispsource)register.elc \ $(lispsource)replace.elc \ $(lispsource)simple.elc \ @@ -266,7 +266,7 @@ $(WINDOW_SUPPORT) \ $(lispsource)widget.elc \ $(lispsource)window.elc \ - $(lispsource)version.el + $(lispsource)version.elc # This is needed the first time we build the tree, since temacs.exe # does not exist yet, and the DOC rule needs it to rebuild DOC whenever === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-20 04:14:32 +0000 +++ lisp/ChangeLog 2012-10-20 10:01:19 +0000 @@ -1,3 +1,7 @@ +2012-10-20 Eli Zaretskii + + * loadup.el: Update comment about uncompiled Lisp files. (Bug#12395) + 2012-10-20 Jay Belanger * calc/calc-units.el (math-extract-units): Properly extract powers === modified file 'lisp/loadup.el' --- lisp/loadup.el 2012-09-17 12:07:36 +0000 +++ lisp/loadup.el 2012-10-20 10:01:19 +0000 @@ -38,7 +38,8 @@ ;; doc strings in the dumped Emacs.) Because of this: ;; ii) If the file is loaded uncompiled, it should (where possible) -;; obey the doc-string conventions expected by make-docfile. +;; obey the doc-string conventions expected by make-docfile. It +;; should also be added to the uncompiled[] list in make-docfile.c. ;;; Code: ------------------------------------------------------------ revno: 110596 committer: Jay Belanger branch nick: trunk timestamp: Fri 2012-10-19 23:14:32 -0500 message: calc/calc-units.el (math-extract-units): Properly extract powers of units. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-20 03:42:02 +0000 +++ lisp/ChangeLog 2012-10-20 04:14:32 +0000 @@ -1,3 +1,8 @@ +2012-10-20 Jay Belanger + + * calc/calc-units.el (math-extract-units): Properly extract powers + of units. + 2012-10-20 Daniel Colascione * frame.el (make-frame): Set x-display-name as we used to in order === modified file 'lisp/calc/calc-units.el' --- lisp/calc/calc-units.el 2012-08-12 04:32:28 +0000 +++ lisp/calc/calc-units.el 2012-10-20 04:14:32 +0000 @@ -1481,10 +1481,16 @@ (mapcar 'math-remove-units (cdr expr)))))) (defun math-extract-units (expr) - (if (memq (car-safe expr) '(* /)) - (cons (car expr) - (mapcar 'math-extract-units (cdr expr))) - (if (math-check-unit-name expr) expr 1))) + (cond + ((memq (car-safe expr) '(* /)) + (cons (car expr) + (mapcar 'math-extract-units (cdr expr)))) + ((and + (eq (car-safe expr) '^) + (math-check-unit-name (nth 1 expr))) + expr) + ((math-check-unit-name expr) expr) + (t 1))) (defun math-build-units-table-buffer (enter-buffer) (if (not (and math-units-table math-units-table-buffer-valid