diff options
| author | Roland McGrath | 1994-02-08 22:42:28 +0000 |
|---|---|---|
| committer | Roland McGrath | 1994-02-08 22:42:28 +0000 |
| commit | c6f7982f439b770453e6aaee93053b9a11db61cb (patch) | |
| tree | e6f071ecdf21936ff6ce0f5a76d61dfd76fa2a92 /src | |
| parent | f045694583898830cbf48137b6be79321979f29e (diff) | |
| download | emacs-c6f7982f439b770453e6aaee93053b9a11db61cb.tar.gz emacs-c6f7982f439b770453e6aaee93053b9a11db61cb.zip | |
(print): If print_escapes_newlines, print '\f' as "\\f".
(syms_of_print): Update docstring.
Diffstat (limited to 'src')
| -rw-r--r-- | src/print.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/print.c b/src/print.c index 1ea6d8573ef..8e4a05fe3af 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Lisp object printing and output streams. | 1 | /* Lisp object printing and output streams. |
| 2 | Copyright (C) 1985, 1986, 1988, 1993 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -793,6 +793,11 @@ print (obj, printcharfun, escapeflag) | |||
| 793 | PRINTCHAR ('\\'); | 793 | PRINTCHAR ('\\'); |
| 794 | PRINTCHAR ('n'); | 794 | PRINTCHAR ('n'); |
| 795 | } | 795 | } |
| 796 | else if (c == '\f' && print_escape_newlines) | ||
| 797 | { | ||
| 798 | PRINTCHAR ('\\'); | ||
| 799 | PRINTCHAR ('f'); | ||
| 800 | } | ||
| 796 | else | 801 | else |
| 797 | { | 802 | { |
| 798 | if (c == '\"' || c == '\\') | 803 | if (c == '\"' || c == '\\') |
| @@ -1069,7 +1074,8 @@ A value of nil means no limit."); | |||
| 1069 | Vprint_level = Qnil; | 1074 | Vprint_level = Qnil; |
| 1070 | 1075 | ||
| 1071 | DEFVAR_BOOL ("print-escape-newlines", &print_escape_newlines, | 1076 | DEFVAR_BOOL ("print-escape-newlines", &print_escape_newlines, |
| 1072 | "Non-nil means print newlines in strings as backslash-n."); | 1077 | "Non-nil means print newlines in strings as backslash-n. |
| 1078 | Also print formfeeds as backslash-f."); | ||
| 1073 | print_escape_newlines = 0; | 1079 | print_escape_newlines = 0; |
| 1074 | 1080 | ||
| 1075 | /* prin1_to_string_buffer initialized in init_buffer_once in buffer.c */ | 1081 | /* prin1_to_string_buffer initialized in init_buffer_once in buffer.c */ |