summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-02-10 10:58:48 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2012-02-10 10:58:48 -0800
commit6e6c82a4e687708d5a7a3887f92db45bd74da276 (patch)
tree85dc3105240e84a8cddadb25d572e170fcdbd8bc /src
parent78df1fb1d46d556bfc2698ca1802972b13613ba8 (diff)
parentcc26d239af9a82cff079556a1daff4b4bf60eb5c (diff)
downloademacs-6e6c82a4e687708d5a7a3887f92db45bd74da276.tar.gz
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit38
-rw-r--r--src/ChangeLog160
-rw-r--r--src/buffer.c14
-rw-r--r--src/callproc.c5
-rw-r--r--src/character.c79
-rw-r--r--src/coding.c10
-rw-r--r--src/dbusbind.c11
-rw-r--r--src/dispnew.c19
-rw-r--r--src/doc.c6
-rw-r--r--src/eval.c15
-rw-r--r--src/floatfns.c2
-rw-r--r--src/fns.c15
-rw-r--r--src/gnutls.c5
-rw-r--r--src/image.c23
-rw-r--r--src/keyboard.c29
-rw-r--r--src/lread.c3
-rw-r--r--src/minibuf.c22
-rw-r--r--src/nsterm.m16
-rw-r--r--src/process.c10
-rw-r--r--src/ralloc.c15
-rw-r--r--src/s/gnu.h2
-rw-r--r--src/search.c8
-rw-r--r--src/w32.c3
-rw-r--r--src/w32term.c4
-rw-r--r--src/window.c36
-rw-r--r--src/xdisp.c8
-rw-r--r--src/xfaces.c2
-rw-r--r--src/xterm.c4
28 files changed, 368 insertions, 196 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index b60c14fe289..fc8eab6d1df 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -67,10 +67,7 @@ end
# from calling OutputDebugString, which causes GDB to display each
# character twice (yuk!).
define pr
- set $output_debug = print_output_debug_flag
- set print_output_debug_flag = 0
- set debug_print ($)
- set print_output_debug_flag = $output_debug
+ pp $
end
document pr
Print the emacs s-expression which is $.
@@ -90,48 +87,17 @@ Print the argument as an emacs s-expression
Works only when an inferior emacs is executing.
end
-# Print out s-expressions from tool bar
-define pp1
- set $tmp = $arg0
- set $output_debug = print_output_debug_flag
- set print_output_debug_flag = 0
- set safe_debug_print ($tmp)
- set print_output_debug_flag = $output_debug
-end
-document pp1
-Print the argument as an emacs s-expression.
-Works only when an inferior emacs is executing.
-For use on tool bar when debugging in Emacs
-where the variable name would not otherwise
-be recorded in the GUD buffer.
-end
-
# Print value of lisp variable
define pv
set $tmp = "$arg0"
set $output_debug = print_output_debug_flag
set print_output_debug_flag = 0
- set safe_debug_print ( find_symbol_value (intern ($tmp)))
- set print_output_debug_flag = $output_debug
-end
-document pv
-Print the value of the lisp variable given as argument.
-Works only when an inferior emacs is executing.
-end
-
-# Print value of lisp variable
-define pv1
- set $tmp = "$arg0"
- set $output_debug = print_output_debug_flag
- set print_output_debug_flag = 0
set safe_debug_print (find_symbol_value (intern ($tmp)))
set print_output_debug_flag = $output_debug
end
-document pv1
+document pv
Print the value of the lisp variable given as argument.
Works only when an inferior emacs is executing.
-For use when debugging in Emacs where the variable
-name would not otherwise be recorded in the GUD buffer.
end
# Print out current buffer point and boundaries
diff --git a/src/ChangeLog b/src/ChangeLog
index c27b4c69bb5..79bcf192eb7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
-2012-01-17 Paul Eggert <eggert@cs.ucla.edu>
+2012-02-10 Paul Eggert <eggert@cs.ucla.edu>
Fix integer width and related bugs (Bug#9874).
* alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
@@ -788,6 +788,160 @@
rather than rolling our own approximation.
(SCROLL_BAR_VEC_SIZE): Remove; not used.
+2012-02-10 Glenn Morris <rgm@gnu.org>
+
+ * fns.c (Fsecure_hash): Doc fix.
+
+2012-02-09 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
+
+2012-02-07 Chong Yidong <cyd@gnu.org>
+
+ * buffer.c (Fbuffer_local_variables)
+ (buffer_lisp_local_variables): Handle unbound vars correctly;
+ don't let Qunbound leak into Lisp.
+
+2012-02-07 Glenn Morris <rgm@gnu.org>
+
+ * image.c (Fimagemagick_types): Doc fix.
+
+ * image.c (imagemagick-render-type): Change it from a lisp object
+ to an integer. Move the doc here from the lisp manual.
+ Treat all values not equal to 0 the same.
+
+2012-02-06 Chong Yidong <cyd@gnu.org>
+
+ * doc.c (store_function_docstring): Avoid applying docstring of
+ alias to base function (Bug#2603).
+
+2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
+
+ * .gdbinit (pp1, pv1): Remove redundant defines.
+ (pr): Use pp.
+
+2012-02-04 Chong Yidong <cyd@gnu.org>
+
+ * nsterm.m: Declare a global (Bug#10694).
+
+2012-02-04 Eli Zaretskii <eliz@gnu.org>
+
+ * w32.c (get_emacs_configuration_options): Include
+ --enable-checking, if specified, in the return value.
+
+2012-02-04 Martin Rudalics <rudalics@gmx.at>
+
+ * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
+ after rounding frame sizes. (Bug#9723)
+
+2012-02-04 Eli Zaretskii <eliz@gnu.org>
+
+ * keyboard.c (adjust_point_for_property): Don't position point
+ before BEGV. (Bug#10696)
+
+2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Handle overflow when computing char display width (Bug#9496).
+ * character.c (char_width): Return EMACS_INT, not int.
+ (char_width, c_string_width): Check for overflow when
+ computing the width; this is possible now that individual
+ characters can have unbounded width. Problem introduced
+ by merge from Emacs 23 on 2012-01-19.
+
+2012-02-02 Michael Albinus <michael.albinus@gmx.de>
+
+ * dbusbind.c (Fdbus_register_method): Mention the return value
+ :ignore in the docstring.
+
+2012-02-02 Glenn Morris <rgm@gnu.org>
+
+ * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
+
+ * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
+ Unconditionally set to t. (Bug#10673)
+ * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
+ * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
+ * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
+
+2012-02-02 Kenichi Handa <handa@m17n.org>
+
+ (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
+ 0, do not call append_composite_glyph.
+
+2012-02-02 Kenichi Handa <handa@m17n.org>
+
+ * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
+ NULL (Bug#6988).
+ (x_produce_glyphs): If the component of a composition is a null
+ string, set it->pixel_width to 1 to avoid zero-width glyph.
+
+2012-02-01 Eli Zaretskii <eliz@gnu.org>
+
+ * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
+ first 2 arguments are identical. This makes inserting large
+ output from a subprocess an order of magnitude faster on
+ MS-Windows, where all sbrk'ed memory is always contiguous.
+
+2012-01-31 Glenn Morris <rgm@gnu.org>
+
+ * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
+ * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
+ * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
+
+2012-01-29 Glenn Morris <rgm@gnu.org>
+
+ * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
+
+2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
+
+ * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
+
+2012-01-28 Chong Yidong <cyd@gnu.org>
+
+ * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
+
+2012-01-26 Chong Yidong <cyd@gnu.org>
+
+ * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
+
+ * search.c (Fsearch_forward, Fsearch_backward): Document negative
+ repeat counts (Bug#10507).
+
+2012-01-26 Glenn Morris <rgm@gnu.org>
+
+ * lread.c (syms_of_lread): Doc fix.
+
+2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
+
+ * coding.c (encode_designation_at_bol): Change return value to
+ EMACS_INT.
+
+2012-01-25 Chong Yidong <cyd@gnu.org>
+
+ * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
+
+2012-01-21 Chong Yidong <cyd@gnu.org>
+
+ * floatfns.c (Fcopysign): Make the second argument non-optional,
+ since nil is not allowed anyway.
+
+2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
+
+ * process.c (read_process_output): Use p instead of XPROCESS (proc).
+ (send_process): Likewise.
+
+2012-01-19 Martin Rudalics <rudalics@gmx.at>
+
+ * window.c (save_window_save, Fcurrent_window_configuration)
+ (Vwindow_persistent_parameters): Do not use Qstate. Rewrite
+ doc-strings.
+
+2012-01-19 Kenichi Handa <handa@m17n.org>
+
+ * character.c (char_width): New function.
+ (Fchar_width, c_string_width, lisp_string_width):
+ Use char_width (Bug#9496).
+
2012-01-16 Martin Rudalics <rudalics@gmx.at>
* window.c (Vwindow_persistent_parameters): New variable.
@@ -3098,7 +3252,7 @@
Remove unreachable code.
(read_hex, load_charset_map_from_file): Check for integer overflow.
- * xterm.c: don't go over XClientMessageEvent limit
+ * xterm.c: Don't go over XClientMessageEvent limit.
(scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
(x_send_scroll_bar_event): Likewise. Check that the size does not
exceed limits imposed by XClientMessageEvent, as well as the usual
@@ -6389,7 +6543,7 @@
* ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
- ccl: add integer overflow checks
+ ccl: Add integer overflow checks.
* ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
(IN_INT_RANGE): New macros.
(ccl_driver): Use them to check for integer overflow when
diff --git a/src/buffer.c b/src/buffer.c
index b176bfed3fe..22ae522523a 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1022,7 +1022,10 @@ buffer_lisp_local_variables (struct buffer *buf)
if (buf != current_buffer)
val = XCDR (elt);
- result = Fcons (Fcons (XCAR (elt), val), result);
+ result = Fcons (EQ (val, Qunbound)
+ ? XCAR (elt)
+ : Fcons (XCAR (elt), val),
+ result);
}
return result;
@@ -1064,9 +1067,12 @@ No argument or nil as argument means use current buffer as BUFFER. */)
idx = PER_BUFFER_IDX (offset);
if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx))
&& SYMBOLP (PER_BUFFER_SYMBOL (offset)))
- result = Fcons (Fcons (PER_BUFFER_SYMBOL (offset),
- PER_BUFFER_VALUE (buf, offset)),
- result);
+ {
+ Lisp_Object sym = PER_BUFFER_SYMBOL (offset);
+ Lisp_Object val = PER_BUFFER_VALUE (buf, offset);
+ result = Fcons (EQ (val, Qunbound) ? sym : Fcons (sym, val),
+ result);
+ }
}
}
diff --git a/src/callproc.c b/src/callproc.c
index 22245f2d688..e17e082a0d4 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -168,7 +168,8 @@ The remaining arguments are optional.
The program's input comes from file INFILE (nil means `/dev/null').
Insert output in BUFFER before point; t means current buffer; nil for BUFFER
means discard it; 0 means discard and don't wait; and `(:file FILE)', where
- FILE is a file name string, means that it should be written to that file.
+ FILE is a file name string, means that it should be written to that file
+ \(if the file already exists it is overwritten).
BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
REAL-BUFFER says what to do with standard output, as above,
while STDERR-FILE says what to do with standard error in the child.
@@ -949,7 +950,7 @@ Delete the text if fourth arg DELETE is non-nil.
Insert output in BUFFER before point; t means current buffer; nil for
BUFFER means discard it; 0 means discard and don't wait; and `(:file
FILE)', where FILE is a file name string, means that it should be
- written to that file.
+ written to that file (if the file already exists it is overwritten).
BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
REAL-BUFFER says what to do with standard output, as above,
while STDERR-FILE says what to do with standard error in the child.
diff --git a/src/character.c b/src/character.c
index f15a20f6999..b85cedad937 100644
--- a/src/character.c
+++ b/src/character.c
@@ -308,6 +308,36 @@ If the multibyte character does not represent a byte, return -1. */)
}
}
+
+/* Return width (columns) of C considering the buffer display table DP. */
+
+static ptrdiff_t
+char_width (int c, struct Lisp_Char_Table *dp)
+{
+ ptrdiff_t width = CHAR_WIDTH (c);
+
+ if (dp)
+ {
+ Lisp_Object disp = DISP_CHAR_VECTOR (dp, c), ch;
+ int i;
+
+ if (VECTORP (disp))
+ for (i = 0, width = 0; i < ASIZE (disp); i++)
+ {
+ ch = AREF (disp, i);
+ if (CHARACTERP (ch))
+ {
+ int w = CHAR_WIDTH (XFASTINT (ch));
+ if (INT_ADD_OVERFLOW (width, w))
+ string_overflow ();
+ width += w;
+ }
+ }
+ }
+ return width;
+}
+
+
DEFUN ("char-width", Fchar_width, Schar_width, 1, 1, 0,
doc: /* Return width of CHAR when displayed in the current buffer.
The width is measured by how many columns it occupies on the screen.
@@ -315,21 +345,12 @@ Tab is taken to occupy `tab-width' columns.
usage: (char-width CHAR) */)
(Lisp_Object ch)
{
- Lisp_Object disp;
- int c, width;
- struct Lisp_Char_Table *dp = buffer_display_table ();
+ int c;
+ ptrdiff_t width;
CHECK_CHARACTER (ch);
c = XINT (ch);
-
- /* Get the way the display table would display it. */
- disp = dp ? DISP_CHAR_VECTOR (dp, c) : Qnil;
-
- if (VECTORP (disp))
- width = sanitize_char_width (ASIZE (disp));
- else
- width = CHAR_WIDTH (c);
-
+ width = char_width (c, buffer_display_table ());
return make_number (width);
}
@@ -350,25 +371,16 @@ c_string_width (const unsigned char *str, ptrdiff_t len, int precision,
while (i_byte < len)
{
- int bytes, thiswidth;
- Lisp_Object val;
+ int bytes;
int c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes);
+ ptrdiff_t thiswidth = char_width (c, dp);
- if (dp)
- {
- val = DISP_CHAR_VECTOR (dp, c);
- if (VECTORP (val))
- thiswidth = sanitize_char_width (ASIZE (val));
- else
- thiswidth = CHAR_WIDTH (c);
- }
- else
+ if (precision <= 0)
{
- thiswidth = CHAR_WIDTH (c);
+ if (INT_ADD_OVERFLOW (width, thiswidth))
+ string_overflow ();
}
-
- if (precision > 0
- && (width + thiswidth > precision))
+ else if (precision - width < thiswidth)
{
*nchars = i;
*nbytes = i_byte;
@@ -447,18 +459,7 @@ lisp_string_width (Lisp_Object string, ptrdiff_t precision,
else
c = str[i_byte], bytes = 1;
chars = 1;
- if (dp)
- {
- val = DISP_CHAR_VECTOR (dp, c);
- if (VECTORP (val))
- thiswidth = sanitize_char_width (ASIZE (val));
- else
- thiswidth = CHAR_WIDTH (c);
- }
- else
- {
- thiswidth = CHAR_WIDTH (c);
- }
+ thiswidth = char_width (c, dp);
}
if (precision <= 0)
diff --git a/src/coding.c b/src/coding.c
index be7166e8a14..42f342c390f 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -855,7 +855,7 @@ static void coding_alloc_by_making_gap (struct coding_system *,
static unsigned char *alloc_destination (struct coding_system *,
ptrdiff_t, unsigned char *);
static void setup_iso_safe_charsets (Lisp_Object);
-static int encode_designation_at_bol (struct coding_system *,
+static ptrdiff_t encode_designation_at_bol (struct coding_system *,
int *, int *, unsigned char *);
static int detect_eol (const unsigned char *,
ptrdiff_t, enum coding_category);
@@ -4351,7 +4351,7 @@ encode_invocation_designation (struct charset *charset,
If the current block ends before any end-of-line, we may fail to
find all the necessary designations. */
-static int
+static ptrdiff_t
encode_designation_at_bol (struct coding_system *coding,
int *charbuf, int *charbuf_end,
unsigned char *dst)
@@ -6849,7 +6849,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
dst_end = coding->destination + coding->dst_bytes;
coding_set_source (coding);
src = coding->source + offset;
- src_end = coding->source + coding->src_bytes;
+ src_end = coding->source + coding->consumed;
if (EQ (coding->src_object, coding->dst_object))
dst_end = (unsigned char *) src;
}
@@ -6883,7 +6883,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
dst_end = coding->destination + coding->dst_bytes;
coding_set_source (coding);
src = coding->source + offset;
- src_end = coding->source + coding->src_bytes;
+ src_end = coding->source + coding->consumed;
if (EQ (coding->src_object, coding->dst_object))
dst_end = (unsigned char *) src;
}
@@ -6904,7 +6904,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
dst = alloc_destination (coding, require, dst);
coding_set_source (coding);
src = coding->source + offset;
- src_end = coding->source + coding->src_bytes;
+ src_end = coding->source + coding->consumed;
}
}
produced_chars = coding->consumed_char;
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 6af499ecafd..c4e57dad98a 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -2162,10 +2162,13 @@ DONT-REGISTER-SERVICE below).
PATH is the D-Bus object path SERVICE is registered (See discussion of
DONT-REGISTER-SERVICE below). INTERFACE is the interface offered by
-SERVICE. It must provide METHOD. HANDLER is a Lisp function to be
-called when a method call is received. It must accept the input
-arguments of METHOD. The return value of HANDLER is used for
-composing the returning D-Bus message.
+SERVICE. It must provide METHOD.
+
+HANDLER is a Lisp function to be called when a method call is
+received. It must accept the input arguments of METHOD. The return
+value of HANDLER is used for composing the returning D-Bus message.
+In case HANDLER shall return a reply message with an empty argument
+list, HANDLER must return the symbol `:ignore'.
When DONT-REGISTER-SERVICE is non-nil, the known name SERVICE is not
registered. This means that other D-Bus clients have no way of
diff --git a/src/dispnew.c b/src/dispnew.c
index 749523158cb..f25e69e89a7 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5760,19 +5760,22 @@ change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int
if (newwidth == 0)
newwidth = FRAME_COLS (f);
- /* Compute width of windows in F.
- This is the width of the frame without vertical scroll bars. */
- new_frame_total_cols = FRAME_TOTAL_COLS_ARG (f, newwidth);
-
+ /* Compute width of windows in F. */
/* Round up to the smallest acceptable size. */
check_frame_size (f, &newheight, &newwidth);
+ /* This is the width of the frame with vertical scroll bars and fringe
+ columns. Do this after rounding - see discussion of bug#9723. */
+ new_frame_total_cols = FRAME_TOTAL_COLS_ARG (f, newwidth);
+
/* If we're not changing the frame size, quit now. */
- /* Frame width may be unchanged but the text portion may change, for example,
- fullscreen and remove/add scroll bar. */
+ /* Frame width may be unchanged but the text portion may change, for
+ example, fullscreen and remove/add scroll bar. */
if (newheight == FRAME_LINES (f)
- && newwidth == FRAME_COLS (f) // text portion unchanged
- && new_frame_total_cols == FRAME_TOTAL_COLS (f)) // frame width unchanged
+ /* Text portion unchanged? */
+ && newwidth == FRAME_COLS (f)
+ /* Frame width unchanged? */
+ && new_frame_total_cols == FRAME_TOTAL_COLS (f))
return;
BLOCK_INPUT;
diff --git a/src/doc.c b/src/doc.c
index 1a7b307816d..d71a3ce1d80 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -507,9 +507,11 @@ aren't strings. */)
/* Scanning the DOC files and placing docstring offsets into functions. */
static void
-store_function_docstring (Lisp_Object fun, ptrdiff_t offset)
+store_function_docstring (Lisp_Object obj, ptrdiff_t offset)
{
- fun = indirect_function (fun);
+ /* Don't use indirect_function here, or defaliases will apply their
+ docstrings to the base functions (Bug#2603). */
+ Lisp_Object fun = SYMBOLP (obj) ? XSYMBOL (obj)->function : obj;
/* The type determines where the docstring is stored. */
diff --git a/src/eval.c b/src/eval.c
index 2730fc9f3d7..ed3c811f28a 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -898,13 +898,14 @@ lisp_indirect_variable (Lisp_Object sym)
DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0,
doc: /* Return t if VARIABLE is intended to be set and modified by users.
\(The alternative is a variable used internally in a Lisp program.)
-A variable is a user variable if
-\(1) the first character of its documentation is `*', or
-\(2) it is customizable (its property list contains a non-nil value
- of `standard-value' or `custom-autoload'), or
-\(3) it is an alias for another user variable.
-Return nil if VARIABLE is an alias and there is a loop in the
-chain of symbols. */)
+
+This function returns t if (i) the first character of its
+documentation is `*', or (ii) it is customizable (its property list
+contains a non-nil value of `standard-value' or `custom-autoload'), or
+\(iii) it is an alias for a user variable.
+
+But condition (i) is considered obsolete, so for most purposes this is
+equivalent to `custom-variable-p'. */)
(Lisp_Object variable)
{
Lisp_Object documentation;
diff --git a/src/floatfns.c b/src/floatfns.c
index 87fa19acb1f..eaa1b32eb17 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -294,7 +294,7 @@ DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0,
}
#ifdef HAVE_COPYSIGN
-DEFUN ("copysign", Fcopysign, Scopysign, 1, 2, 0,
+DEFUN ("copysign", Fcopysign, Scopysign, 2, 2, 0,
doc: /* Copy sign of X2 to value of X1, and return the result.
Cause an error if X1 or X2 is not a float. */)
(Lisp_Object x1, Lisp_Object x2)
diff --git a/src/fns.c b/src/fns.c
index b4430292c75..ed4f9d40b59 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -4851,12 +4851,15 @@ guesswork fails. Normally, an error is signaled in such case. */)
}
DEFUN ("secure-hash", Fsecure_hash, Ssecure_hash, 2, 5, 0,
- doc: /* Return the secure hash of an OBJECT.
-ALGORITHM is a symbol: md5, sha1, sha224, sha256, sha384 or sha512.
-OBJECT is either a string or a buffer.
-Optional arguments START and END are character positions specifying
-which portion of OBJECT for computing the hash. If BINARY is non-nil,
-return a string in binary form. */)
+ doc: /* Return the secure hash of OBJECT, a buffer or string.
+ALGORITHM is a symbol specifying the hash to use:
+md5, sha1, sha224, sha256, sha384 or sha512.
+
+The two optional arguments START and END are positions specifying for
+which part of OBJECT to compute the hash. If nil or omitted, uses the
+whole OBJECT.
+
+If BINARY is non-nil, returns a string in binary form. */)
(Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object binary)
{
return secure_hash (algorithm, object, start, end, Qnil, Qnil, binary);
diff --git a/src/gnutls.c b/src/gnutls.c
index 99992e06cdc..a4eeb50bd74 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1121,7 +1121,10 @@ syms_of_gnutls (void)
defsubr (&Sgnutls_available_p);
DEFVAR_INT ("gnutls-log-level", global_gnutls_log_level,
- doc: /* Logging level used by the GnuTLS functions. */);
+ doc: /* Logging level used by the GnuTLS functions.
+Set this larger than 0 to get debug output in the *Messages* buffer.
+1 is for important messages, 2 is for debug data, and higher numbers
+are as per the GnuTLS logging conventions. */);
global_gnutls_log_level = 0;
}
diff --git a/src/image.c b/src/image.c
index 92cd75f99f4..c8d6be3a354 100644
--- a/src/image.c
+++ b/src/image.c
@@ -7618,7 +7618,6 @@ imagemagick_load_image (struct frame *f, struct image *img,
EMACS_INT ino;
int desired_width, desired_height;
double rotation;
- EMACS_INT imagemagick_rendermethod;
int pixelwidth;
ImageInfo *image_info;
ExceptionInfo *exception;
@@ -7799,9 +7798,8 @@ imagemagick_load_image (struct frame *f, struct image *img,
went ok. */
init_color_table ();
- imagemagick_rendermethod = (INTEGERP (Vimagemagick_render_type)
- ? XINT (Vimagemagick_render_type) : 0);
- if (imagemagick_rendermethod == 0)
+
+ if (imagemagick_render_type == 0)
{
size_t image_height;
@@ -7851,8 +7849,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
}
DestroyPixelIterator (iterator);
}
-
- if (imagemagick_rendermethod == 1)
+ else /* imagemagick_render_type != 0 */
{
/* Magicexportimage is normally faster than pixelpushing. This
method is also well tested. Some aspects of this method are
@@ -7987,6 +7984,7 @@ DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0,
Each entry in this list is a symbol named after an ImageMagick format
tag. See the ImageMagick manual for a list of ImageMagick formats and
their descriptions (http://www.imagemagick.org/script/formats.php).
+You can also try the shell command: `identify -list format'.
Note that ImageMagick recognizes many file-types that Emacs does not
recognize as images, such as C. See `imagemagick-types-inhibit'. */)
@@ -8959,8 +8957,17 @@ The value can also be nil, meaning the cache is never cleared.
The function `clear-image-cache' disregards this variable. */);
Vimage_cache_eviction_delay = make_number (300);
#ifdef HAVE_IMAGEMAGICK
- DEFVAR_LISP ("imagemagick-render-type", Vimagemagick_render_type,
- doc: /* Choose between ImageMagick render methods. */);
+ DEFVAR_INT ("imagemagick-render-type", imagemagick_render_type,
+ doc: /* Integer indicating which ImageMagick rendering method to use.
+The options are:
+ 0 -- the default method (pixel pushing)
+ 1 -- a newer method ("MagickExportImagePixels") that may perform
+ better (speed etc) in some cases, but has not been as thoroughly
+ tested with Emacs as the default method. This method requires
+ ImageMagick version 6.4.6 (approximately) or later.
+*/);
+ /* MagickExportImagePixels is in 6.4.6-9, but not 6.4.4-10. */
+ imagemagick_render_type = 0;
#endif
}
diff --git a/src/keyboard.c b/src/keyboard.c
index da15f663a0d..09743be6c3c 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1747,7 +1747,9 @@ adjust_point_for_property (ptrdiff_t last_pt, int modified)
{
xassert (end > PT);
SET_PT (PT < last_pt
- ? (STRINGP (val) && SCHARS (val) == 0 ? beg - 1 : beg)
+ ? (STRINGP (val) && SCHARS (val) == 0
+ ? max (beg - 1, BEGV)
+ : beg)
: end);
check_composition = check_invisible = 1;
}
@@ -11840,38 +11842,39 @@ result of looking up the original command in the active keymaps. */);
Vthis_original_command = Qnil;
DEFVAR_INT ("auto-save-interval", auto_save_interval,
- doc: /* *Number of input events between auto-saves.
+ doc: /* Number of input events between auto-saves.
Zero means disable autosaving due to number of characters typed. */);
auto_save_interval = 300;
DEFVAR_LISP ("auto-save-timeout", Vauto_save_timeout,
- doc: /* *Number of seconds idle time before auto-save.
+ doc: /* Number of seconds idle time before auto-save.
Zero or nil means disable auto-saving due to idleness.
After auto-saving due to this many seconds of idle time,
Emacs also does a garbage collection if that seems to be warranted. */);
XSETFASTINT (Vauto_save_timeout, 30);
DEFVAR_LISP ("echo-keystrokes", Vecho_keystrokes,
- doc: /* *Nonzero means echo unfinished commands after this many seconds of pause.
-The value may be integer or floating point. */);
+ doc: /* Nonzero means echo unfinished commands after this many seconds of pause.
+The value may be integer or floating point.
+If the value is zero, don't echo at all. */);
Vecho_keystrokes = make_number (1);
DEFVAR_INT ("polling-period", polling_period,
- doc: /* *Interval between polling for input during Lisp execution.
+ doc: /* Interval between polling for input during Lisp execution.
The reason for polling is to make C-g work to stop a running program.
Polling is needed only when using X windows and SIGIO does not work.
Polling is automatically disabled in all other cases. */);
polling_period = 2;
DEFVAR_LISP ("double-click-time", Vdouble_click_time,
- doc: /* *Maximum time between mouse clicks to make a double-click.
+ doc: /* Maximum time between mouse clicks to make a double-click.
Measured in milliseconds. The value nil means disable double-click
recognition; t means double-clicks have no time limit and are detected
by position only. */);
Vdouble_click_time = make_number (500);
DEFVAR_INT ("double-click-fuzz", double_click_fuzz,
- doc: /* *Maximum mouse movement between clicks to make a double-click.
+ doc: /* Maximum mouse movement between clicks to make a double-click.
On window-system frames, value is the number of pixels the mouse may have
moved horizontally or vertically between two clicks to make a double-click.
On non window-system frames, value is interpreted in units of 1/8 characters
@@ -11882,7 +11885,7 @@ to count as a drag. */);
double_click_fuzz = 3;
DEFVAR_BOOL ("inhibit-local-menu-bar-menus", inhibit_local_menu_bar_menus,
- doc: /* *Non-nil means inhibit local map menu bar menus. */);
+ doc: /* Non-nil means inhibit local map menu bar menus. */);
inhibit_local_menu_bar_menus = 0;
DEFVAR_INT ("num-input-keys", num_input_keys,
@@ -12057,7 +12060,7 @@ and the minor mode maps regardless of `overriding-local-map'. */);
Vspecial_event_map = Fcons (intern_c_string ("keymap"), Qnil);
DEFVAR_LISP ("track-mouse", do_mouse_tracking,
- doc: /* *Non-nil means generate motion events for mouse motion. */);
+ doc: /* Non-nil means generate motion events for mouse motion. */);
DEFVAR_KBOARD ("system-key-alist", Vsystem_key_alist,
doc: /* Alist of system-specific X windows key symbols.
@@ -12151,7 +12154,7 @@ immediately after running `post-command-hook'. */);
Vdelayed_warnings_list = Qnil;
DEFVAR_LISP ("suggest-key-bindings", Vsuggest_key_bindings,
- doc: /* *Non-nil means show the equivalent key-binding when M-x command has one.
+ doc: /* Non-nil means show the equivalent key-binding when M-x command has one.
The value can be a length of time to show the message for.
If the value is non-nil and not a number, we wait 2 seconds. */);
Vsuggest_key_bindings = Qt;
@@ -12211,7 +12214,7 @@ just after executing the command. */);
DEFVAR_LISP ("global-disable-point-adjustment",
Vglobal_disable_point_adjustment,
- doc: /* *If non-nil, always suppress point adjustment.
+ doc: /* If non-nil, always suppress point adjustment.
The default value is nil, in which case, point adjustment are
suppressed only after special commands that set
@@ -12219,7 +12222,7 @@ suppressed only after special commands that set
Vglobal_disable_point_adjustment = Qnil;
DEFVAR_LISP ("minibuffer-message-timeout", Vminibuffer_message_timeout,
- doc: /* *How long to display an echo-area message when the minibuffer is active.
+ doc: /* How long to display an echo-area message when the minibuffer is active.
If the value is not a number, such messages don't time out. */);
Vminibuffer_message_timeout = make_number (2);
diff --git a/src/lread.c b/src/lread.c
index 256624da046..dfcb3eeab5e 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4601,7 +4601,8 @@ to load. See also `load-dangerous-libraries'. */);
Non-nil means that the code in the current buffer should be evaluated
with lexical binding.
This variable is automatically set from the file variables of an
-interpreted Lisp file read using `load'. */);
+interpreted Lisp file read using `load'. Unlike other file local
+variables, this must be set in the first line of a file. */);
Fmake_variable_buffer_local (Qlexical_binding);
DEFVAR_LISP ("eval-buffer-list", Veval_buffer_list,
diff --git a/src/minibuf.c b/src/minibuf.c
index cf860847d59..c3a49bff0a5 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2002,7 +2002,7 @@ The function is called with the arguments passed to `read-buffer'. */);
DEFVAR_BOOL ("read-buffer-completion-ignore-case",
read_buffer_completion_ignore_case,
- doc: /* *Non-nil means completion ignores case when reading a buffer name. */);
+ doc: /* Non-nil means completion ignores case when reading a buffer name. */);
read_buffer_completion_ignore_case = 0;
DEFVAR_LISP ("minibuffer-setup-hook", Vminibuffer_setup_hook,
@@ -2014,20 +2014,24 @@ The function is called with the arguments passed to `read-buffer'. */);
Vminibuffer_exit_hook = Qnil;
DEFVAR_LISP ("history-length", Vhistory_length,
- doc: /* *Maximum length for history lists before truncation takes place.
-A number means that length; t means infinite. Truncation takes place
-just after a new element is inserted. Setting the `history-length'
-property of a history variable overrides this default. */);
+ doc: /* Maximum length of history lists before truncation takes place.
+A number means truncate to that length; truncation deletes old
+elements, and is done just after inserting a new element.
+A value of t means no truncation.
+
+This variable only affects history lists that don't specify their own
+maximum lengths. Setting the `history-length' property of a history
+variable overrides this default. */);
XSETFASTINT (Vhistory_length, 30);
DEFVAR_BOOL ("history-delete-duplicates", history_delete_duplicates,
- doc: /* *Non-nil means to delete duplicates in history.
+ doc: /* Non-nil means to delete duplicates in history.
If set to t when adding a new history element, all previous identical
elements are deleted from the history list. */);
history_delete_duplicates = 0;
DEFVAR_LISP ("history-add-new-input", Vhistory_add_new_input,
- doc: /* *Non-nil means to add new elements in history.
+ doc: /* Non-nil means to add new elements in history.
If set to nil, minibuffer reading functions don't add new elements to the
history list, so it is possible to do this afterwards by calling
`add-to-history' explicitly. */);
@@ -2042,7 +2046,7 @@ controls the behavior, rather than this variable. */);
completion_ignore_case = 0;
DEFVAR_BOOL ("enable-recursive-minibuffers", enable_recursive_minibuffers,
- doc: /* *Non-nil means to allow minibuffer commands while in the minibuffer.
+ doc: /* Non-nil means to allow minibuffer commands while in the minibuffer.
This variable makes a difference whenever the minibuffer window is active. */);
enable_recursive_minibuffers = 0;
@@ -2098,7 +2102,7 @@ is added with
Vminibuffer_history_position = Qnil;
DEFVAR_BOOL ("minibuffer-auto-raise", minibuffer_auto_raise,
- doc: /* *Non-nil means entering the minibuffer raises the minibuffer's frame.
+ doc: /* Non-nil means entering the minibuffer raises the minibuffer's frame.
Some uses of the echo area also raise that frame (since they use it too). */);
minibuffer_auto_raise = 0;
diff --git a/src/nsterm.m b/src/nsterm.m
index 70d3cc0e8b8..a45792fd645 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1,6 +1,7 @@
/* NeXT/Open/GNUstep / MacOSX communication module.
- Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2012
- Free Software Foundation, Inc.
+
+Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2012
+ Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -64,6 +65,7 @@ int term_trace_num = 0;
#define NSTRACE(x)
#endif
+extern NSString *NSMenuDidBeginTrackingNotification;
/* ==========================================================================
@@ -6735,12 +6737,12 @@ Only works on OSX 10.6 or later. */);
/* TODO: move to common code */
DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars,
- doc: /* If not nil, Emacs uses toolkit scroll bars. */);
-#ifdef USE_TOOLKIT_SCROLL_BARS
+ doc: /* Which toolkit scroll bars Emacs uses, if any.
+A value of nil means Emacs doesn't use toolkit scroll bars.
+With the X Window system, the value is a symbol describing the
+X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
+With MS Windows or Nextstep, the value is t. */);
Vx_toolkit_scroll_bars = Qt;
-#else
- Vx_toolkit_scroll_bars = Qnil;
-#endif
DEFVAR_BOOL ("x-use-underline-position-properties",
x_use_underline_position_properties,
diff --git a/src/process.c b/src/process.c
index b4fca389d0d..daa49b129ae 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5046,9 +5046,8 @@ read_process_output (Lisp_Object proc, register int channel)
proc_buffered_char[channel] = -1;
}
#ifdef HAVE_GNUTLS
- if (XPROCESS (proc)->gnutls_p)
- nbytes = emacs_gnutls_read (XPROCESS (proc),
- chars + carryover + buffered,
+ if (p->gnutls_p)
+ nbytes = emacs_gnutls_read (p, chars + carryover + buffered,
readmax - buffered);
else
#endif
@@ -5513,9 +5512,8 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
#endif
{
#ifdef HAVE_GNUTLS
- if (XPROCESS (proc)->gnutls_p)
- written = emacs_gnutls_write (XPROCESS (proc),
- buf, this);
+ if (p->gnutls_p)
+ written = emacs_gnutls_write (p, buf, this);
else
#endif
written = emacs_write (outfd, buf, this);
diff --git a/src/ralloc.c b/src/ralloc.c
index 13587b9ffd4..896ad9f3155 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -636,7 +636,8 @@ resize_bloc (bloc_ptr bloc, SIZE size)
}
else
{
- memmove (b->new_data, b->data, b->size);
+ if (b->new_data != b->data)
+ memmove (b->new_data, b->data, b->size);
*b->variable = b->data = b->new_data;
}
}
@@ -647,7 +648,8 @@ resize_bloc (bloc_ptr bloc, SIZE size)
}
else
{
- memmove (bloc->new_data, bloc->data, old_size);
+ if (bloc->new_data != bloc->data)
+ memmove (bloc->new_data, bloc->data, old_size);
memset ((char *) bloc->new_data + old_size, 0, size - old_size);
*bloc->variable = bloc->data = bloc->new_data;
}
@@ -663,7 +665,8 @@ resize_bloc (bloc_ptr bloc, SIZE size)
}
else
{
- memmove (b->new_data, b->data, b->size);
+ if (b->new_data != b->data)
+ memmove (b->new_data, b->data, b->size);
*b->variable = b->data = b->new_data;
}
}
@@ -816,7 +819,8 @@ r_alloc_sbrk (long int size)
header. */
for (b = last_bloc; b != NIL_BLOC; b = b->prev)
{
- memmove (b->new_data, b->data, b->size);
+ if (b->new_data != b->data)
+ memmove (b->new_data, b->data, b->size);
*b->variable = b->data = b->new_data;
}
@@ -862,7 +866,8 @@ r_alloc_sbrk (long int size)
for (b = first_bloc; b != NIL_BLOC; b = b->next)
{
- memmove (b->new_data, b->data, b->size);
+ if (b->new_data != b->data)
+ memmove (b->new_data, b->data, b->size);
*b->variable = b->data = b->new_data;
}
}
diff --git a/src/s/gnu.h b/src/s/gnu.h
index be831a833a5..37aaa1357cc 100644
--- a/src/s/gnu.h
+++ b/src/s/gnu.h
@@ -44,5 +44,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#endif /* !_IO_STDIO_H */
#endif /* emacs */
+#define POSIX_SIGNALS 1
+
/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
diff --git a/src/search.c b/src/search.c
index 0d451bd11c3..f33965d4d70 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2192,7 +2192,9 @@ An optional second argument bounds the search; it is a buffer position.
The match found must not extend before that position.
Optional third argument, if t, means if fail just return nil (no error).
If not nil and not t, position at limit of search and return nil.
-Optional fourth argument is repeat count--search for successive occurrences.
+Optional fourth argument COUNT, if non-nil, means to search for COUNT
+ successive occurrences. If COUNT is negative, search forward,
+ instead of backward, for -COUNT occurrences.
Search case-sensitivity is determined by the value of the variable
`case-fold-search', which see.
@@ -2211,7 +2213,9 @@ The match found must not extend after that position. A value of nil is
equivalent to (point-max).
Optional third argument, if t, means if fail just return nil (no error).
If not nil and not t, move to limit of search and return nil.
-Optional fourth argument is repeat count--search for successive occurrences.
+Optional fourth argument COUNT, if non-nil, means to search for COUNT
+ successive occurrences. If COUNT is negative, search backward,
+ instead of forward, for -COUNT occurrences.
Search case-sensitivity is determined by the value of the variable
`case-fold-search', which see.
diff --git a/src/w32.c b/src/w32.c
index f610a36ecf4..3d3d33453c6 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1940,6 +1940,9 @@ get_emacs_configuration_options (void)
#ifdef EMACSDEBUG
" --no-opt",
#endif
+#ifdef ENABLE_CHECKING
+ " --enable-checking",
+#endif
/* configure.bat already sets USER_CFLAGS and USER_LDFLAGS
with a starting space to save work here. */
#ifdef USER_CFLAGS
diff --git a/src/w32term.c b/src/w32term.c
index f764ad9d218..8a0e9efc943 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1,6 +1,6 @@
/* Implementation of GUI terminal on the Microsoft W32 API.
-Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
+Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -6432,7 +6432,7 @@ baseline level. The default value is nil. */);
A value of nil means Emacs doesn't use toolkit scroll bars.
With the X Window system, the value is a symbol describing the
X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
-With MS Windows, the value is t. */);
+With MS Windows or Nextstep, the value is t. */);
Vx_toolkit_scroll_bars = Qt;
staticpro (&last_mouse_motion_frame);
diff --git a/src/window.c b/src/window.c
index edf60cd8ff3..a0b11e0e320 100644
--- a/src/window.c
+++ b/src/window.c
@@ -57,7 +57,7 @@ static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window;
static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically;
static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command;
static Lisp_Object Qsafe, Qabove, Qbelow;
-static Lisp_Object Qauto_buffer_name, Qclone_of, Qstate;
+static Lisp_Object Qauto_buffer_name, Qclone_of;
static int displayed_window_lines (struct window *);
static struct window *decode_window (Lisp_Object);
@@ -5891,9 +5891,8 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i)
tem = XCDR (tem))
{
pers = XCAR (tem);
- /* Save values for persistent window parameters whose cdr
- is either nil or t. */
- if (CONSP (pers) && (NILP (XCDR (pers)) || EQ (XCDR (pers), Qt)))
+ /* Save values for persistent window parameters. */
+ if (CONSP (pers) && !NILP (XCDR (pers)))
{
par = Fassq (XCAR (pers), w->window_parameters);
if (NILP (par))
@@ -5968,7 +5967,9 @@ and for each displayed buffer, where display starts, and the positions of
point and mark. An exception is made for point in the current buffer:
its value is -not- saved.
This also records the currently selected frame, and FRAME's focus
-redirection (see `redirect-frame-focus'). */)
+redirection (see `redirect-frame-focus'). The variable
+`window-persistent-parameters' specifies which window parameters are
+saved by this function. */)
(Lisp_Object frame)
{
register Lisp_Object tem;
@@ -6506,7 +6507,6 @@ syms_of_window (void)
DEFSYM (Qbelow, "below");
DEFSYM (Qauto_buffer_name, "auto-buffer-name");
DEFSYM (Qclone_of, "clone-of");
- DEFSYM (Qstate, "state");
staticpro (&Vwindow_list);
@@ -6618,28 +6618,28 @@ function `set-window-combination-limit'. */);
DEFVAR_LISP ("window-persistent-parameters", Vwindow_persistent_parameters,
doc: /* Alist of persistent window parameters.
-Parameters in this list are saved by `current-window-configuration' and
-`window-state-get' and subsequently restored to their previous values by
-`set-window-configuration' and `window-state-put'.
+This alist specifies which window parameters shall get saved by
+`current-window-configuration' and `window-state-get' and subsequently
+restored to their previous values by `set-window-configuration' and
+`window-state-put'.
The car of each entry of this alist is the symbol specifying the
parameter. The cdr is one of the following:
-The symbol `state' means the parameter is saved by `window-state-get'
-provided its IGNORE argument is nil. `current-window-configuration'
-does not save this parameter.
+nil means the parameter is neither saved by `window-state-get' nor by
+`current-window-configuration'.
-nil means the parameter is saved by `current-window-configuration' and,
-provided its IGNORE argument is nil, by `window-state-get'.
+t means the parameter is saved by `current-window-configuration' and,
+provided its WRITABLE argument is nil, by `window-state-get'.
-t means the parameter is saved unconditionally by both
-`current-window-configuration' and `window-state-get'. Parameters
-without read syntax (like windows or frames) should not use that.
+The symbol `writable' means the parameter is saved unconditionally by
+both `current-window-configuration' and `window-state-get'. Do not use
+this value for parameters without read syntax (like windows or frames).
Parameters not saved by `current-window-configuration' or
`window-state-get' are left alone by `set-window-configuration'
respectively are not installed by `window-state-put'. */);
- Vwindow_persistent_parameters = list1 (Fcons (Qclone_of, Qstate));
+ Vwindow_persistent_parameters = list1 (Fcons (Qclone_of, Qt));
defsubr (&Sselected_window);
defsubr (&Sminibuffer_window);
diff --git a/src/xdisp.c b/src/xdisp.c
index 58678fc6385..3dac7ae011e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -22745,7 +22745,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
ptrdiff_t cmp_id = (row)->glyphs[area][START].u.cmp.id; \
struct composition *cmp = composition_table[cmp_id]; \
XChar2b *char2b; \
- struct glyph_string *first_s IF_LINT (= NULL); \
+ struct glyph_string *first_s = NULL; \
int n; \
\
char2b = (XChar2b *) alloca ((sizeof *char2b) * cmp->glyph_len); \
@@ -24407,7 +24407,7 @@ x_produce_glyphs (struct it *it)
/* Initialize the bounding box. */
if (pcm)
{
- width = pcm->width;
+ width = cmp->glyph_len > 0 ? pcm->width : 0;
ascent = pcm->ascent;
descent = pcm->descent;
lbearing = pcm->lbearing;
@@ -24415,7 +24415,7 @@ x_produce_glyphs (struct it *it)
}
else
{
- width = font->space_width;
+ width = cmp->glyph_len > 0 ? font->space_width : 0;
ascent = FONT_BASE (font);
descent = FONT_DESCENT (font);
lbearing = 0;
@@ -24633,7 +24633,7 @@ x_produce_glyphs (struct it *it)
if (it->descent < 0)
it->descent = 0;
- if (it->glyph_row)
+ if (it->glyph_row && cmp->glyph_len > 0)
append_composite_glyph (it);
}
else if (it->what == IT_COMPOSITION)
diff --git a/src/xfaces.c b/src/xfaces.c
index 151da1e032b..7c3bc8d2749 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3364,7 +3364,7 @@ update_face_from_frame_parameter (struct frame *f, Lisp_Object param,
/* Changing the background color might change the background
mode, so that we have to load new defface specs.
- Call frame-update-face-colors to do that. */
+ Call frame-set-background-mode to do that. */
XSETFRAME (frame, f);
call1 (Qframe_set_background_mode, frame);
diff --git a/src/xterm.c b/src/xterm.c
index 2a2ae105e2e..6b19533e97c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1,6 +1,6 @@
/* X Communication module for terminals which understand the X protocol.
-Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
+Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -10844,7 +10844,7 @@ selected window or cursor position is preserved. */);
A value of nil means Emacs doesn't use toolkit scroll bars.
With the X Window system, the value is a symbol describing the
X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
-With MS Windows, the value is t. */);
+With MS Windows or Nextstep, the value is t. */);
#ifdef USE_TOOLKIT_SCROLL_BARS
#ifdef USE_MOTIF
Vx_toolkit_scroll_bars = intern_c_string ("motif");