summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog130
-rw-r--r--src/alloc.c22
-rw-r--r--src/bytecode.c2
-rw-r--r--src/category.c3
-rw-r--r--src/coding.c4
-rw-r--r--src/config.in3
-rw-r--r--src/data.c4
-rw-r--r--src/editfns.c3
-rw-r--r--src/fileio.c36
-rw-r--r--src/fns.c20
-rw-r--r--src/frame.c3
-rw-r--r--src/indent.c11
-rw-r--r--src/macfns.c56
-rw-r--r--src/macmenu.c16
-rw-r--r--src/macterm.c31
-rw-r--r--src/minibuf.c2
-rw-r--r--src/process.c2
-rw-r--r--src/s/gnu-linux.h2
-rw-r--r--src/s/ms-w32.h2
-rw-r--r--src/search.c2
-rw-r--r--src/term.c7
-rw-r--r--src/termhooks.h5
-rw-r--r--src/xfaces.c2
-rw-r--r--src/xmenu.c17
-rw-r--r--src/xselect.c8
-rw-r--r--src/xterm.c117
-rw-r--r--src/xterm.h10
27 files changed, 414 insertions, 106 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 601d1058b1b..358e6374810 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,130 @@
+2006-11-21 Richard Stallman <rms@gnu.org>
+
+ * fileio.c: Break line before &&, not after.
+
+2006-11-20 Eli Zaretskii <eliz@gnu.org>
+
+ * fns.c (concat) [!__GNUC__]: Add prototype.
+
+2006-11-20 Kenichi Handa <handa@m17n.org>
+
+ * fileio.c (Fread_file_name_internal): Use SBYTES (not SCHARS) to
+ check the tailing slash of a filename.
+
+2006-11-20 KOBAYASHI Yasuhiro <kobayays@otsukakj.co.jp> (tiny change)
+
+ * indent.c (Fvertical_motion): Include composition in the case of
+ overshoot expected.
+
+2006-11-19 Andreas Schwab <schwab@gnu.org>
+
+ * xfaces.c (Fdisplay_supports_face_attributes_p): Initialize
+ supports.
+
+ * xmenu.c (Fx_popup_menu): Initialize selection.
+
+2006-11-18 Andreas Schwab <schwab@suse.de>
+
+ * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Update call to
+ mark_memory.
+
+2006-11-17 Tetsurou Okazaki <okazaki@be.to> (tiny change)
+
+ * xterm.c (do_ewmh_fullscreen): Declare variable before XSETFRAME
+ to avoid gcc 2.96 error.
+
+2006-11-17 NIIMI Satoshi <sa2c@sa2c.net> (tiny change)
+
+ * search.c (simple_search): In the loop of backward searching,
+ check also the byte position against the limit.
+
+2006-11-14 Romain Francoise <romain@orebokech.com>
+
+ * minibuf.c (Fcompleting_read): Fix typo in docstring.
+
+2006-11-14 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (code_convert_region): Initialize
+ coding->heading_ascii.
+ (decode_coding_string, code_convert_region): Likewise.
+
+2006-11-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * config.in: Regenerate.
+
+ * macfns.c (Fx_display_mm_height, Fx_display_mm_width)
+ [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
+ && MAC_OS_X_VERSION_MIN_REQUIRED == 1020]: Check if
+ CGDisplayScreenSize is available.
+
+ * macmenu.c (menu_quit_handler, install_menu_quit_handler):
+ Replace `#ifdef HAVE_CANCELMENUTRACKING' with
+ `#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030'.
+ (install_menu_quit_handler) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
+ && MAC_OS_X_VERSION_MIN_REQUIRED == 1020]: Check if
+ CancelMenuTracking is available.
+
+ * macterm.c [USE_CG_TEXT_DRAWING] (mac_draw_image_string_cg)
+ [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
+ && MAC_OS_X_VERSION_MIN_REQUIRED == 1020]: Check if
+ CGContextShowGlyphsWithAdvances is available.
+
+2006-11-13 Jason Rumney <jasonr@gnu.org>
+
+ * s/ms-w32.h: Define HAVE_INET_SOCKETS.
+
+2006-11-13 Nozomu Ando <nand@mac.com>
+
+ * alloc.c (mark_memory): New argument OFFSET. All uses changed.
+ Fix address calculations for case END < START.
+ (mark_stack): Impose Lisp_Object alignment on jmp_buf.
+
+2006-11-12 Juanma Barranquero <lekktu@gmail.com>
+
+ * coding.c (Fencode_sjis_char, Fencode_big5_char):
+ Improve argument/docstring consistency.
+
+ * editfns.c (Fmessage): Doc fixes.
+
+ * process.c (syms_of_process) <delete-exited-processes>: Doc fix.
+
+2006-11-12 Chong Yidong <cyd@stupidchicken.com>
+
+ * xmenu.c (popup_activated): Define outside HAVE_MENUS.
+
+2006-11-12 Romain Francoise <romain@orebokech.com>
+
+ * xselect.c (selection-coding-system): Fix docstring.
+
+2006-11-12 Juanma Barranquero <lekktu@gmail.com>
+
+ * category.c (Fchar_category_set): Improve arg/docstring consistency.
+
+ * data.c (Flogxor):
+ * fns.c (Frandom, Flength, Fsafe_length, Fstring_bytes)
+ (Fstring_equal, Fcompare_strings, Fstring_lessp, Fcopy_sequence)
+ (Fstring_make_unibyte): Fix typos in docstrings.
+
+2006-11-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * xterm.h (struct x_display_info): Fix indentation.
+
+ * xterm.c (do_ewmh_fullscreen, XTfullscreen_hook): New functions.
+ (x_check_fullscreen): Call do_ewmh_fullscreen.
+ (x_initialize): Set fullscreen_hook to XTfullscreen_hook.
+
+ * frame.c (x_set_fullscreen): Call fullscreen_hook if set.
+
+ * term.c: Define fullscreen_hook.
+ (syms_of_term): Initialize fullscreen_hook to NULL.
+
+ * termhooks.h: Add fullscreen_hook.
+
+2006-11-08 Juanma Barranquero <lekktu@gmail.com>
+
+ * bytecode.c (Fbyte_code):
+ * data.c (Fmakunbound): Use SYMBOL_CONSTANT_P macro.
+
2006-11-06 Juanma Barranquero <lekktu@gmail.com>
* lread.c (syms_of_lread):
@@ -716,7 +843,7 @@
* editfns.c (Fsystem_name): Mention "host" in the doc string.
(syms_of_editfns) <system-name>: Likewise.
-2006-08-27 Martin Rudalics <rudalics@gmx.at>
+2006-09-08 Martin Rudalics <rudalics@gmx.at>
* xdisp.c (mouse_autoselect_window): Remove.
(Vmouse_autoselect_window): New variable. DEFVAR_LISP it.
@@ -26367,6 +26494,7 @@ See ChangeLog.9 for earlier changes.
;; Local Variables:
;; coding: iso-2022-7bit
+;; add-log-time-zone-rule: t
;; End:
Copyright (C) 2001, 2002, 2003, 2004, 2005,
diff --git a/src/alloc.c b/src/alloc.c
index 94be9fa6132..8ebaac74c08 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -478,7 +478,7 @@ static int live_symbol_p P_ ((struct mem_node *, void *));
static int live_float_p P_ ((struct mem_node *, void *));
static int live_misc_p P_ ((struct mem_node *, void *));
static void mark_maybe_object P_ ((Lisp_Object));
-static void mark_memory P_ ((void *, void *));
+static void mark_memory P_ ((void *, void *, int));
static void mem_init P_ ((void));
static struct mem_node *mem_insert P_ ((void *, void *, enum mem_type));
static void mem_insert_fixup P_ ((struct mem_node *));
@@ -4284,11 +4284,13 @@ mark_maybe_pointer (p)
}
-/* Mark Lisp objects referenced from the address range START..END. */
+/* Mark Lisp objects referenced from the address range START+OFFSET..END
+ or END+OFFSET..START. */
static void
-mark_memory (start, end)
+mark_memory (start, end, offset)
void *start, *end;
+ int offset;
{
Lisp_Object *p;
void **pp;
@@ -4307,7 +4309,7 @@ mark_memory (start, end)
}
/* Mark Lisp_Objects. */
- for (p = (Lisp_Object *) start; (void *) p < end; ++p)
+ for (p = (Lisp_Object *) ((char *) start + offset); (void *) p < end; ++p)
mark_maybe_object (*p);
/* Mark Lisp data pointed to. This is necessary because, in some
@@ -4328,7 +4330,7 @@ mark_memory (start, end)
away. The only reference to the life string is through the
pointer `s'. */
- for (pp = (void **) start; (void *) pp < end; ++pp)
+ for (pp = (void **) ((char *) start + offset); (void *) pp < end; ++pp)
mark_maybe_pointer (*pp);
}
@@ -4507,7 +4509,11 @@ static void
mark_stack ()
{
int i;
- jmp_buf j;
+ /* jmp_buf may not be aligned enough on darwin-ppc64 */
+ union aligned_jmpbuf {
+ Lisp_Object o;
+ jmp_buf j;
+ } j;
volatile int stack_grows_down_p = (char *) &j > (char *) stack_base;
void *end;
@@ -4538,7 +4544,7 @@ mark_stack ()
}
#endif /* GC_SETJMP_WORKS */
- setjmp (j);
+ setjmp (j.j);
end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j;
#endif /* not GC_SAVE_REGISTERS_ON_STACK */
@@ -4553,7 +4559,7 @@ mark_stack ()
#endif
#endif
for (i = 0; i < sizeof (Lisp_Object); i += GC_LISP_OBJECT_ALIGNMENT)
- mark_memory ((char *) stack_base + i, end);
+ mark_memory (stack_base, end, i);
/* Allow for marking a secondary stack, like the register stack on the
ia64. */
#ifdef GC_MARK_SECONDARY_STACK
diff --git a/src/bytecode.c b/src/bytecode.c
index 3ee9b5576b4..6476070be5d 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -597,7 +597,7 @@ If the third argument is incorrect, Emacs may crash. */)
if (SYMBOLP (sym)
&& !EQ (val, Qunbound)
&& !XSYMBOL (sym)->indirect_variable
- && !XSYMBOL (sym)->constant
+ && !SYMBOL_CONSTANT_P (sym)
&& !MISCP (XSYMBOL (sym)->value))
XSYMBOL (sym)->value = val;
else
diff --git a/src/category.c b/src/category.c
index b9f80982ee7..cb6385fdb25 100644
--- a/src/category.c
+++ b/src/category.c
@@ -280,7 +280,8 @@ char_category_set (c)
}
DEFUN ("char-category-set", Fchar_category_set, Schar_category_set, 1, 1, 0,
- doc: /* Return the category set of CHAR. */)
+ doc: /* Return the category set of CHAR.
+usage: (char-category-set CHAR) */)
(ch)
Lisp_Object ch;
{
diff --git a/src/coding.c b/src/coding.c
index 644f649ad36..28ab86c43fc 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -8184,7 +8184,7 @@ Return the corresponding character. */)
DEFUN ("encode-sjis-char", Fencode_sjis_char, Sencode_sjis_char, 1, 1, 0,
- doc: /* Encode a Japanese character CHAR to shift_jis encoding.
+ doc: /* Encode a Japanese character CH to shift_jis encoding.
Return the corresponding code in SJIS. */)
(ch)
Lisp_Object ch;
@@ -8252,7 +8252,7 @@ Return the corresponding character. */)
}
DEFUN ("encode-big5-char", Fencode_big5_char, Sencode_big5_char, 1, 1, 0,
- doc: /* Encode the Big5 character CHAR to BIG5 coding system.
+ doc: /* Encode the Big5 character CH to BIG5 coding system.
Return the corresponding character code in Big5. */)
(ch)
Lisp_Object ch;
diff --git a/src/config.in b/src/config.in
index 106aeea920c..10135ade386 100644
--- a/src/config.in
+++ b/src/config.in
@@ -99,9 +99,6 @@ Boston, MA 02110-1301, USA. */
/* Define to 1 if you have the `bzero' function. */
#undef HAVE_BZERO
-/* Define to 1 if CancelMenuTracking is available (Mac OSX). */
-#undef HAVE_CANCELMENUTRACKING
-
/* Define to 1 if you are using the Carbon API on Mac OS X. */
#undef HAVE_CARBON
diff --git a/src/data.c b/src/data.c
index 4a846207073..00ef0b1c822 100644
--- a/src/data.c
+++ b/src/data.c
@@ -606,7 +606,7 @@ Return SYMBOL. */)
register Lisp_Object symbol;
{
CHECK_SYMBOL (symbol);
- if (XSYMBOL (symbol)->constant)
+ if (SYMBOL_CONSTANT_P (symbol))
xsignal1 (Qsetting_constant, symbol);
Fset (symbol, Qunbound);
return symbol;
@@ -2673,7 +2673,7 @@ usage: (logior &rest INTS-OR-MARKERS) */)
DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0,
doc: /* Return bitwise-exclusive-or of all the arguments.
Arguments may be integers, or markers converted to integers.
-usage: (logxor &rest INTS-OR-MARKERS) */)
+usage: (logxor &rest INTS-OR-MARKERS) */)
(nargs, args)
int nargs;
Lisp_Object *args;
diff --git a/src/editfns.c b/src/editfns.c
index 0206cd1b913..79a88604d8c 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3303,9 +3303,10 @@ static char *message_text;
static int message_length;
DEFUN ("message", Fmessage, Smessage, 1, MANY, 0,
- doc: /* Print a one-line message at the bottom of the screen.
+ doc: /* Display a message at the bottom of the screen.
The message also goes into the `*Messages*' buffer.
\(In keyboard macros, that's all it does.)
+Return the message.
The first argument is a format control string, and the rest are data
to be formatted under control of the string. See `format' for details.
diff --git a/src/fileio.c b/src/fileio.c
index 9b611bb7fd1..601c5b5de9d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1252,9 +1252,9 @@ See also the function `substitute-in-file-name'. */)
}
else
#endif /* NO_HYPHENS_IN_FILENAMES */
- if (lbrack > rbrack &&
- ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') &&
- (p[1] == '.' || p[1] == ']' || p[1] == '>')))
+ if (lbrack > rbrack
+ && ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<')
+ && (p[1] == '.' || p[1] == ']' || p[1] == '>')))
lose = 1;
#ifdef NO_HYPHENS_IN_FILENAMES
else
@@ -1623,8 +1623,8 @@ See also the function `substitute-in-file-name'. */)
else if (*p == '-' && *o != '.')
*--p = '.';
}
- else if (p[0] == '-' && o[-1] == '.' &&
- (p[1] == '.' || p[1] == ']' || p[1] == '>'))
+ else if (p[0] == '-' && o[-1] == '.'
+ && (p[1] == '.' || p[1] == ']' || p[1] == '>'))
/* flush .foo.- ; leave - if stopped by '[' or '<' */
{
do
@@ -1639,9 +1639,9 @@ See also the function `substitute-in-file-name'. */)
else
{
#ifdef NO_HYPHENS_IN_FILENAMES
- if (*p == '-' &&
- o[-1] != '[' && o[-1] != '<' && o[-1] != '.' &&
- p[1] != ']' && p[1] != '>' && p[1] != '.')
+ if (*p == '-'
+ && o[-1] != '[' && o[-1] != '<' && o[-1] != '.'
+ && p[1] != ']' && p[1] != '>' && p[1] != '.')
*p = '_';
#endif /* NO_HYPHENS_IN_FILENAMES */
*o++ = *p++;
@@ -1824,9 +1824,9 @@ See also the function `substitute-in-file-name'.")
}
else
#endif /* VMS4_4 */
- if (lbrack > rbrack &&
- ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') &&
- (p[1] == '.' || p[1] == ']' || p[1] == '>')))
+ if (lbrack > rbrack
+ && ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<')
+ && (p[1] == '.' || p[1] == ']' || p[1] == '>')))
lose = 1;
#ifndef VMS4_4
else
@@ -1995,8 +1995,8 @@ See also the function `substitute-in-file-name'.")
else if (*p == '-' && *o != '.')
*--p = '.';
}
- else if (p[0] == '-' && o[-1] == '.' &&
- (p[1] == '.' || p[1] == ']' || p[1] == '>'))
+ else if (p[0] == '-' && o[-1] == '.'
+ && (p[1] == '.' || p[1] == ']' || p[1] == '>'))
/* flush .foo.- ; leave - if stopped by '[' or '<' */
{
do
@@ -2011,9 +2011,9 @@ See also the function `substitute-in-file-name'.")
else
{
#ifndef VMS4_4
- if (*p == '-' &&
- o[-1] != '[' && o[-1] != '<' && o[-1] != '.' &&
- p[1] != ']' && p[1] != '>' && p[1] != '.')
+ if (*p == '-'
+ && o[-1] != '[' && o[-1] != '<' && o[-1] != '.'
+ && p[1] != ']' && p[1] != '>' && p[1] != '.')
*p = '_';
#endif /* VMS4_4 */
*o++ = *p++;
@@ -2033,8 +2033,8 @@ See also the function `substitute-in-file-name'.")
o = target;
p++;
}
- else if (p[0] == '/' && p[1] == '.' &&
- (p[2] == '/' || p[2] == 0))
+ else if (p[0] == '/' && p[1] == '.'
+ && (p[2] == '/' || p[2] == 0))
p += 2;
else if (!strncmp (p, "/..", 3)
/* `/../' is the "superroot" on certain file systems. */
diff --git a/src/fns.c b/src/fns.c
index 64223d83e8c..e6b83b8e4e1 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -103,7 +103,7 @@ DEFUN ("random", Frandom, Srandom, 0, 1, 0,
All integers representable in Lisp are equally likely.
On most systems, this is 29 bits' worth.
With positive integer argument N, return random number in interval [0,N).
-With argument t, set the random number seed from the current time and pid. */)
+With argument t, set the random number seed from the current time and pid. */)
(n)
Lisp_Object n;
{
@@ -140,7 +140,7 @@ DEFUN ("length", Flength, Slength, 1, 1, 0,
A byte-code function object is also allowed.
If the string contains multibyte characters, this is not necessarily
the number of bytes in the string; it is the number of characters.
-To get the number of bytes, use `string-bytes'. */)
+To get the number of bytes, use `string-bytes'. */)
(sequence)
register Lisp_Object sequence;
{
@@ -191,7 +191,7 @@ DEFUN ("safe-length", Fsafe_length, Ssafe_length, 1, 1, 0,
doc: /* Return the length of a list, but avoid error or infinite loop.
This function never gets an error. If LIST is not really a list,
it returns 0. If LIST is circular, it returns a finite value
-which is at least the number of distinct elements. */)
+which is at least the number of distinct elements. */)
(list)
Lisp_Object list;
{
@@ -215,7 +215,7 @@ which is at least the number of distinct elements. */)
DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0,
doc: /* Return the number of bytes in STRING.
-If STRING is multibyte, this may be greater than the length of STRING. */)
+If STRING is multibyte, this may be greater than the length of STRING. */)
(string)
Lisp_Object string;
{
@@ -226,7 +226,7 @@ If STRING is multibyte, this may be greater than the length of STRING. */)
DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0,
doc: /* Return t if two strings have identical contents.
Case is significant, but text properties are ignored.
-Symbols are also allowed; their print names are used instead. */)
+Symbols are also allowed; their print names are used instead. */)
(s1, s2)
register Lisp_Object s1, s2;
{
@@ -258,7 +258,7 @@ The value is t if the strings (or specified portions) match.
If string STR1 is less, the value is a negative number N;
- 1 - N is the number of characters that match at the beginning.
If string STR1 is greater, the value is a positive number N;
- N - 1 is the number of characters that match at the beginning. */)
+ N - 1 is the number of characters that match at the beginning. */)
(str1, start1, end1, str2, start2, end2, ignore_case)
Lisp_Object str1, start1, end1, start2, str2, end2, ignore_case;
{
@@ -350,7 +350,7 @@ If string STR1 is greater, the value is a positive number N;
DEFUN ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0,
doc: /* Return t if first arg string is less than second in lexicographic order.
Case is significant.
-Symbols are also allowed; their print names are used instead. */)
+Symbols are also allowed; their print names are used instead. */)
(s1, s2)
register Lisp_Object s1, s2;
{
@@ -390,6 +390,8 @@ Symbols are also allowed; their print names are used instead. */)
the arguments for the invocations of this function, whereas it
expects these values on the stack. */
static Lisp_Object concat () __attribute__((noinline));
+#else /* !__GNUC__ */
+static Lisp_Object concat ();
#endif
/* ARGSUSED */
@@ -464,7 +466,7 @@ usage: (vconcat &rest SEQUENCES) */)
DEFUN ("copy-sequence", Fcopy_sequence, Scopy_sequence, 1, 1, 0,
doc: /* Return a copy of a list, vector, string or char-table.
The elements of a list or vector are not copied; they are shared
-with the original. */)
+with the original. */)
(arg)
Lisp_Object arg;
{
@@ -1031,7 +1033,7 @@ DEFUN ("string-make-unibyte", Fstring_make_unibyte, Sstring_make_unibyte,
Multibyte character codes are converted to unibyte according to
`nonascii-translation-table' or, if that is nil, `nonascii-insert-offset'.
If the lookup in the translation table fails, this function takes just
-the low 8 bits of each character. */)
+the low 8 bits of each character. */)
(string)
Lisp_Object string;
{
diff --git a/src/frame.c b/src/frame.c
index 618022b28b6..eebfd8eeb13 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3047,6 +3047,9 @@ x_set_fullscreen (f, new_value, old_value)
f->want_fullscreen = FULLSCREEN_WIDTH;
else if (EQ (new_value, Qfullheight))
f->want_fullscreen = FULLSCREEN_HEIGHT;
+
+ if (fullscreen_hook != NULL)
+ fullscreen_hook (f);
}
diff --git a/src/indent.c b/src/indent.c
index 6a3cda9e9d5..368609bad64 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2088,10 +2088,10 @@ whether or not it is currently displayed in some window. */)
it_start = IT_CHARPOS (it);
/* We expect the call to move_it_to, further down, to overshoot
- if the starting point is on an image, stretch glyph, or Lisp
- string. We won't need to backtrack in this situation, except
- for one corner case: when the Lisp string contains a
- newline. */
+ if the starting point is on an image, stretch glyph,
+ composition, or Lisp string. We won't need to backtrack in
+ this situation, except for one corner case: when the Lisp
+ string contains a newline. */
if (it.method == GET_FROM_STRING)
{
const char *s = SDATA (it.string);
@@ -2104,7 +2104,8 @@ whether or not it is currently displayed in some window. */)
}
else
it_overshoot_expected_p = (it.method == GET_FROM_IMAGE
- || it.method == GET_FROM_STRETCH);
+ || it.method == GET_FROM_STRETCH
+ || it.method == GET_FROM_COMPOSITION);
reseat_at_previous_visible_line_start (&it);
it.current_x = it.hpos = 0;
diff --git a/src/macfns.c b/src/macfns.c
index ca55bced6c7..2148ec3e1ad 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -3092,18 +3092,30 @@ If omitted or nil, that stands for the selected frame's display. */)
Lisp_Object display;
{
struct mac_display_info *dpyinfo = check_x_display_info (display);
+
/* Only of the main display. */
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
- CGSize size;
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ if (CGDisplayScreenSize != NULL)
+#endif
+ {
+ CGSize size;
- BLOCK_INPUT;
- size = CGDisplayScreenSize (kCGDirectMainDisplay);
- UNBLOCK_INPUT;
+ BLOCK_INPUT;
+ size = CGDisplayScreenSize (kCGDirectMainDisplay);
+ UNBLOCK_INPUT;
- return make_number ((int) (size.height + .5f));
-#else
- /* This is an approximation. */
- return make_number ((int) (dpyinfo->height * 25.4 / dpyinfo->resy));
+ return make_number ((int) (size.height + .5f));
+ }
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ else
+#endif
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ {
+ /* This is an approximation. */
+ return make_number ((int) (dpyinfo->height * 25.4 / dpyinfo->resy));
+ }
#endif
}
@@ -3116,18 +3128,30 @@ If omitted or nil, that stands for the selected frame's display. */)
Lisp_Object display;
{
struct mac_display_info *dpyinfo = check_x_display_info (display);
+
/* Only of the main display. */
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
- CGSize size;
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ if (CGDisplayScreenSize != NULL)
+#endif
+ {
+ CGSize size;
- BLOCK_INPUT;
- size = CGDisplayScreenSize (kCGDirectMainDisplay);
- UNBLOCK_INPUT;
+ BLOCK_INPUT;
+ size = CGDisplayScreenSize (kCGDirectMainDisplay);
+ UNBLOCK_INPUT;
- return make_number ((int) (size.width + .5f));
-#else
- /* This is an approximation. */
- return make_number ((int) (dpyinfo->width * 25.4 / dpyinfo->resx));
+ return make_number ((int) (size.width + .5f));
+ }
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ else
+#endif
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ {
+ /* This is an approximation. */
+ return make_number ((int) (dpyinfo->width * 25.4 / dpyinfo->resx));
+ }
#endif
}
diff --git a/src/macmenu.c b/src/macmenu.c
index d8303dbdc25..14bfe92cb25 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -319,7 +319,7 @@ restore_menu_items (saved)
menu_items_used = XINT (XCAR (saved));
saved = XCDR (saved);
menu_items_n_panes = XINT (XCAR (saved));
- saved = XCDR (saved);
+ saved = XCDR (saved);
menu_items_submenu_depth = XINT (XCAR (saved));
return Qnil;
}
@@ -1453,7 +1453,7 @@ update_submenu_strings (first_wv)
/* Event handler function that pops down a menu on C-g. We can only pop
down menus if CancelMenuTracking is present (OSX 10.3 or later). */
-#ifdef HAVE_CANCELMENUTRACKING
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
static pascal OSStatus
menu_quit_handler (nextHandler, theEvent, userData)
EventHandlerCallRef nextHandler;
@@ -1487,7 +1487,7 @@ menu_quit_handler (nextHandler, theEvent, userData)
return CallNextEventHandler (nextHandler, theEvent);
}
-#endif /* HAVE_CANCELMENUTRACKING */
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
/* Add event handler to all menus that belong to KIND so we can detect C-g.
MENU_HANDLE is the root menu of the tracking session to dismiss
@@ -1499,11 +1499,15 @@ install_menu_quit_handler (kind, menu_handle)
enum mac_menu_kind kind;
MenuHandle menu_handle;
{
-#ifdef HAVE_CANCELMENUTRACKING
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
static const EventTypeSpec typesList[] =
{{kEventClassKeyboard, kEventRawKeyDown}};
int id;
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ if (CancelMenuTracking == NULL)
+ return;
+#endif
for (id = min_menu_id[kind]; id < min_menu_id[kind + 1]; id++)
{
MenuHandle menu = GetMenuHandle (id);
@@ -1512,9 +1516,9 @@ install_menu_quit_handler (kind, menu_handle)
break;
InstallMenuEventHandler (menu, menu_quit_handler,
GetEventTypeCount (typesList),
- typesList, menu_handle, NULL);
+ typesList, menu_handle, NULL);
}
-#endif /* HAVE_CANCELMENUTRACKING */
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
}
/* Set the contents of the menubar widgets of frame F.
diff --git a/src/macterm.c b/src/macterm.c
index 87419cac365..ff36e9501c6 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -1362,20 +1362,31 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width, overstrike_p)
if (GC_FONT (gc)->mac_fontsize <= cg_text_anti_aliasing_threshold)
CGContextSetShouldAntialias (context, false);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
- CGContextSetTextPosition (context, gx, gy);
- CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
- if (overstrike_p)
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ if (CGContextShowGlyphsWithAdvances != NULL)
+#endif
{
- CGContextSetTextPosition (context, gx + 1.0f, gy);
+ CGContextSetTextPosition (context, gx, gy);
CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
+ if (overstrike_p)
+ {
+ CGContextSetTextPosition (context, gx + 1.0f, gy);
+ CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
+ }
}
-#else
- for (i = 0; i < nchars; i++)
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ else
+#endif
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
{
- CGContextShowGlyphsAtPoint (context, gx, gy, glyphs + i, 1);
- if (overstrike_p)
- CGContextShowGlyphsAtPoint (context, gx + 1.0f, gy, glyphs + i, 1);
- gx += advances[i].width;
+ for (i = 0; i < nchars; i++)
+ {
+ CGContextShowGlyphsAtPoint (context, gx, gy, glyphs + i, 1);
+ if (overstrike_p)
+ CGContextShowGlyphsAtPoint (context, gx + 1.0f, gy, glyphs + i, 1);
+ gx += advances[i].width;
+ }
}
#endif
#if USE_CG_DRAWING
diff --git a/src/minibuf.c b/src/minibuf.c
index f6824ae351b..316f487e0ff 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1683,7 +1683,7 @@ Lisp_Object Vminibuffer_completing_file_name;
DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0,
doc: /* Read a string in the minibuffer, with completion.
PROMPT is a string to prompt with; normally it ends in a colon and a space.
-TABLE can be an list of strings, an alist, an obarray or a hash table.
+TABLE can be a list of strings, an alist, an obarray or a hash table.
TABLE can also be a function to do the completion itself.
PREDICATE limits completion to a subset of TABLE.
See `try-completion' and `all-completions' for more details
diff --git a/src/process.c b/src/process.c
index 4497c1d38c0..7042077471c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -7060,7 +7060,7 @@ syms_of_process ()
DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes,
doc: /* *Non-nil means delete processes immediately when they exit.
-nil means don't delete them until `list-processes' is run. */);
+A value of nil means don't delete them until `list-processes' is run. */);
delete_exited_processes = 1;
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 55d9a725293..7116d24c718 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -377,7 +377,7 @@ Boston, MA 02110-1301, USA. */
extern void *__libc_ia64_register_backing_store_base; \
__builtin_ia64_flushrs (); \
mark_memory (__libc_ia64_register_backing_store_base, \
- __builtin_ia64_bsp ()); \
+ __builtin_ia64_bsp (), 0); \
} while (0)
#endif
#endif
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index fa4ca565171..461df7acfba 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -279,7 +279,7 @@ Boston, MA 02110-1301, USA. */
#define HAVE_STRFTIME 1
#define LOCALTIME_CACHE
-#undef HAVE_INET_SOCKETS
+#define HAVE_INET_SOCKETS 1
#undef HAVE_AIX_SMT_EXP
diff --git a/src/search.c b/src/search.c
index 7c1090aa2bf..15a7d54852a 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1534,7 +1534,7 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte)
int this_len = len;
unsigned char *p = pat;
- if (pos - len < lim)
+ if (this_pos < lim || this_pos_byte < lim_byte)
goto stop;
while (this_len > 0)
diff --git a/src/term.c b/src/term.c
index 06696c32d15..7f25eb36328 100644
--- a/src/term.c
+++ b/src/term.c
@@ -193,6 +193,11 @@ void (*frame_rehighlight_hook) P_ ((FRAME_PTR f));
void (*frame_raise_lower_hook) P_ ((FRAME_PTR f, int raise));
+/* If the value of the frame parameter changed, whis hook is called.
+ For example, if going from fullscreen to not fullscreen this hook
+ may do something OS dependent, like extended window manager hints on X11. */
+void (*fullscreen_hook) P_ ((struct frame *f));
+
/* Set the vertical scroll bar for WINDOW to have its upper left corner
at (TOP, LEFT), and be LENGTH rows high. Set its handle to
indicate that we are displaying PORTION characters out of a total
@@ -2876,6 +2881,8 @@ bigger, or it may make it blink, or it may do nothing at all. */);
defsubr (&Stty_display_color_p);
defsubr (&Stty_display_color_cells);
defsubr (&Stty_no_underline);
+
+ fullscreen_hook = NULL;
}
/* arch-tag: 498e7449-6f2e-45e2-91dd-b7d4ca488193
diff --git a/src/termhooks.h b/src/termhooks.h
index de43d580c9b..2b9e947996e 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -120,6 +120,11 @@ extern void (*frame_rehighlight_hook) P_ ((struct frame *));
windows. */
extern void (*frame_raise_lower_hook) P_ ((struct frame *f, int raise));
+/* If the value of the frame parameter changed, whis hook is called.
+ For example, if going from fullscreen to not fullscreen this hook
+ may do something OS dependent, like extended window manager hints on X11. */
+extern void (*fullscreen_hook) P_ ((struct frame *f));
+
/* Scroll bar hooks. */
diff --git a/src/xfaces.c b/src/xfaces.c
index 1123e6649e9..6c04a91a125 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6587,7 +6587,7 @@ face for italic. */)
(attributes, display)
Lisp_Object attributes, display;
{
- int supports, i;
+ int supports = 0, i;
Lisp_Object frame;
struct frame *f;
struct face *def_face;
diff --git a/src/xmenu.c b/src/xmenu.c
index 829a6653767..5066c9076e3 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -822,7 +822,7 @@ no quit occurs and `x-popup-menu' returns nil. */)
int xpos = 0, ypos = 0;
Lisp_Object title;
char *error_name = NULL;
- Lisp_Object selection;
+ Lisp_Object selection = Qnil;
FRAME_PTR f = NULL;
Lisp_Object x, y, window;
int keymaps = 0;
@@ -1488,14 +1488,6 @@ x_activate_menubar (f)
f->output_data.x->saved_menu_event->type = 0;
}
-/* Detect if a dialog or menu has been posted. */
-
-int
-popup_activated ()
-{
- return popup_activated_flag;
-}
-
/* This callback is invoked when the user selects a menubar cascade
pushbutton, but before the pulldown menu is posted. */
@@ -3762,6 +3754,13 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
#endif /* HAVE_MENUS */
+/* Detect if a dialog or menu has been posted. */
+
+int
+popup_activated ()
+{
+ return popup_activated_flag;
+}
/* The following is used by delayed window autoselection. */
diff --git a/src/xselect.c b/src/xselect.c
index 022226946a9..cb76e229e55 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -123,8 +123,8 @@ Lisp_Object QCUT_BUFFER0, QCUT_BUFFER1, QCUT_BUFFER2, QCUT_BUFFER3,
static Lisp_Object Vx_lost_selection_functions;
static Lisp_Object Vx_sent_selection_functions;
-/* Coding system for communicating with other X clients via cutbuffer,
- selection, and clipboard. */
+/* Coding system for communicating with other X clients via selection
+ and clipboard. */
static Lisp_Object Vselection_coding_system;
/* Coding system for the next communicating with other X clients. */
@@ -2975,8 +2975,8 @@ it merely informs you that they have happened. */);
DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system,
doc: /* Coding system for communicating with other X clients.
-When sending or receiving text via cut_buffer, selection, and clipboard,
-the text is encoded or decoded by this coding system.
+When sending or receiving text via selection and clipboard, the text is
+encoded or decoded by this coding system.
The default value is `compound-text-with-extensions'. */);
Vselection_coding_system = intern ("compound-text-with-extensions");
diff --git a/src/xterm.c b/src/xterm.c
index 8849ef3dab4..6fdaaa83d93 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8595,6 +8595,119 @@ x_set_offset (f, xoff, yoff, change_gravity)
UNBLOCK_INPUT;
}
+/* Do fullscreen as specified in extended window manager hints */
+static int
+do_ewmh_fullscreen (f)
+ struct frame *f;
+{
+ int have_net_atom = FRAME_X_DISPLAY_INFO (f)->have_net_atoms;
+
+ if (!have_net_atom)
+ {
+ int num;
+ Atom *atoms = XListProperties (FRAME_X_DISPLAY (f),
+ FRAME_X_DISPLAY_INFO (f)->root_window,
+ &num);
+ if (atoms && num > 0)
+ {
+ char **names = (char **) xmalloc (num * sizeof(*names));
+ if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names))
+ {
+ int i;
+ for (i = 0; i < num; ++i)
+ {
+ if (!have_net_atom)
+ have_net_atom = strncmp (names[i], "_NET_", 5) == 0;
+ XFree (names[i]);
+ }
+ }
+ xfree (names);
+ }
+ if (atoms)
+ XFree (atoms);
+
+ FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom;
+ }
+
+ if (have_net_atom)
+ {
+ Lisp_Object frame;
+ const char *atom = "_NET_WM_STATE";
+ const char *fs = "_NET_WM_STATE_FULLSCREEN";
+ const char *fw = "_NET_WM_STATE_MAXIMIZED_HORZ";
+ const char *fh = "_NET_WM_STATE_MAXIMIZED_VERT";
+ const char *what = NULL;
+
+ XSETFRAME (frame, f);
+
+ /* If there are _NET_ atoms we assume we have extended window manager
+ hints. */
+ switch (f->want_fullscreen)
+ {
+ case FULLSCREEN_BOTH:
+ what = fs;
+ break;
+ case FULLSCREEN_WIDTH:
+ what = fw;
+ break;
+ case FULLSCREEN_HEIGHT:
+ what = fh;
+ break;
+ }
+
+ Fx_send_client_event (frame, make_number (0), frame,
+ make_unibyte_string (atom, strlen (atom)),
+ make_number (32),
+ Fcons (make_number (0), /* Remove */
+ Fcons
+ (make_unibyte_string (fs,
+ strlen (fs)),
+ Qnil)));
+ Fx_send_client_event (frame, make_number (0), frame,
+ make_unibyte_string (atom, strlen (atom)),
+ make_number (32),
+ Fcons (make_number (0), /* Remove */
+ Fcons
+ (make_unibyte_string (fh,
+ strlen (fh)),
+ Qnil)));
+ Fx_send_client_event (frame, make_number (0), frame,
+ make_unibyte_string (atom, strlen (atom)),
+ make_number (32),
+ Fcons (make_number (0), /* Remove */
+ Fcons
+ (make_unibyte_string (fw,
+ strlen (fw)),
+ Qnil)));
+ f->want_fullscreen = FULLSCREEN_NONE;
+ if (what != NULL)
+ Fx_send_client_event (frame, make_number (0), frame,
+ make_unibyte_string (atom, strlen (atom)),
+ make_number (32),
+ Fcons (make_number (1), /* Add */
+ Fcons
+ (make_unibyte_string (what,
+ strlen (what)),
+ Qnil)));
+ }
+
+ return have_net_atom;
+}
+
+static void
+XTfullscreen_hook (f)
+ FRAME_PTR f;
+{
+ if (f->async_visible)
+ {
+ BLOCK_INPUT;
+ do_ewmh_fullscreen (f);
+ x_sync (f);
+ UNBLOCK_INPUT;
+ }
+}
+
+
/* Check if we need to resize the frame due to a fullscreen request.
If so needed, resize the frame. */
static void
@@ -8605,6 +8718,9 @@ x_check_fullscreen (f)
{
int width, height, ign;
+ if (do_ewmh_fullscreen (f))
+ return;
+
x_real_positions (f, &f->left_pos, &f->top_pos);
x_fullscreen_adjust (f, &width, &height, &ign, &ign);
@@ -11398,6 +11514,7 @@ x_initialize ()
condemn_scroll_bars_hook = XTcondemn_scroll_bars;
redeem_scroll_bar_hook = XTredeem_scroll_bar;
judge_scroll_bars_hook = XTjudge_scroll_bars;
+ fullscreen_hook = XTfullscreen_hook;
scroll_region_ok = 1; /* we'll scroll partial frames */
char_ins_del_ok = 1;
diff --git a/src/xterm.h b/src/xterm.h
index 7f8f0945aef..35ab0816286 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -391,10 +391,12 @@ struct x_display_info
} wm_type;
- /* Atoms that are drag and drop atoms */
- Atom *x_dnd_atoms;
- size_t x_dnd_atoms_size;
- size_t x_dnd_atoms_length;
+ /* Atoms that are drag and drop atoms */
+ Atom *x_dnd_atoms;
+ size_t x_dnd_atoms_size;
+ size_t x_dnd_atoms_length;
+
+ int have_net_atoms;
};
#ifdef HAVE_X_I18N