summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-08-22 14:40:35 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-08-22 14:40:35 -0700
commitc325e199668a2449a9b0d662e114eec9d4802288 (patch)
tree274955e934a223b81d593cb27d4d444a1eaf4ab6 /src
parent512b06e4309ba6c5cd3d2d2518a931b0664c4150 (diff)
parent927afa1ef6514e62162068d7dbdc9d8381a71598 (diff)
Merge from origin/emacs-25
927afa1 ; Update ChangeLog.2 and ldef-boot.el for Emacs 25.1 RC2 6bf83b5 * etc/AUTHORS: Update the AUTHORS file 73cbb81 ; ChangeLog spelling fixes 9b99772 Some assorted documentation clarifications 37d4723 Improve commentary in src/character.h 5ccd593 ; Fix typo in /etc/NEWS 96e3d16 * etc/NEWS: Mention the change in json-encode-string. 2e524034 ; * etc/NEWS: Mention incompatible change in url-http-create... 2e4e74e Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emac... 66dea65 ; * doc/lispref/windows.texi (Window Parameters): Grammar twe... # Conflicts: # ChangeLog.2 # lisp/ldefs-boot.el
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog.122
-rw-r--r--src/callproc.c7
-rw-r--r--src/character.h20
-rw-r--r--src/editfns.c9
-rw-r--r--src/fileio.c3
5 files changed, 26 insertions, 15 deletions
diff --git a/src/ChangeLog.12 b/src/ChangeLog.12
index b2df482ba7..a1ebd30c8e 100644
--- a/src/ChangeLog.12
+++ b/src/ChangeLog.12
@@ -4382,7 +4382,7 @@
* nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
- * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
+ * nsterm.m (ns_update_auto_hide_menu_bar): Remove definition of
MAC_OS_X_VERSION_10_6.
(syms_of_nsterm): Remove comment about Panther and above for
ns-antialias-text.
diff --git a/src/callproc.c b/src/callproc.c
index 487115d60c..454ed6d633 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1004,6 +1004,13 @@ create_temp_file (ptrdiff_t nargs, Lisp_Object *args,
DEFUN ("call-process-region", Fcall_process_region, Scall_process_region,
3, MANY, 0,
doc: /* Send text from START to END to a synchronous process running PROGRAM.
+
+START and END are normally buffer positions specifying the part of the
+buffer to send to the process.
+If START is nil, that means to use the entire buffer contents; END is
+ignored.
+If START is a string, then send that string to the process
+instead of any buffer contents; END is ignored.
The remaining arguments are optional.
Delete the text if fourth arg DELETE is non-nil.
diff --git a/src/character.h b/src/character.h
index 586f330fba..0d0e31c4c9 100644
--- a/src/character.h
+++ b/src/character.h
@@ -237,7 +237,8 @@ enum
#define CHAR_HEAD_P(byte) (((byte) & 0xC0) != 0x80)
/* How many bytes a character that starts with BYTE occupies in a
- multibyte form. */
+ multibyte form. Unlike MULTIBYTE_LENGTH below, this macro does not
+ validate the multibyte form, but looks only at its first byte. */
#define BYTES_BY_CHAR_HEAD(byte) \
(!((byte) & 0x80) ? 1 \
: !((byte) & 0x20) ? 2 \
@@ -247,7 +248,9 @@ enum
/* The byte length of multibyte form at unibyte string P ending at
- PEND. If STR doesn't point to a valid multibyte form, return 0. */
+ PEND. If the string doesn't point to a valid multibyte form,
+ return 0. Unlike BYTES_BY_CHAR_HEAD, this macro validates the
+ multibyte form. */
#define MULTIBYTE_LENGTH(p, pend) \
(p >= pend ? 0 \
@@ -263,7 +266,8 @@ enum
: 0)
-/* Like MULTIBYTE_LENGTH, but don't check the ending address. */
+/* Like MULTIBYTE_LENGTH, but don't check the ending address. The
+ multibyte form is still validated, unlike BYTES_BY_CHAR_HEAD. */
#define MULTIBYTE_LENGTH_NO_CHECK(p) \
(!((p)[0] & 0x80) ? 1 \
@@ -324,15 +328,7 @@ enum
/* Like STRING_CHAR, but set ACTUAL_LEN to the length of multibyte
- form.
-
- Note: This macro returns the actual length of the character's
- multibyte sequence as it is stored in a buffer or string. The
- character it returns might have a different codepoint that has a
- different multibyte sequence of a different length, due to possible
- unification of CJK characters inside string_char. Therefore do NOT
- assume that the length returned by this macro is identical to the
- length of the multibyte sequence of the character it returns. */
+ form. */
#define STRING_CHAR_AND_LENGTH(p, actual_len) \
(!((p)[0] & 0x80) \
diff --git a/src/editfns.c b/src/editfns.c
index 732306af86..26a86c7fab 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1065,7 +1065,14 @@ usage: (save-current-buffer &rest BODY) */)
DEFUN ("buffer-size", Fbuffer_size, Sbuffer_size, 0, 1, 0,
doc: /* Return the number of characters in the current buffer.
-If BUFFER, return the number of characters in that buffer instead. */)
+If BUFFER is not nil, return the number of characters in that buffer
+instead.
+
+This does not take narrowing into account; to count the number of
+characters in the accessible portion of the current buffer, use
+`(- (point-max) (point-min))', and to count the number of characters
+in some other BUFFER, use
+`(with-current-buffer BUFFER (- (point-max) (point-min)))'. */)
(Lisp_Object buffer)
{
if (NILP (buffer))
diff --git a/src/fileio.c b/src/fileio.c
index 37948bc0ee..bf6bf622ab 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4654,7 +4654,8 @@ DEFUN ("write-region", Fwrite_region, Swrite_region, 3, 7,
When called from a program, requires three arguments:
START, END and FILENAME. START and END are normally buffer positions
specifying the part of the buffer to write.
-If START is nil, that means to use the entire buffer contents.
+If START is nil, that means to use the entire buffer contents; END is
+ignored.
If START is a string, then output that string to the file
instead of any buffer contents; END is ignored.