aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2013-03-20 17:08:34 +0900
committerKenichi Handa2013-03-20 17:08:34 +0900
commit47077837aff40030430e3d1d0522fee5db62ee1e (patch)
tree330da0edce9c8fc596e0d9f2ee8284ba9560422f /src
parentc0a17406acd4b9db561ba99f8a02bf5461130e82 (diff)
parentfaaecb52470ebc949e2e01e221270656c6f39b70 (diff)
downloademacs-47077837aff40030430e3d1d0522fee5db62ee1e.tar.gz
emacs-47077837aff40030430e3d1d0522fee5db62ee1e.zip
merge trunk
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog11
-rw-r--r--src/alloc.c2
-rw-r--r--src/coding.c2
-rw-r--r--src/dispextern.h4
-rw-r--r--src/emacs.c7
-rw-r--r--src/image.c6
-rw-r--r--src/lisp.h1
-rw-r--r--src/print.c13
-rw-r--r--src/window.c39
-rw-r--r--src/xfaces.c2
10 files changed, 57 insertions, 30 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6de0212109a..2779e5a6ea8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -4,6 +4,17 @@
4 to 1 (temporary workaround until a bug related to ASCII 4 to 1 (temporary workaround until a bug related to ASCII
5 optimization is fixed). 5 optimization is fixed).
6 6
72013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
8
9 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
10 Signal error if window is not internal. Adjust docstring.
11 (delete_all_child_windows): Use combination_limit to save the buffer.
12 (Fset_window_configuration): Adjust accordingly.
13 * print.c (syms_of_print): Initialize debugging output not here...
14 (init_print_once): ...but in a new function here.
15 * lisp.h (init_print_once): Add prototype.
16 * emacs.c (main): Add call to init_print_once. Adjust comments.
17
72013-03-18 Dmitry Antipov <dmantipov@yandex.ru> 182013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
8 19
9 * window.c (window_resize_check, window_resize_apply) 20 * window.c (window_resize_check, window_resize_apply)
diff --git a/src/alloc.c b/src/alloc.c
index b2703c5f961..5e30c1b20ad 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1162,7 +1162,7 @@ lisp_align_free (void *block)
1162#define INTERVAL_BLOCK_SIZE \ 1162#define INTERVAL_BLOCK_SIZE \
1163 ((1020 - sizeof (struct interval_block *)) / sizeof (struct interval)) 1163 ((1020 - sizeof (struct interval_block *)) / sizeof (struct interval))
1164 1164
1165/* Intervals are allocated in chunks in form of an interval_block 1165/* Intervals are allocated in chunks in the form of an interval_block
1166 structure. */ 1166 structure. */
1167 1167
1168struct interval_block 1168struct interval_block
diff --git a/src/coding.c b/src/coding.c
index a5b07019388..cb81375a043 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -6075,7 +6075,7 @@ complement_process_encoding_system (Lisp_Object coding_system)
6075static Lisp_Object adjust_coding_eol_type (struct coding_system *coding, int eol_seen); 6075static Lisp_Object adjust_coding_eol_type (struct coding_system *coding, int eol_seen);
6076 6076
6077 6077
6078/* Return 1 if all the source bytes are ASCII, and return 0 otherwize. 6078/* Return true iff all the source bytes are ASCII.
6079 By side effects, set coding->head_ascii and coding->eol_seen. The 6079 By side effects, set coding->head_ascii and coding->eol_seen. The
6080 value of coding->eol_seen is "logical or" of EOL_SEEN_LF, 6080 value of coding->eol_seen is "logical or" of EOL_SEEN_LF,
6081 EOL_SEEN_CR, and EOL_SEEN_CRLF, but the value is reliable only when 6081 EOL_SEEN_CR, and EOL_SEEN_CRLF, but the value is reliable only when
diff --git a/src/dispextern.h b/src/dispextern.h
index a696abfddbb..1f269902435 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -602,8 +602,8 @@ struct glyph_pool
602 602
603 2. Window glyph matrices on frames having frame glyph matrices. 603 2. Window glyph matrices on frames having frame glyph matrices.
604 Such matrices are sub-matrices of their corresponding frame matrix, 604 Such matrices are sub-matrices of their corresponding frame matrix,
605 i.e. frame glyph matrices and window glyph matrices share the same 605 i.e., frame glyph matrices and window glyph matrices share the same
606 glyph memory which is allocated in form of a glyph_pool structure. 606 glyph memory, which is allocated in the form of a glyph_pool structure.
607 Glyph rows in such a window matrix are slices of frame matrix rows. 607 Glyph rows in such a window matrix are slices of frame matrix rows.
608 608
609 2. Free-standing window glyph matrices managing their own glyph 609 2. Free-standing window glyph matrices managing their own glyph
diff --git a/src/emacs.c b/src/emacs.c
index bd33583af0c..5115126577b 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1080,7 +1080,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1080 1080
1081 noninteractive1 = noninteractive; 1081 noninteractive1 = noninteractive;
1082 1082
1083/* Perform basic initializations (not merely interning symbols). */ 1083 /* Perform basic initializations (not merely interning symbols). */
1084 1084
1085 if (!initialized) 1085 if (!initialized)
1086 { 1086 {
@@ -1091,8 +1091,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1091 init_coding_once (); 1091 init_coding_once ();
1092 init_syntax_once (); /* Create standard syntax table. */ 1092 init_syntax_once (); /* Create standard syntax table. */
1093 init_category_once (); /* Create standard category table. */ 1093 init_category_once (); /* Create standard category table. */
1094 /* Must be done before init_buffer. */ 1094 init_casetab_once (); /* Must be done before init_buffer_once. */
1095 init_casetab_once ();
1096 init_buffer_once (); /* Create buffer table and some buffers. */ 1095 init_buffer_once (); /* Create buffer table and some buffers. */
1097 init_minibuf_once (); /* Create list of minibuffers. */ 1096 init_minibuf_once (); /* Create list of minibuffers. */
1098 /* Must precede init_window_once. */ 1097 /* Must precede init_window_once. */
@@ -1117,6 +1116,8 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1117 syms_of_fileio (); 1116 syms_of_fileio ();
1118 /* Before syms_of_coding to initialize Vgc_cons_threshold. */ 1117 /* Before syms_of_coding to initialize Vgc_cons_threshold. */
1119 syms_of_alloc (); 1118 syms_of_alloc ();
1119 /* May call Ffuncall and so GC, thus the latter should be initialized. */
1120 init_print_once ();
1120 /* Before syms_of_coding because it initializes Qcharsetp. */ 1121 /* Before syms_of_coding because it initializes Qcharsetp. */
1121 syms_of_charset (); 1122 syms_of_charset ();
1122 /* Before init_window_once, because it sets up the 1123 /* Before init_window_once, because it sets up the
diff --git a/src/image.c b/src/image.c
index 0d4bc82f3b4..2c0f6e3b8c1 100644
--- a/src/image.c
+++ b/src/image.c
@@ -154,15 +154,15 @@ XGetImage (Display *display, Pixmap pixmap, int x, int y,
154 return pixmap; 154 return pixmap;
155} 155}
156 156
157/* use with imgs created by ns_image_for_XPM */ 157/* Use with images created by ns_image_for_XPM. */
158unsigned long 158unsigned long
159XGetPixel (XImagePtr ximage, int x, int y) 159XGetPixel (XImagePtr ximage, int x, int y)
160{ 160{
161 return ns_get_pixel (ximage, x, y); 161 return ns_get_pixel (ximage, x, y);
162} 162}
163 163
164/* use with imgs created by ns_image_for_XPM; alpha set to 1; 164/* Use with images created by ns_image_for_XPM; alpha set to 1;
165 pixel is assumed to be in form RGB */ 165 pixel is assumed to be in RGB form. */
166void 166void
167XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel) 167XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
168{ 168{
diff --git a/src/lisp.h b/src/lisp.h
index b2ab5684d4d..f526cd36a6f 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3163,6 +3163,7 @@ extern Lisp_Object internal_with_output_to_temp_buffer
3163 (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object); 3163 (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object);
3164enum FLOAT_TO_STRING_BUFSIZE { FLOAT_TO_STRING_BUFSIZE = 350 }; 3164enum FLOAT_TO_STRING_BUFSIZE { FLOAT_TO_STRING_BUFSIZE = 350 };
3165extern int float_to_string (char *, double); 3165extern int float_to_string (char *, double);
3166extern void init_print_once (void);
3166extern void syms_of_print (void); 3167extern void syms_of_print (void);
3167 3168
3168/* Defined in doprnt.c. */ 3169/* Defined in doprnt.c. */
diff --git a/src/print.c b/src/print.c
index 03b46748454..53c0d99f836 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2165,7 +2165,16 @@ print_interval (INTERVAL interval, Lisp_Object printcharfun)
2165 print_object (interval->plist, printcharfun, 1); 2165 print_object (interval->plist, printcharfun, 1);
2166} 2166}
2167 2167
2168 2168/* Initialize debug_print stuff early to have it working from the very
2169 beginning. */
2170
2171void
2172init_print_once (void)
2173{
2174 DEFSYM (Qexternal_debugging_output, "external-debugging-output");
2175 defsubr (&Sexternal_debugging_output);
2176}
2177
2169void 2178void
2170syms_of_print (void) 2179syms_of_print (void)
2171{ 2180{
@@ -2297,12 +2306,10 @@ priorities. */);
2297 defsubr (&Sprint); 2306 defsubr (&Sprint);
2298 defsubr (&Sterpri); 2307 defsubr (&Sterpri);
2299 defsubr (&Swrite_char); 2308 defsubr (&Swrite_char);
2300 defsubr (&Sexternal_debugging_output);
2301#ifdef WITH_REDIRECT_DEBUGGING_OUTPUT 2309#ifdef WITH_REDIRECT_DEBUGGING_OUTPUT
2302 defsubr (&Sredirect_debugging_output); 2310 defsubr (&Sredirect_debugging_output);
2303#endif 2311#endif
2304 2312
2305 DEFSYM (Qexternal_debugging_output, "external-debugging-output");
2306 DEFSYM (Qprint_escape_newlines, "print-escape-newlines"); 2313 DEFSYM (Qprint_escape_newlines, "print-escape-newlines");
2307 DEFSYM (Qprint_escape_multibyte, "print-escape-multibyte"); 2314 DEFSYM (Qprint_escape_multibyte, "print-escape-multibyte");
2308 DEFSYM (Qprint_escape_nonascii, "print-escape-nonascii"); 2315 DEFSYM (Qprint_escape_nonascii, "print-escape-nonascii");
diff --git a/src/window.c b/src/window.c
index df7878f42e5..5dc908f0a4d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -635,30 +635,37 @@ Return nil if WINDOW has no previous sibling. */)
635 635
636DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 1, 1, 0, 636DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 1, 1, 0,
637 doc: /* Return combination limit of window WINDOW. 637 doc: /* Return combination limit of window WINDOW.
638WINDOW must be a valid window used in horizontal or vertical combination.
638If the return value is nil, child windows of WINDOW can be recombined with 639If the return value is nil, child windows of WINDOW can be recombined with
639WINDOW's siblings. A return value of t means that child windows of 640WINDOW's siblings. A return value of t means that child windows of
640WINDOW are never \(re-)combined with WINDOW's siblings. 641WINDOW are never \(re-)combined with WINDOW's siblings. */)
641
642WINDOW must be a valid window. The return value is meaningful for
643internal windows only. */)
644 (Lisp_Object window) 642 (Lisp_Object window)
645{ 643{
644 struct window *w;
645
646 CHECK_VALID_WINDOW (window); 646 CHECK_VALID_WINDOW (window);
647 w = XWINDOW (window);
648 if (!NILP (w->buffer))
649 error ("Combination limit is meaningful for internal windows only");
647 return XWINDOW (window)->combination_limit; 650 return XWINDOW (window)->combination_limit;
648} 651}
649 652
650DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0, 653DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0,
651 doc: /* Set combination limit of window WINDOW to LIMIT; return LIMIT. 654 doc: /* Set combination limit of window WINDOW to LIMIT; return LIMIT.
655WINDOW must be a valid window used in horizontal or vertical combination.
652If LIMIT is nil, child windows of WINDOW can be recombined with WINDOW's 656If LIMIT is nil, child windows of WINDOW can be recombined with WINDOW's
653siblings. LIMIT t means that child windows of WINDOW are never 657siblings. LIMIT t means that child windows of WINDOW are never
654\(re-)combined with WINDOW's siblings. Other values are reserved for 658\(re-)combined with WINDOW's siblings. Other values are reserved for
655future use. 659future use. */)
656
657WINDOW must be a valid window. Setting the combination limit is
658meaningful for internal windows only. */)
659 (Lisp_Object window, Lisp_Object limit) 660 (Lisp_Object window, Lisp_Object limit)
660{ 661{
661 wset_combination_limit (decode_valid_window (window), limit); 662 struct window *w;
663
664 CHECK_VALID_WINDOW (window);
665 w = XWINDOW (window);
666 if (!NILP (w->buffer))
667 error ("Combination limit is meaningful for internal windows only");
668 wset_combination_limit (w, limit);
662 return limit; 669 return limit;
663} 670}
664 671
@@ -5711,10 +5718,9 @@ the return value is nil. Otherwise the value is t. */)
5711 } 5718 }
5712 } 5719 }
5713 5720
5714 /* If we squirreled away the buffer in the window's height, 5721 /* If we squirreled away the buffer, restore it now. */
5715 restore it now. */ 5722 if (BUFFERP (w->combination_limit))
5716 if (BUFFERP (w->total_lines)) 5723 wset_buffer (w, w->combination_limit);
5717 wset_buffer (w, w->total_lines);
5718 wset_left_col (w, p->left_col); 5724 wset_left_col (w, p->left_col);
5719 wset_top_line (w, p->top_line); 5725 wset_top_line (w, p->top_line);
5720 wset_total_cols (w, p->total_cols); 5726 wset_total_cols (w, p->total_cols);
@@ -5918,9 +5924,6 @@ delete_all_child_windows (Lisp_Object window)
5918 /* Delete WINDOW's siblings (we traverse postorderly). */ 5924 /* Delete WINDOW's siblings (we traverse postorderly). */
5919 delete_all_child_windows (w->next); 5925 delete_all_child_windows (w->next);
5920 5926
5921 /* See Fset_window_configuration for excuse. */
5922 wset_total_lines (w, w->buffer);
5923
5924 if (!NILP (w->vchild)) 5927 if (!NILP (w->vchild))
5925 { 5928 {
5926 delete_all_child_windows (w->vchild); 5929 delete_all_child_windows (w->vchild);
@@ -5936,6 +5939,10 @@ delete_all_child_windows (Lisp_Object window)
5936 unshow_buffer (w); 5939 unshow_buffer (w);
5937 unchain_marker (XMARKER (w->pointm)); 5940 unchain_marker (XMARKER (w->pointm));
5938 unchain_marker (XMARKER (w->start)); 5941 unchain_marker (XMARKER (w->start));
5942 /* Since combination limit makes sense for an internal windows
5943 only, we use this slot to save the buffer for the sake of
5944 possible resurrection in Fset_window_configuration. */
5945 wset_combination_limit (w, w->buffer);
5939 wset_buffer (w, Qnil); 5946 wset_buffer (w, Qnil);
5940 } 5947 }
5941 5948
diff --git a/src/xfaces.c b/src/xfaces.c
index 71709446c1d..28bccd392dc 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -112,7 +112,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
112 merging faces of that character, that face is `realized'. The 112 merging faces of that character, that face is `realized'. The
113 realization process maps face attributes to what is physically 113 realization process maps face attributes to what is physically
114 available on the system where Emacs runs. The result is a 114 available on the system where Emacs runs. The result is a
115 `realized face' in form of a struct face which is stored in the 115 `realized face' in the form of a struct face which is stored in the
116 face cache of the frame on which it was realized. 116 face cache of the frame on which it was realized.
117 117
118 Face realization is done in the context of the character to display 118 Face realization is done in the context of the character to display