summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2016-01-11 22:50:30 -0800
committerJohn Wiegley <johnw@newartisans.com>2016-01-11 22:50:30 -0800
commitfee9e3ff5e3181e5e477849b5db94e7e39a4e0c4 (patch)
treeb5a8934d6b587f3517d2b8214a6738374b07820d /src
parent2d7f4d99f715a3b32bb2873be6e9b4e7e1dad1da (diff)
parentce4a052415b70030ee591af3cb5bed0fb79ef3aa (diff)
downloademacs-fee9e3ff5e3181e5e477849b5db94e7e39a4e0c4.tar.gz
emacs-fee9e3ff5e3181e5e477849b5db94e7e39a4e0c4.tar.bz2
emacs-fee9e3ff5e3181e5e477849b5db94e7e39a4e0c4.zip
Merge from origin/emacs-25
ce4a052 Add defvar-local to lisp-imenu-generic-expression a0121bc Revert commit b1e3d14845517bfa9fa5d6d3840f3ab3160306fd 76fe2d5 * lisp/emacs-lisp/autoload.el (autoload-find-destination): Doc fix. 1ae088f * lisp/emacs-lisp/autoload.el (autoload-find-destination): b6b47af Properly encode/decode base64Binary data in SOAP c632466 Obey coding-system-for-write when writing stdout/stderr in batch 2f32cb5 * doc/misc/efaq.texi (Packages that do not come with Emacs): Update the URI of MELPA and marmalade-repo. Reported by CHENG Goa <chenggao@royau.me> in https://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00390.html. d2937aa * lisp/progmodes/opascal.el (opascal-mode-syntax-table): 5330c25 * lisp/progmodes/xscheme.el (xscheme-prompt-for-expression-exit): 7380990 Remove function wrongly on AWK Mode value of context fontification hook. d400753 * src/buffer.c: Stick with ASCII in doc string. 221240c Reword transient-mark-mode doc string 977d3ea Update doc string of 'selective-display' 229c3fa Make C++ buffers writeable when writing their initial text properties. f5c762c Additional changes for "make check-expensive" 1729cf3 ; * admin/MAINTAINERS: Remove myself. 33219d3 Apply text properties for <, > in new after-change function (C++ Java Modes).
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c11
-rw-r--r--src/print.c12
-rw-r--r--src/xdisp.c11
3 files changed, 28 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 51c36de0c6b..3f9371652e7 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5803,11 +5803,14 @@ you probably should set this to -2 in that buffer. */);
DEFVAR_PER_BUFFER ("selective-display", &BVAR (current_buffer, selective_display),
Qnil,
doc: /* Non-nil enables selective display.
+
An integer N as value means display only lines
that start with less than N columns of space.
+
A value of t means that the character ^M makes itself and
all the rest of the line invisible; also, when saving the buffer
-in a file, save the ^M as a newline. */);
+in a file, save the ^M as a newline. This usage is obsolete; use
+overlays or text properties instead. */);
DEFVAR_PER_BUFFER ("selective-display-ellipses",
&BVAR (current_buffer, selective_display_ellipses),
@@ -6201,11 +6204,11 @@ all windows or just the selected window.
Lisp programs may give this variable certain special values:
-- A value of \\='lambda (literally) enables Transient Mark mode temporarily.
- It is disabled again after any subsequent action that would
+- The symbol `lambda' enables Transient Mark mode temporarily.
+ The mode is disabled again after any subsequent action that would
normally deactivate the mark (e.g. buffer modification).
-- A value of (only . OLDVAL) enables Transient Mark mode
+- The pair (only . OLDVAL) enables Transient Mark mode
temporarily. After any subsequent point motion command that is
not shift-translated, or any other action that would normally
deactivate the mark (e.g. buffer modification), the value of
diff --git a/src/print.c b/src/print.c
index 975675014d9..269d8f250e2 100644
--- a/src/print.c
+++ b/src/print.c
@@ -200,6 +200,13 @@ printchar_to_stream (unsigned int ch, FILE *stream)
{
Lisp_Object dv IF_LINT (= Qnil);
ptrdiff_t i = 0, n = 1;
+ Lisp_Object coding_system = Vlocale_coding_system;
+ bool encode_p = false;
+
+ if (!NILP (Vcoding_system_for_write))
+ coding_system = Vcoding_system_for_write;
+ if (!NILP (coding_system))
+ encode_p = true;
if (CHAR_VALID_P (ch) && DISP_TABLE_P (Vstandard_display_table))
{
@@ -228,8 +235,11 @@ printchar_to_stream (unsigned int ch, FILE *stream)
unsigned char mbstr[MAX_MULTIBYTE_LENGTH];
int len = CHAR_STRING (ch, mbstr);
Lisp_Object encoded_ch =
- ENCODE_SYSTEM (make_multibyte_string ((char *) mbstr, 1, len));
+ make_multibyte_string ((char *) mbstr, 1, len);
+ if (encode_p)
+ encoded_ch = code_convert_string_norecord (encoded_ch,
+ coding_system, true);
fwrite (SSDATA (encoded_ch), 1, SBYTES (encoded_ch), stream);
#ifdef WINDOWSNT
if (print_output_debug_flag && stream == stderr)
diff --git a/src/xdisp.c b/src/xdisp.c
index b18bfd0d49d..ee748bd8680 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10206,7 +10206,16 @@ message_to_stderr (Lisp_Object m)
}
if (STRINGP (m))
{
- Lisp_Object s = ENCODE_SYSTEM (m);
+ Lisp_Object coding_system = Vlocale_coding_system;
+ Lisp_Object s;
+
+ if (!NILP (Vcoding_system_for_write))
+ coding_system = Vcoding_system_for_write;
+ if (!NILP (coding_system))
+ s = code_convert_string_norecord (m, coding_system, true);
+ else
+ s = m;
+
fwrite (SDATA (s), SBYTES (s), 1, stderr);
}
if (!cursor_in_echo_area)