aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2011-01-02 15:31:19 -0500
committerChong Yidong2011-01-02 15:31:19 -0500
commit7c420169baa7c50428589cca7f8eda71b462eb15 (patch)
treeb556f9e181818bbaf8b5b425844b4ae26e88f537 /src
parentbb7f5cbcda931661c8dc3311603ac764fa87a639 (diff)
parentd12f22f52cb7bb18b46f5ea8de5d8e8e04733e3f (diff)
downloademacs-7c420169baa7c50428589cca7f8eda71b462eb15.tar.gz
emacs-7c420169baa7c50428589cca7f8eda71b462eb15.zip
Merge changes from emacs-23 branch
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit7
-rw-r--r--src/ChangeLog51
-rw-r--r--src/fileio.c2
-rw-r--r--src/image.c27
-rw-r--r--src/keyboard.c4
-rw-r--r--src/window.c6
-rw-r--r--src/xdisp.c39
-rw-r--r--src/xterm.c14
8 files changed, 118 insertions, 32 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index 73fecea5972..ac466de0eee 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -1,5 +1,5 @@
1# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 1# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
2# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 2# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
3# Free Software Foundation, Inc. 3# Free Software Foundation, Inc.
4# 4#
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
@@ -51,7 +51,7 @@ handle SIGALRM ignore
51# Using a constant runs into GDB bugs sometimes. 51# Using a constant runs into GDB bugs sometimes.
52define xgetptr 52define xgetptr
53 set $bugfix = $arg0 53 set $bugfix = $arg0
54 set $ptr = (gdb_use_union ? $bugfix.u.val : $bugfix & $valmask) | gdb_data_seg_bits 54 set $ptr = (gdb_use_union ? (gdb_use_lsb ? $bugfix.u.val << gdb_gctypebits : $bugfix.u.val) : $bugfix & $valmask) | gdb_data_seg_bits
55end 55end
56 56
57define xgetint 57define xgetint
@@ -1227,7 +1227,8 @@ define xbacktrace
1227 xprintsym (*$bt->function) 1227 xprintsym (*$bt->function)
1228 printf " (0x%x)\n", $bt->args 1228 printf " (0x%x)\n", $bt->args
1229 else 1229 else
1230 printf "0x%x ", *$bt->function 1230 xgetptr *$bt->function
1231 printf "0x%x ", $ptr
1231 if $type == Lisp_Vectorlike 1232 if $type == Lisp_Vectorlike
1232 xgetptr (*$bt->function) 1233 xgetptr (*$bt->function)
1233 set $size = ((struct Lisp_Vector *) $ptr)->size 1234 set $size = ((struct Lisp_Vector *) $ptr)->size
diff --git a/src/ChangeLog b/src/ChangeLog
index d03b16a7092..879ecc94d72 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,54 @@
12011-01-02 Eli Zaretskii <eliz@gnu.org>
2
3 * keyboard.c (Vselect_active_regions): Doc fix. (Bug#7702)
4
52011-01-02 Eli Zaretskii <eliz@gnu.org>
6
7 * image.c <Qlibpng_version>: New variable.
8 (syms_of_image): Intern and staticpro it. Set its value to the
9 version of PNG library we were compiled with.
10 (my_png_error, png_load): Avoid GCC warnings about direct access
11 to png_ptr->jmpbuf. (Bug#7716)
12 (png_jmpbuf): New macro.
13 (my_png_error, png_load): Use it instead of #ifdef'ing according
14 to PNG_LIBPNG_VER_MAJOR and PNG_LIBPNG_VER_MINOR.
15
162011-01-02 Stefan Monnier <monnier@iro.umontreal.ca>
17
18 * .gdbinit (xgetptr): Fix the union+lsb case.
19 (xbacktrace): Fix the union case.
20
212011-01-02 Stefan Monnier <monnier@iro.umontreal.ca>
22
23 * window.c (Fmove_to_window_line): Avoid abort when called in a buffer
24 different from selected-window's.
25
262011-01-02 Eli Zaretskii <eliz@gnu.org>
27
28 * keyboard.c (parse_menu_item): Prepend " " to the key sequence
29 equivalent of a menu item when the key sequence is given by the
30 `:keys' attribute. (Bug#7662)
31
32 * xdisp.c (Fformat_mode_line): Doc fix: no need to state that only
33 the basic faces are supported.
34
352011-01-02 Jan Djärv <jan.h.d@swipnet.se>
36
37 * xterm.c (x_check_fullscreen): Fix pixel/character mixup.
38
392011-01-02 Eli Zaretskii <eliz@gnu.org>
40
41 * xdisp.c (Fformat_mode_line): Fix last change.
42
432011-01-02 Chong Yidong <cyd@stupidchicken.com>
44
45 * xdisp.c (Fformat_mode_line): Restrict the FACE argument to basic
46 faces (Bug#7587).
47
482011-01-02 Eli Zaretskii <eliz@gnu.org>
49
50 * fileio.c (Fexpand_file_name): One more doc fix.
51
12011-01-01 Chong Yidong <cyd@stupidchicken.com> 522011-01-01 Chong Yidong <cyd@stupidchicken.com>
2 53
3 * gtkutil.c (xg_get_tool_bar_widgets): Use NULL for a missing 54 * gtkutil.c (xg_get_tool_bar_widgets): Use NULL for a missing
diff --git a/src/fileio.c b/src/fileio.c
index c2b93a6bd8b..881dc92acab 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -782,6 +782,8 @@ DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0,
782Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative 782Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative
783\(does not start with slash or tilde); if DEFAULT-DIRECTORY is nil or missing, 783\(does not start with slash or tilde); if DEFAULT-DIRECTORY is nil or missing,
784the current buffer's value of `default-directory' is used. 784the current buffer's value of `default-directory' is used.
785NAME should be a string that is a valid file name for the underlying
786filesystem.
785File name components that are `.' are removed, and 787File name components that are `.' are removed, and
786so are file name components followed by `..', along with the `..' itself; 788so are file name components followed by `..', along with the `..' itself;
787note that these simplifications are done without checking the resulting 789note that these simplifications are done without checking the resulting
diff --git a/src/image.c b/src/image.c
index 07f573ca893..41c9cb8f534 100644
--- a/src/image.c
+++ b/src/image.c
@@ -94,6 +94,11 @@ typedef struct w32_bitmap_record Bitmap_Record;
94 without modifying lots of files). */ 94 without modifying lots of files). */
95extern void x_query_colors (struct frame *f, XColor *colors, int ncolors); 95extern void x_query_colors (struct frame *f, XColor *colors, int ncolors);
96extern void x_query_color (struct frame *f, XColor *color); 96extern void x_query_color (struct frame *f, XColor *color);
97
98/* Version of libpng that we were compiled with, or -1 if no PNG
99 support was compiled in. This is tested by w32-win.el to correctly
100 set up the alist used to search for PNG libraries. */
101Lisp_Object Qlibpng_version;
97#endif /* HAVE_NTGUI */ 102#endif /* HAVE_NTGUI */
98 103
99#ifdef HAVE_NS 104#ifdef HAVE_NS
@@ -5523,6 +5528,12 @@ init_png_functions (Lisp_Object libraries)
5523 5528
5524#endif /* HAVE_NTGUI */ 5529#endif /* HAVE_NTGUI */
5525 5530
5531/* libpng before 1.4.0 didn't have png_jmpbuf; v1.4.0 and later
5532 deprecate direct access to png_ptr fields. */
5533#ifndef png_jmpbuf
5534# define png_jmpbuf(PTR) ((PTR)->jmpbuf)
5535#endif
5536
5526/* Error and warning handlers installed when the PNG library 5537/* Error and warning handlers installed when the PNG library
5527 is initialized. */ 5538 is initialized. */
5528 5539
@@ -5530,8 +5541,10 @@ static void
5530my_png_error (png_struct *png_ptr, const char *msg) 5541my_png_error (png_struct *png_ptr, const char *msg)
5531{ 5542{
5532 xassert (png_ptr != NULL); 5543 xassert (png_ptr != NULL);
5544 /* Avoid compiler warning about deprecated direct access to
5545 png_ptr's fields in libpng versions 1.4.x. */
5533 image_error ("PNG error: %s", build_string (msg), Qnil); 5546 image_error ("PNG error: %s", build_string (msg), Qnil);
5534 longjmp (png_ptr->jmpbuf, 1); 5547 longjmp (png_jmpbuf (png_ptr), 1);
5535} 5548}
5536 5549
5537 5550
@@ -5693,7 +5706,7 @@ png_load (struct frame *f, struct image *img)
5693 5706
5694 /* Set error jump-back. We come back here when the PNG library 5707 /* Set error jump-back. We come back here when the PNG library
5695 detects an error. */ 5708 detects an error. */
5696 if (setjmp (png_ptr->jmpbuf)) 5709 if (setjmp (png_jmpbuf (png_ptr)))
5697 { 5710 {
5698 error: 5711 error:
5699 if (png_ptr) 5712 if (png_ptr)
@@ -8776,6 +8789,16 @@ non-numeric, there is no explicit limit on the size of images. */);
8776 staticpro (&QCpt_height); 8789 staticpro (&QCpt_height);
8777#endif /* HAVE_GHOSTSCRIPT */ 8790#endif /* HAVE_GHOSTSCRIPT */
8778 8791
8792#ifdef HAVE_NTGUI
8793 Qlibpng_version = intern_c_string ("libpng-version");
8794 staticpro (&Qlibpng_version);
8795#if HAVE_PNG
8796 SET_SYMBOL_VAL (XSYMBOL (Qlibpng_version), make_number (PNG_LIBPNG_VER));
8797#else
8798 SET_SYMBOL_VAL (XSYMBOL (Qlibpng_version), make_number (-1));
8799#endif
8800#endif
8801
8779#if defined (HAVE_XPM) || defined (HAVE_NS) 8802#if defined (HAVE_XPM) || defined (HAVE_NS)
8780 Qxpm = intern_c_string ("xpm"); 8803 Qxpm = intern_c_string ("xpm");
8781 staticpro (&Qxpm); 8804 staticpro (&Qxpm);
diff --git a/src/keyboard.c b/src/keyboard.c
index 27c311d72e2..7759549fa23 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7968,7 +7968,7 @@ parse_menu_item (Lisp_Object item, int inmenubar)
7968 /* The previous code preferred :key-sequence to :keys, so we 7968 /* The previous code preferred :key-sequence to :keys, so we
7969 preserve this behavior. */ 7969 preserve this behavior. */
7970 if (STRINGP (keyeq) && !CONSP (keyhint)) 7970 if (STRINGP (keyeq) && !CONSP (keyhint))
7971 keyeq = Fsubstitute_command_keys (keyeq); 7971 keyeq = concat2 (build_string (" "), Fsubstitute_command_keys (keyeq));
7972 else 7972 else
7973 { 7973 {
7974 Lisp_Object prefix = keyeq; 7974 Lisp_Object prefix = keyeq;
@@ -12386,7 +12386,7 @@ and tool-bar buttons. */);
12386 12386
12387 DEFVAR_LISP ("select-active-regions", 12387 DEFVAR_LISP ("select-active-regions",
12388 &Vselect_active_regions, 12388 &Vselect_active_regions,
12389 doc: /* If non-nil, an active region automatically becomes the window selection. 12389 doc: /* If non-nil, an active region automatically sets the primary selection.
12390If the value is `only', only temporarily active regions (usually made 12390If the value is `only', only temporarily active regions (usually made
12391by mouse-dragging or shift-selection) set the window selection. 12391by mouse-dragging or shift-selection) set the window selection.
12392 12392
diff --git a/src/window.c b/src/window.c
index 920a528a03e..b0171436088 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5762,6 +5762,12 @@ zero means top of window, negative means relative to bottom of window. */)
5762 int this_scroll_margin; 5762 int this_scroll_margin;
5763#endif 5763#endif
5764 5764
5765 if (!(BUFFERP (w->buffer)
5766 && XBUFFER (w->buffer) == current_buffer))
5767 /* This test is needed to make sure PT/PT_BYTE make sense in w->buffer
5768 when passed below to set_marker_both. */
5769 error ("move-to-window-line called from unrelated buffer");
5770
5765 window = selected_window; 5771 window = selected_window;
5766 start = marker_position (w->start); 5772 start = marker_position (w->start);
5767 if (start < BEGV || start > ZV) 5773 if (start < BEGV || start > ZV)
diff --git a/src/xdisp.c b/src/xdisp.c
index 7a299055185..4e15e8a5f6d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19068,23 +19068,27 @@ DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line,
19068First arg FORMAT specifies the mode line format (see `mode-line-format' 19068First arg FORMAT specifies the mode line format (see `mode-line-format'
19069for details) to use. 19069for details) to use.
19070 19070
19071Optional second arg FACE specifies the face property to put 19071By default, the format is evaluated for the currently selected window.
19072on all characters for which no face is specified. 19072
19073The value t means whatever face the window's mode line currently uses 19073Optional second arg FACE specifies the face property to put on all
19074\(either `mode-line' or `mode-line-inactive', depending). 19074characters for which no face is specified. The value nil means the
19075A value of nil means the default is no face property. 19075default face. The value t means whatever face the window's mode line
19076If FACE is an integer, the value string has no text properties. 19076currently uses (either `mode-line' or `mode-line-inactive',
19077depending on whether the window is the selected window or not).
19078An integer value means the value string has no text
19079properties.
19077 19080
19078Optional third and fourth args WINDOW and BUFFER specify the window 19081Optional third and fourth args WINDOW and BUFFER specify the window
19079and buffer to use as the context for the formatting (defaults 19082and buffer to use as the context for the formatting (defaults
19080are the selected window and the window's buffer). */) 19083are the selected window and the WINDOW's buffer). */)
19081 (Lisp_Object format, Lisp_Object face, Lisp_Object window, Lisp_Object buffer) 19084 (Lisp_Object format, Lisp_Object face,
19085 Lisp_Object window, Lisp_Object buffer)
19082{ 19086{
19083 struct it it; 19087 struct it it;
19084 int len; 19088 int len;
19085 struct window *w; 19089 struct window *w;
19086 struct buffer *old_buffer = NULL; 19090 struct buffer *old_buffer = NULL;
19087 int face_id = -1; 19091 int face_id;
19088 int no_props = INTEGERP (face); 19092 int no_props = INTEGERP (face);
19089 int count = SPECPDL_INDEX (); 19093 int count = SPECPDL_INDEX ();
19090 Lisp_Object str; 19094 Lisp_Object str;
@@ -19107,15 +19111,14 @@ are the selected window and the window's buffer). */)
19107 if (no_props) 19111 if (no_props)
19108 face = Qnil; 19112 face = Qnil;
19109 19113
19110 if (!NILP (face)) 19114 face_id = (NILP (face) || EQ (face, Qdefault)) ? DEFAULT_FACE_ID
19111 { 19115 : EQ (face, Qt) ? (EQ (window, selected_window)
19112 if (EQ (face, Qt)) 19116 ? MODE_LINE_FACE_ID : MODE_LINE_INACTIVE_FACE_ID)
19113 face = (EQ (window, selected_window) ? Qmode_line : Qmode_line_inactive); 19117 : EQ (face, Qmode_line) ? MODE_LINE_FACE_ID
19114 face_id = lookup_named_face (XFRAME (WINDOW_FRAME (w)), face, 0); 19118 : EQ (face, Qmode_line_inactive) ? MODE_LINE_INACTIVE_FACE_ID
19115 } 19119 : EQ (face, Qheader_line) ? HEADER_LINE_FACE_ID
19116 19120 : EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID
19117 if (face_id < 0) 19121 : DEFAULT_FACE_ID;
19118 face_id = DEFAULT_FACE_ID;
19119 19122
19120 if (XBUFFER (buffer) != current_buffer) 19123 if (XBUFFER (buffer) != current_buffer)
19121 old_buffer = current_buffer; 19124 old_buffer = current_buffer;
diff --git a/src/xterm.c b/src/xterm.c
index e91782395df..f0ef8746b01 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8612,9 +8612,13 @@ x_check_fullscreen (struct frame *f)
8612 if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window) 8612 if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window)
8613 return; /* Only fullscreen without WM or with EWM hints (above). */ 8613 return; /* Only fullscreen without WM or with EWM hints (above). */
8614 8614
8615 /* Setting fullscreen to nil doesn't do anything. We could save the
8616 last non-fullscreen size and restore it, but it seems like a
8617 lot of work for this unusual case (no window manager running). */
8618
8615 if (f->want_fullscreen != FULLSCREEN_NONE) 8619 if (f->want_fullscreen != FULLSCREEN_NONE)
8616 { 8620 {
8617 int width = FRAME_COLS (f), height = FRAME_LINES (f); 8621 int width = FRAME_PIXEL_WIDTH (f), height = FRAME_PIXEL_HEIGHT (f);
8618 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 8622 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
8619 8623
8620 switch (f->want_fullscreen) 8624 switch (f->want_fullscreen)
@@ -8632,12 +8636,8 @@ x_check_fullscreen (struct frame *f)
8632 height = x_display_pixel_height (dpyinfo); 8636 height = x_display_pixel_height (dpyinfo);
8633 } 8637 }
8634 8638
8635 if (FRAME_COLS (f) != width || FRAME_LINES (f) != height) 8639 XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
8636 { 8640 width, height);
8637 change_frame_size (f, height, width, 0, 1, 0);
8638 SET_FRAME_GARBAGED (f);
8639 cancel_mouse_face (f);
8640 }
8641 } 8641 }
8642} 8642}
8643 8643