diff options
| author | Kenichi Handa | 2011-11-11 16:08:47 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2011-11-11 16:08:47 +0900 |
| commit | 0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1 (patch) | |
| tree | 0846cacac3ba56cb8d2054fbc851fee2fb9606d2 /src | |
| parent | 9ac0394b8d1e54bf1b49291c85770af36a94531e (diff) | |
| parent | 68cbc58be59373e805fa200db02e4022e20050f0 (diff) | |
| download | emacs-0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1.tar.gz emacs-0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1.zip | |
merge trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 68 | ||||
| -rw-r--r-- | src/alloc.c | 7 | ||||
| -rw-r--r-- | src/ccl.c | 2 | ||||
| -rw-r--r-- | src/dispextern.h | 16 | ||||
| -rw-r--r-- | src/font.c | 2 | ||||
| -rw-r--r-- | src/frame.c | 2 | ||||
| -rw-r--r-- | src/intervals.c | 19 | ||||
| -rw-r--r-- | src/lisp.h | 4 | ||||
| -rw-r--r-- | src/s/gnu.h | 2 | ||||
| -rw-r--r-- | src/w32.c | 5 | ||||
| -rw-r--r-- | src/window.c | 207 | ||||
| -rw-r--r-- | src/window.h | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 16 |
13 files changed, 219 insertions, 133 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b09dae946f4..42dede8e300 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,74 @@ | |||
| 3 | * xdisp.c (fill_composite_glyph_string): Always set s->face, to | 3 | * xdisp.c (fill_composite_glyph_string): Always set s->face, to |
| 4 | avoid a crash (bug#9496). | 4 | avoid a crash (bug#9496). |
| 5 | 5 | ||
| 6 | 2011-11-09 Chong Yidong <cyd@gnu.org> | ||
| 7 | |||
| 8 | * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges) | ||
| 9 | (Fwindow_inside_absolute_pixel_edges): Only allow live windows. | ||
| 10 | |||
| 11 | 2011-11-08 Paul Eggert <eggert@cs.ucla.edu> | ||
| 12 | |||
| 13 | * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926). | ||
| 14 | |||
| 15 | 2011-11-08 Paul Eggert <eggert@cs.ucla.edu> | ||
| 16 | |||
| 17 | Avoid some portability problems by eschewing 'extern inline' functions. | ||
| 18 | The trivial performance wins aren't worth the portability hassles; see | ||
| 19 | <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html> | ||
| 20 | et seq. | ||
| 21 | * dispextern.h (window_box, window_box_height, window_text_bottom_y) | ||
| 22 | (window_box_width, window_box_left, window_box_left_offset) | ||
| 23 | (window_box_right, window_box_right_offset): Undo previous change, | ||
| 24 | by removing the "extern"s. | ||
| 25 | * intervals.c (adjust_intervals_for_insertion) | ||
| 26 | (adjust_intervals_for_deletion): Undo previous change, | ||
| 27 | making these static again. | ||
| 28 | (offset_intervals, temp_set_point_both, temp_set_point) | ||
| 29 | (copy_intervals_to_string): No longer inline. | ||
| 30 | * xdisp.c (window_text_bottom_y, window_box_width) | ||
| 31 | (window_box_height, window_box_left_offset) | ||
| 32 | (window_box_right_offset, window_box_left, window_box_right) | ||
| 33 | (window_box): No longer inline. | ||
| 34 | |||
| 35 | 2011-11-08 Chong Yidong <cyd@gnu.org> | ||
| 36 | |||
| 37 | * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix. | ||
| 38 | (Fwindow_body_height, Fwindow_body_width): Move from Lisp. Signal | ||
| 39 | an error if not a live window. | ||
| 40 | (Fwindow_total_width, Fwindow_total_height): Move from Lisp. | ||
| 41 | (Fwindow_total_size, Fwindow_body_size): Move to Lisp. | ||
| 42 | |||
| 43 | 2011-11-07 Juanma Barranquero <lekktu@gmail.com> | ||
| 44 | |||
| 45 | * lisp.h (syms_of_abbrev): Remove declaration. | ||
| 46 | Reported by CHENG Gao <chenggao@royau.me>. | ||
| 47 | |||
| 48 | 2011-11-07 Eli Zaretskii <eliz@gnu.org> | ||
| 49 | |||
| 50 | * w32.c (check_windows_init_file): Don't look for term/w32-win.el | ||
| 51 | if Vpurify_flag is non-nil. Fixes a crash when running w32 build | ||
| 52 | of temacs in GUI mode. | ||
| 53 | |||
| 54 | 2011-11-07 Martin Rudalics <rudalics@gmx.at> | ||
| 55 | |||
| 56 | * window.h: Declare delete_all_child_windows instead of | ||
| 57 | delete_all_subwindows. | ||
| 58 | * window.c (Fwindow_nest, Fset_window_nest) | ||
| 59 | (Fset_window_new_total, Fset_window_new_normal) | ||
| 60 | (Fwindow_resize_apply): Don't use term subwindow in doc-strings. | ||
| 61 | (delete_all_subwindows): Rename to delete_all_child_windows. | ||
| 62 | (Fdelete_other_windows_internal, Fset_window_configuration): | ||
| 63 | Call delete_all_child_windows instead of delete_all_subwindows. | ||
| 64 | * frame.c (delete_frame): Call delete_all_child_windows instead | ||
| 65 | of delete_all_subwindows. | ||
| 66 | |||
| 67 | 2011-11-07 Paul Eggert <eggert@cs.ucla.edu> | ||
| 68 | |||
| 69 | * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926). | ||
| 70 | This is also needed for porting to any host where GC_MARK_STACK is | ||
| 71 | not GC_MAKE_GCPROS_NOOPS. | ||
| 72 | (which_symbols): Use it. | ||
| 73 | |||
| 6 | 2011-11-07 Kenichi Handa <handa@m17n.org> | 74 | 2011-11-07 Kenichi Handa <handa@m17n.org> |
| 7 | 75 | ||
| 8 | * coding.c (coding_set_destination): Check coding->src_pos only | 76 | * coding.c (coding_set_destination): Check coding->src_pos only |
diff --git a/src/alloc.c b/src/alloc.c index 210dd7d1687..985e4b71426 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -315,6 +315,7 @@ static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); | |||
| 315 | on free lists recognizable in O(1). */ | 315 | on free lists recognizable in O(1). */ |
| 316 | 316 | ||
| 317 | static Lisp_Object Vdead; | 317 | static Lisp_Object Vdead; |
| 318 | #define DEADP(x) EQ (x, Vdead) | ||
| 318 | 319 | ||
| 319 | #ifdef GC_MALLOC_CHECK | 320 | #ifdef GC_MALLOC_CHECK |
| 320 | 321 | ||
| @@ -411,6 +412,10 @@ static void check_gcpros (void); | |||
| 411 | 412 | ||
| 412 | #endif /* GC_MARK_STACK || GC_MALLOC_CHECK */ | 413 | #endif /* GC_MARK_STACK || GC_MALLOC_CHECK */ |
| 413 | 414 | ||
| 415 | #ifndef DEADP | ||
| 416 | # define DEADP(x) 0 | ||
| 417 | #endif | ||
| 418 | |||
| 414 | /* Recording what needs to be marked for gc. */ | 419 | /* Recording what needs to be marked for gc. */ |
| 415 | 420 | ||
| 416 | struct gcpro *gcprolist; | 421 | struct gcpro *gcprolist; |
| @@ -6261,7 +6266,7 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max) | |||
| 6261 | int gc_count = inhibit_garbage_collection (); | 6266 | int gc_count = inhibit_garbage_collection (); |
| 6262 | Lisp_Object found = Qnil; | 6267 | Lisp_Object found = Qnil; |
| 6263 | 6268 | ||
| 6264 | if (!EQ (obj, Vdead)) | 6269 | if (! DEADP (obj)) |
| 6265 | { | 6270 | { |
| 6266 | for (sblk = symbol_block; sblk; sblk = sblk->next) | 6271 | for (sblk = symbol_block; sblk; sblk = sblk->next) |
| 6267 | { | 6272 | { |
| @@ -429,7 +429,7 @@ static Lisp_Object Vccl_program_table; | |||
| 429 | 429 | ||
| 430 | #define CCL_Extension 0x1F /* Extended CCL code | 430 | #define CCL_Extension 0x1F /* Extended CCL code |
| 431 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX | 431 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX |
| 432 | 2:ARGUEMENT | 432 | 2:ARGUMENT |
| 433 | 3:... | 433 | 3:... |
| 434 | ------------------------------ | 434 | ------------------------------ |
| 435 | extended_command (rrr,RRR,Rrr,ARGS) | 435 | extended_command (rrr,RRR,Rrr,ARGS) |
diff --git a/src/dispextern.h b/src/dispextern.h index fdc7f2f908d..5c60a5499da 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -3006,14 +3006,14 @@ int resize_mini_window (struct window *, int); | |||
| 3006 | void set_vertical_scroll_bar (struct window *); | 3006 | void set_vertical_scroll_bar (struct window *); |
| 3007 | #endif | 3007 | #endif |
| 3008 | int try_window (Lisp_Object, struct text_pos, int); | 3008 | int try_window (Lisp_Object, struct text_pos, int); |
| 3009 | extern void window_box (struct window *, int, int *, int *, int *, int *); | 3009 | void window_box (struct window *, int, int *, int *, int *, int *); |
| 3010 | extern int window_box_height (struct window *); | 3010 | int window_box_height (struct window *); |
| 3011 | extern int window_text_bottom_y (struct window *); | 3011 | int window_text_bottom_y (struct window *); |
| 3012 | extern int window_box_width (struct window *, int); | 3012 | int window_box_width (struct window *, int); |
| 3013 | extern int window_box_left (struct window *, int); | 3013 | int window_box_left (struct window *, int); |
| 3014 | extern int window_box_left_offset (struct window *, int); | 3014 | int window_box_left_offset (struct window *, int); |
| 3015 | extern int window_box_right (struct window *, int); | 3015 | int window_box_right (struct window *, int); |
| 3016 | extern int window_box_right_offset (struct window *, int); | 3016 | int window_box_right_offset (struct window *, int); |
| 3017 | int estimate_mode_line_height (struct frame *, enum face_id); | 3017 | int estimate_mode_line_height (struct frame *, enum face_id); |
| 3018 | void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, | 3018 | void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, |
| 3019 | NativeRectangle *, int); | 3019 | NativeRectangle *, int); |
diff --git a/src/font.c b/src/font.c index 1a4742ba959..f6723157de1 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -162,7 +162,7 @@ static struct font_driver_list *font_driver_list; | |||
| 162 | 162 | ||
| 163 | 163 | ||
| 164 | 164 | ||
| 165 | /* Creaters of font-related Lisp object. */ | 165 | /* Creators of font-related Lisp object. */ |
| 166 | 166 | ||
| 167 | static Lisp_Object | 167 | static Lisp_Object |
| 168 | font_make_spec (void) | 168 | font_make_spec (void) |
diff --git a/src/frame.c b/src/frame.c index 112f102a1f2..d56a2efb17f 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1320,7 +1320,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) | |||
| 1320 | 1320 | ||
| 1321 | /* Mark all the windows that used to be on FRAME as deleted, and then | 1321 | /* Mark all the windows that used to be on FRAME as deleted, and then |
| 1322 | remove the reference to them. */ | 1322 | remove the reference to them. */ |
| 1323 | delete_all_subwindows (f->root_window); | 1323 | delete_all_child_windows (f->root_window); |
| 1324 | f->root_window = Qnil; | 1324 | f->root_window = Qnil; |
| 1325 | 1325 | ||
| 1326 | Vframe_list = Fdelq (frame, Vframe_list); | 1326 | Vframe_list = Fdelq (frame, Vframe_list); |
diff --git a/src/intervals.c b/src/intervals.c index be1bdfb9056..a78c7f07f6c 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -52,11 +52,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 52 | 52 | ||
| 53 | #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set)) | 53 | #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set)) |
| 54 | 54 | ||
| 55 | extern INTERVAL adjust_intervals_for_insertion (INTERVAL, | ||
| 56 | EMACS_INT, EMACS_INT); | ||
| 57 | extern void adjust_intervals_for_deletion (struct buffer *, | ||
| 58 | EMACS_INT, EMACS_INT); | ||
| 59 | |||
| 60 | static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object); | 55 | static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object); |
| 61 | static INTERVAL merge_interval_right (INTERVAL); | 56 | static INTERVAL merge_interval_right (INTERVAL); |
| 62 | static INTERVAL reproduce_tree (INTERVAL, INTERVAL); | 57 | static INTERVAL reproduce_tree (INTERVAL, INTERVAL); |
| @@ -803,7 +798,7 @@ update_interval (register INTERVAL i, EMACS_INT pos) | |||
| 803 | and check the hungry bits of both. Then add the length going back up | 798 | and check the hungry bits of both. Then add the length going back up |
| 804 | to the root. */ | 799 | to the root. */ |
| 805 | 800 | ||
| 806 | INTERVAL | 801 | static INTERVAL |
| 807 | adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, | 802 | adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, |
| 808 | EMACS_INT length) | 803 | EMACS_INT length) |
| 809 | { | 804 | { |
| @@ -864,7 +859,7 @@ adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, | |||
| 864 | interval. Another possibility would be to create a new interval for | 859 | interval. Another possibility would be to create a new interval for |
| 865 | this text, and make it have the merged properties of both ends. */ | 860 | this text, and make it have the merged properties of both ends. */ |
| 866 | 861 | ||
| 867 | INTERVAL | 862 | static INTERVAL |
| 868 | adjust_intervals_for_insertion (INTERVAL tree, | 863 | adjust_intervals_for_insertion (INTERVAL tree, |
| 869 | EMACS_INT position, EMACS_INT length) | 864 | EMACS_INT position, EMACS_INT length) |
| 870 | { | 865 | { |
| @@ -1374,7 +1369,7 @@ interval_deletion_adjustment (register INTERVAL tree, register EMACS_INT from, | |||
| 1374 | text. The deletion is effected at position START (which is a | 1369 | text. The deletion is effected at position START (which is a |
| 1375 | buffer position, i.e. origin 1). */ | 1370 | buffer position, i.e. origin 1). */ |
| 1376 | 1371 | ||
| 1377 | void | 1372 | static void |
| 1378 | adjust_intervals_for_deletion (struct buffer *buffer, | 1373 | adjust_intervals_for_deletion (struct buffer *buffer, |
| 1379 | EMACS_INT start, EMACS_INT length) | 1374 | EMACS_INT start, EMACS_INT length) |
| 1380 | { | 1375 | { |
| @@ -1430,7 +1425,7 @@ adjust_intervals_for_deletion (struct buffer *buffer, | |||
| 1430 | compiler that does not allow calling a static function (here, | 1425 | compiler that does not allow calling a static function (here, |
| 1431 | adjust_intervals_for_deletion) from a non-static inline function. */ | 1426 | adjust_intervals_for_deletion) from a non-static inline function. */ |
| 1432 | 1427 | ||
| 1433 | inline void | 1428 | void |
| 1434 | offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) | 1429 | offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) |
| 1435 | { | 1430 | { |
| 1436 | if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) | 1431 | if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) |
| @@ -1882,7 +1877,7 @@ lookup_char_property (Lisp_Object plist, register Lisp_Object prop, int textprop | |||
| 1882 | /* Set point in BUFFER "temporarily" to CHARPOS, which corresponds to | 1877 | /* Set point in BUFFER "temporarily" to CHARPOS, which corresponds to |
| 1883 | byte position BYTEPOS. */ | 1878 | byte position BYTEPOS. */ |
| 1884 | 1879 | ||
| 1885 | inline void | 1880 | void |
| 1886 | temp_set_point_both (struct buffer *buffer, | 1881 | temp_set_point_both (struct buffer *buffer, |
| 1887 | EMACS_INT charpos, EMACS_INT bytepos) | 1882 | EMACS_INT charpos, EMACS_INT bytepos) |
| 1888 | { | 1883 | { |
| @@ -1902,7 +1897,7 @@ temp_set_point_both (struct buffer *buffer, | |||
| 1902 | 1897 | ||
| 1903 | /* Set point "temporarily", without checking any text properties. */ | 1898 | /* Set point "temporarily", without checking any text properties. */ |
| 1904 | 1899 | ||
| 1905 | inline void | 1900 | void |
| 1906 | temp_set_point (struct buffer *buffer, EMACS_INT charpos) | 1901 | temp_set_point (struct buffer *buffer, EMACS_INT charpos) |
| 1907 | { | 1902 | { |
| 1908 | temp_set_point_both (buffer, charpos, | 1903 | temp_set_point_both (buffer, charpos, |
| @@ -2391,7 +2386,7 @@ copy_intervals (INTERVAL tree, EMACS_INT start, EMACS_INT length) | |||
| 2391 | 2386 | ||
| 2392 | /* Give STRING the properties of BUFFER from POSITION to LENGTH. */ | 2387 | /* Give STRING the properties of BUFFER from POSITION to LENGTH. */ |
| 2393 | 2388 | ||
| 2394 | inline void | 2389 | void |
| 2395 | copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, | 2390 | copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, |
| 2396 | EMACS_INT position, EMACS_INT length) | 2391 | EMACS_INT position, EMACS_INT length) |
| 2397 | { | 2392 | { |
diff --git a/src/lisp.h b/src/lisp.h index f3c704bc763..46448f7a1fb 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3155,10 +3155,6 @@ extern void syms_of_fileio (void); | |||
| 3155 | extern Lisp_Object make_temp_name (Lisp_Object, int); | 3155 | extern Lisp_Object make_temp_name (Lisp_Object, int); |
| 3156 | extern Lisp_Object Qdelete_file; | 3156 | extern Lisp_Object Qdelete_file; |
| 3157 | 3157 | ||
| 3158 | /* Defined in abbrev.c */ | ||
| 3159 | |||
| 3160 | extern void syms_of_abbrev (void); | ||
| 3161 | |||
| 3162 | /* Defined in search.c */ | 3158 | /* Defined in search.c */ |
| 3163 | extern void shrink_regexp_cache (void); | 3159 | extern void shrink_regexp_cache (void); |
| 3164 | EXFUN (Fstring_match, 3); | 3160 | EXFUN (Fstring_match, 3); |
diff --git a/src/s/gnu.h b/src/s/gnu.h index c40f764f8bf..b40f7b0a95b 100644 --- a/src/s/gnu.h +++ b/src/s/gnu.h | |||
| @@ -44,3 +44,5 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 44 | #endif /* !_IO_STDIO_H */ | 44 | #endif /* !_IO_STDIO_H */ |
| 45 | #endif /* emacs */ | 45 | #endif /* emacs */ |
| 46 | 46 | ||
| 47 | /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */ | ||
| 48 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | ||
| @@ -5784,7 +5784,10 @@ check_windows_init_file (void) | |||
| 5784 | it cannot find the Windows installation file. If this file does | 5784 | it cannot find the Windows installation file. If this file does |
| 5785 | not exist in the expected place, tell the user. */ | 5785 | not exist in the expected place, tell the user. */ |
| 5786 | 5786 | ||
| 5787 | if (!noninteractive && !inhibit_window_system) | 5787 | if (!noninteractive && !inhibit_window_system |
| 5788 | /* Vload_path is not yet initialized when we are loading | ||
| 5789 | loadup.el. */ | ||
| 5790 | && NILP (Vpurify_flag)) | ||
| 5788 | { | 5791 | { |
| 5789 | Lisp_Object objs[2]; | 5792 | Lisp_Object objs[2]; |
| 5790 | Lisp_Object full_load_path; | 5793 | Lisp_Object full_load_path; |
diff --git a/src/window.c b/src/window.c index 605d00b8e05..83a8974e88d 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -504,8 +504,8 @@ DEFUN ("window-nest", Fwindow_nest, Swindow_nest, 0, 1, 0, | |||
| 504 | doc: /* Return nest status of window WINDOW. | 504 | doc: /* Return nest status of window WINDOW. |
| 505 | If WINDOW is omitted or nil, it defaults to the selected window. | 505 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 506 | 506 | ||
| 507 | If the return value is nil, subwindows of WINDOW can be recombined with | 507 | If the return value is nil, child windows of WINDOW can be recombined with |
| 508 | WINDOW's siblings. A return value of non-nil means that subwindows of | 508 | WINDOW's siblings. A return value of non-nil means that child windows of |
| 509 | WINDOW are never \(re-)combined with WINDOW's siblings. */) | 509 | WINDOW are never \(re-)combined with WINDOW's siblings. */) |
| 510 | (Lisp_Object window) | 510 | (Lisp_Object window) |
| 511 | { | 511 | { |
| @@ -516,8 +516,8 @@ DEFUN ("set-window-nest", Fset_window_nest, Sset_window_nest, 2, 2, 0, | |||
| 516 | doc: /* Set nest status of window WINDOW to STATUS; return STATUS. | 516 | doc: /* Set nest status of window WINDOW to STATUS; return STATUS. |
| 517 | If WINDOW is omitted or nil, it defaults to the selected window. | 517 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 518 | 518 | ||
| 519 | If STATUS is nil, subwindows of WINDOW can be recombined with WINDOW's | 519 | If STATUS is nil, child windows of WINDOW can be recombined with WINDOW's |
| 520 | siblings. STATUS non-nil means that subwindows of WINDOW are never | 520 | siblings. STATUS non-nil means that child windows of WINDOW are never |
| 521 | \(re-)combined with WINDOW's siblings. */) | 521 | \(re-)combined with WINDOW's siblings. */) |
| 522 | (Lisp_Object window, Lisp_Object status) | 522 | (Lisp_Object window, Lisp_Object status) |
| 523 | { | 523 | { |
| @@ -539,27 +539,34 @@ selected one. */) | |||
| 539 | return decode_window (window)->use_time; | 539 | return decode_window (window)->use_time; |
| 540 | } | 540 | } |
| 541 | 541 | ||
| 542 | DEFUN ("window-total-size", Fwindow_total_size, Swindow_total_size, 0, 2, 0, | 542 | DEFUN ("window-total-height", Fwindow_total_height, Swindow_total_height, 0, 1, 0, |
| 543 | doc: /* Return the total number of lines of window WINDOW. | 543 | doc: /* Return the total height, in lines, of window WINDOW. |
| 544 | If WINDOW is omitted or nil, it defaults to the selected window. | 544 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 545 | 545 | ||
| 546 | The return value includes WINDOW's mode line and header line, if any. | 546 | The return value includes the mode line and header line, if any. |
| 547 | If WINDOW is internal, the return value is the sum of the total number | 547 | If WINDOW is an internal window, the total height is the height |
| 548 | of lines of WINDOW's child windows if these are vertically combined | 548 | of the screen areas spanned by its children. |
| 549 | and the height of WINDOW's first child otherwise. | 549 | |
| 550 | 550 | On a graphical display, this total height is reported as an | |
| 551 | Optional argument HORIZONTAL non-nil means return the total number of | 551 | integer multiple of the default character height. */) |
| 552 | columns of WINDOW. In this case the return value includes any vertical | 552 | (Lisp_Object window) |
| 553 | dividers or scrollbars of WINDOW. If WINDOW is internal, the return | ||
| 554 | value is the sum of the total number of columns of WINDOW's child | ||
| 555 | windows if they are horizontally combined and the width of WINDOW's | ||
| 556 | first child otherwise. */) | ||
| 557 | (Lisp_Object window, Lisp_Object horizontal) | ||
| 558 | { | 553 | { |
| 559 | if (NILP (horizontal)) | 554 | return decode_any_window (window)->total_lines; |
| 560 | return decode_any_window (window)->total_lines; | 555 | } |
| 561 | else | 556 | |
| 562 | return decode_any_window (window)->total_cols; | 557 | DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 1, 0, |
| 558 | doc: /* Return the total width, in columns, of window WINDOW. | ||
| 559 | If WINDOW is omitted or nil, it defaults to the selected window. | ||
| 560 | |||
| 561 | The return value includes any vertical dividers or scroll bars | ||
| 562 | belonging to WINDOW. If WINDOW is an internal window, the total width | ||
| 563 | is the width of the screen areas spanned by its children. | ||
| 564 | |||
| 565 | On a graphical display, this total width is reported as an | ||
| 566 | integer multiple of the default character width. */) | ||
| 567 | (Lisp_Object window) | ||
| 568 | { | ||
| 569 | return decode_any_window (window)->total_cols; | ||
| 563 | } | 570 | } |
| 564 | 571 | ||
| 565 | DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, | 572 | DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, |
| @@ -592,6 +599,10 @@ If WINDOW is omitted or nil, it defaults to the selected window. */) | |||
| 592 | 599 | ||
| 593 | DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0, | 600 | DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0, |
| 594 | doc: /* Return left column of window WINDOW. | 601 | doc: /* Return left column of window WINDOW. |
| 602 | This is the distance, in columns, between the left edge of WINDOW and | ||
| 603 | the left edge of the frame's window area. For instance, the return | ||
| 604 | value is 0 if there is no window to the left of WINDOW. | ||
| 605 | |||
| 595 | If WINDOW is omitted or nil, it defaults to the selected window. */) | 606 | If WINDOW is omitted or nil, it defaults to the selected window. */) |
| 596 | (Lisp_Object window) | 607 | (Lisp_Object window) |
| 597 | { | 608 | { |
| @@ -600,6 +611,10 @@ If WINDOW is omitted or nil, it defaults to the selected window. */) | |||
| 600 | 611 | ||
| 601 | DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0, | 612 | DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0, |
| 602 | doc: /* Return top line of window WINDOW. | 613 | doc: /* Return top line of window WINDOW. |
| 614 | This is the distance, in lines, between the top of WINDOW and the top | ||
| 615 | of the frame's window area. For instance, the return value is 0 if | ||
| 616 | there is no window above WINDOW. | ||
| 617 | |||
| 603 | If WINDOW is omitted or nil, it defaults to the selected window. */) | 618 | If WINDOW is omitted or nil, it defaults to the selected window. */) |
| 604 | (Lisp_Object window) | 619 | (Lisp_Object window) |
| 605 | { | 620 | { |
| @@ -655,34 +670,34 @@ window_body_cols (struct window *w) | |||
| 655 | return width; | 670 | return width; |
| 656 | } | 671 | } |
| 657 | 672 | ||
| 658 | DEFUN ("window-body-size", Fwindow_body_size, Swindow_body_size, 0, 2, 0, | 673 | DEFUN ("window-body-height", Fwindow_body_height, Swindow_body_height, 0, 1, 0, |
| 659 | doc: /* Return the number of lines or columns of WINDOW's body. | 674 | doc: /* Return the height, in lines, of WINDOW's text area. |
| 660 | WINDOW must be a live window and defaults to the selected one. | 675 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 676 | Signal an error if the window is not live. | ||
| 661 | 677 | ||
| 662 | If the optional argument HORIZONTAL is omitted or nil, the function | 678 | The returned height does not include the mode line or header line. |
| 663 | returns the number of WINDOW's lines, excluding the mode line and | 679 | On a graphical display, the height is expressed as an integer multiple |
| 664 | header line, if any. | 680 | of the default character height. If a line at the bottom of the text |
| 665 | 681 | area is only partially visible, that counts as a whole line; to | |
| 666 | If HORIZONTAL is non-nil, the function returns the number of columns | 682 | exclude partially-visible lines, use `window-text-height'. */) |
| 667 | excluding any vertical dividers or scroll bars owned by WINDOW. On a | 683 | (Lisp_Object window) |
| 668 | window-system the return value also excludes the number of columns | ||
| 669 | used for WINDOW's fringes or display margins. | ||
| 670 | |||
| 671 | Note that the return value is measured in canonical units, i.e. for | ||
| 672 | the default frame's face. If the window shows some characters with | ||
| 673 | non-default face, e.g., if the font of some characters is larger or | ||
| 674 | smaller than the default font, the value returned by this function | ||
| 675 | will not match the actual number of lines or characters per line | ||
| 676 | shown in the window. To get the actual number of columns and lines, | ||
| 677 | use `posn-at-point'. */) | ||
| 678 | (Lisp_Object window, Lisp_Object horizontal) | ||
| 679 | { | 684 | { |
| 680 | struct window *w = decode_any_window (window); | 685 | struct window *w = decode_window (window); |
| 686 | return make_number (window_body_lines (w)); | ||
| 687 | } | ||
| 681 | 688 | ||
| 682 | if (NILP (horizontal)) | 689 | DEFUN ("window-body-width", Fwindow_body_width, Swindow_body_width, 0, 1, 0, |
| 683 | return make_number (window_body_lines (w)); | 690 | doc: /* Return the width, in columns, of WINDOW's text area. |
| 684 | else | 691 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 685 | return make_number (window_body_cols (w)); | 692 | Signal an error if the window is not live. |
| 693 | |||
| 694 | The return value does not include any vertical dividers, fringe or | ||
| 695 | marginal areas, or scroll bars. On a graphical display, the width is | ||
| 696 | expressed as an integer multiple of the default character width. */) | ||
| 697 | (Lisp_Object window) | ||
| 698 | { | ||
| 699 | struct window *w = decode_window (window); | ||
| 700 | return make_number (window_body_cols (w)); | ||
| 686 | } | 701 | } |
| 687 | 702 | ||
| 688 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, | 703 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, |
| @@ -844,7 +859,7 @@ The inside edges do not include the space used by the WINDOW's scroll | |||
| 844 | bar, display margins, fringes, header line, and/or mode line. */) | 859 | bar, display margins, fringes, header line, and/or mode line. */) |
| 845 | (Lisp_Object window) | 860 | (Lisp_Object window) |
| 846 | { | 861 | { |
| 847 | register struct window *w = decode_any_window (window); | 862 | register struct window *w = decode_window (window); |
| 848 | 863 | ||
| 849 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) | 864 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) |
| 850 | + WINDOW_LEFT_MARGIN_COLS (w) | 865 | + WINDOW_LEFT_MARGIN_COLS (w) |
| @@ -859,9 +874,9 @@ bar, display margins, fringes, header line, and/or mode line. */) | |||
| 859 | } | 874 | } |
| 860 | 875 | ||
| 861 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, | 876 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, |
| 862 | doc: /* Return a list of the edge pixel coordinates of WINDOW. | 877 | doc: /* Return a list of the edge pixel coordinates of WINDOW's text area. |
| 863 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at | 878 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to (0,0) |
| 864 | the top left corner of the frame. | 879 | at the top left corner of the frame's window area. |
| 865 | 880 | ||
| 866 | RIGHT is one more than the rightmost x position of WINDOW's text area. | 881 | RIGHT is one more than the rightmost x position of WINDOW's text area. |
| 867 | BOTTOM is one more than the bottommost y position of WINDOW's text area. | 882 | BOTTOM is one more than the bottommost y position of WINDOW's text area. |
| @@ -869,7 +884,7 @@ The inside edges do not include the space used by WINDOW's scroll bar, | |||
| 869 | display margins, fringes, header line, and/or mode line. */) | 884 | display margins, fringes, header line, and/or mode line. */) |
| 870 | (Lisp_Object window) | 885 | (Lisp_Object window) |
| 871 | { | 886 | { |
| 872 | register struct window *w = decode_any_window (window); | 887 | register struct window *w = decode_window (window); |
| 873 | 888 | ||
| 874 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) | 889 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) |
| 875 | + WINDOW_LEFT_MARGIN_WIDTH (w) | 890 | + WINDOW_LEFT_MARGIN_WIDTH (w) |
| @@ -886,9 +901,9 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 886 | DEFUN ("window-inside-absolute-pixel-edges", | 901 | DEFUN ("window-inside-absolute-pixel-edges", |
| 887 | Fwindow_inside_absolute_pixel_edges, | 902 | Fwindow_inside_absolute_pixel_edges, |
| 888 | Swindow_inside_absolute_pixel_edges, 0, 1, 0, | 903 | Swindow_inside_absolute_pixel_edges, 0, 1, 0, |
| 889 | doc: /* Return a list of the edge pixel coordinates of WINDOW. | 904 | doc: /* Return a list of the edge pixel coordinates of WINDOW's text area. |
| 890 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at | 905 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to (0,0) |
| 891 | the top left corner of the display. | 906 | at the top left corner of the frame's window area. |
| 892 | 907 | ||
| 893 | RIGHT is one more than the rightmost x position of WINDOW's text area. | 908 | RIGHT is one more than the rightmost x position of WINDOW's text area. |
| 894 | BOTTOM is one more than the bottommost y position of WINDOW's text area. | 909 | BOTTOM is one more than the bottommost y position of WINDOW's text area. |
| @@ -896,7 +911,7 @@ The inside edges do not include the space used by WINDOW's scroll bar, | |||
| 896 | display margins, fringes, header line, and/or mode line. */) | 911 | display margins, fringes, header line, and/or mode line. */) |
| 897 | (Lisp_Object window) | 912 | (Lisp_Object window) |
| 898 | { | 913 | { |
| 899 | register struct window *w = decode_any_window (window); | 914 | register struct window *w = decode_window (window); |
| 900 | int add_x, add_y; | 915 | int add_x, add_y; |
| 901 | calc_absolute_offset (w, &add_x, &add_y); | 916 | calc_absolute_offset (w, &add_x, &add_y); |
| 902 | 917 | ||
| @@ -2571,9 +2586,9 @@ DEFUN ("delete-other-windows-internal", Fdelete_other_windows_internal, | |||
| 2571 | Only the frame WINDOW is on is affected. WINDOW may be any window and | 2586 | Only the frame WINDOW is on is affected. WINDOW may be any window and |
| 2572 | defaults to the selected one. | 2587 | defaults to the selected one. |
| 2573 | 2588 | ||
| 2574 | Optional argument ROOT, if non-nil, must specify an internal window | 2589 | Optional argument ROOT, if non-nil, must specify an internal window such |
| 2575 | containing WINDOW as a subwindow. If this is the case, replace ROOT by | 2590 | that WINDOW is in its window subtree. If this is the case, replace ROOT |
| 2576 | WINDOW and leave alone any windows not contained in ROOT. | 2591 | by WINDOW and leave alone any windows not part of ROOT's subtree. |
| 2577 | 2592 | ||
| 2578 | When WINDOW is live try to reduce display jumps by keeping the text | 2593 | When WINDOW is live try to reduce display jumps by keeping the text |
| 2579 | previously visible in WINDOW in the same place on the frame. Doing this | 2594 | previously visible in WINDOW in the same place on the frame. Doing this |
| @@ -2637,10 +2652,10 @@ window-start value is reasonable when this function is called. */) | |||
| 2637 | } | 2652 | } |
| 2638 | else | 2653 | else |
| 2639 | { | 2654 | { |
| 2640 | /* See if the frame's selected window is a subwindow of WINDOW, by | 2655 | /* See if the frame's selected window is a part of the window |
| 2641 | finding all the selected window's parents and comparing each | 2656 | subtree rooted at WINDOW, by finding all the selected window's |
| 2642 | one with WINDOW. If it isn't we need a new selected window for | 2657 | parents and comparing each one with WINDOW. If it isn't we |
| 2643 | this frame. */ | 2658 | need a new selected window for this frame. */ |
| 2644 | swindow = FRAME_SELECTED_WINDOW (f); | 2659 | swindow = FRAME_SELECTED_WINDOW (f); |
| 2645 | while (1) | 2660 | while (1) |
| 2646 | { | 2661 | { |
| @@ -2676,7 +2691,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2676 | 2691 | ||
| 2677 | if (NILP (w->buffer)) | 2692 | if (NILP (w->buffer)) |
| 2678 | { | 2693 | { |
| 2679 | /* Resize subwindows vertically. */ | 2694 | /* Resize child windows vertically. */ |
| 2680 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); | 2695 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); |
| 2681 | w->top_line = r->top_line; | 2696 | w->top_line = r->top_line; |
| 2682 | resize_root_window (window, delta, Qnil, Qnil); | 2697 | resize_root_window (window, delta, Qnil, Qnil); |
| @@ -2691,7 +2706,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2691 | resize_failed = 1; | 2706 | resize_failed = 1; |
| 2692 | } | 2707 | } |
| 2693 | 2708 | ||
| 2694 | /* Resize subwindows horizontally. */ | 2709 | /* Resize child windows horizontally. */ |
| 2695 | if (!resize_failed) | 2710 | if (!resize_failed) |
| 2696 | { | 2711 | { |
| 2697 | w->left_col = r->left_col; | 2712 | w->left_col = r->left_col; |
| @@ -2740,15 +2755,15 @@ window-start value is reasonable when this function is called. */) | |||
| 2740 | XWINDOW (w->parent)->hchild = sibling; | 2755 | XWINDOW (w->parent)->hchild = sibling; |
| 2741 | } | 2756 | } |
| 2742 | 2757 | ||
| 2743 | /* Delete ROOT and all subwindows of ROOT. */ | 2758 | /* Delete ROOT and all child windows of ROOT. */ |
| 2744 | if (!NILP (r->vchild)) | 2759 | if (!NILP (r->vchild)) |
| 2745 | { | 2760 | { |
| 2746 | delete_all_subwindows (r->vchild); | 2761 | delete_all_child_windows (r->vchild); |
| 2747 | r->vchild = Qnil; | 2762 | r->vchild = Qnil; |
| 2748 | } | 2763 | } |
| 2749 | else if (!NILP (r->hchild)) | 2764 | else if (!NILP (r->hchild)) |
| 2750 | { | 2765 | { |
| 2751 | delete_all_subwindows (r->hchild); | 2766 | delete_all_child_windows (r->hchild); |
| 2752 | r->hchild = Qnil; | 2767 | r->hchild = Qnil; |
| 2753 | } | 2768 | } |
| 2754 | 2769 | ||
| @@ -3349,7 +3364,7 @@ Return SIZE. | |||
| 3349 | Optional argument ADD non-nil means add SIZE to the new total size of | 3364 | Optional argument ADD non-nil means add SIZE to the new total size of |
| 3350 | WINDOW and return the sum. | 3365 | WINDOW and return the sum. |
| 3351 | 3366 | ||
| 3352 | Note: This function does not operate on any subwindows of WINDOW. */) | 3367 | Note: This function does not operate on any child windows of WINDOW. */) |
| 3353 | (Lisp_Object window, Lisp_Object size, Lisp_Object add) | 3368 | (Lisp_Object window, Lisp_Object size, Lisp_Object add) |
| 3354 | { | 3369 | { |
| 3355 | struct window *w = decode_any_window (window); | 3370 | struct window *w = decode_any_window (window); |
| @@ -3367,7 +3382,7 @@ DEFUN ("set-window-new-normal", Fset_window_new_normal, Sset_window_new_normal, | |||
| 3367 | doc: /* Set new normal size of WINDOW to SIZE. | 3382 | doc: /* Set new normal size of WINDOW to SIZE. |
| 3368 | Return SIZE. | 3383 | Return SIZE. |
| 3369 | 3384 | ||
| 3370 | Note: This function does not operate on any subwindows of WINDOW. */) | 3385 | Note: This function does not operate on any child windows of WINDOW. */) |
| 3371 | (Lisp_Object window, Lisp_Object size) | 3386 | (Lisp_Object window, Lisp_Object size) |
| 3372 | { | 3387 | { |
| 3373 | struct window *w = decode_any_window (window); | 3388 | struct window *w = decode_any_window (window); |
| @@ -3378,7 +3393,7 @@ Note: This function does not operate on any subwindows of WINDOW. */) | |||
| 3378 | 3393 | ||
| 3379 | /* Return 1 if setting w->total_lines (w->total_cols if HORFLAG is | 3394 | /* Return 1 if setting w->total_lines (w->total_cols if HORFLAG is |
| 3380 | non-zero) to w->new_total would result in correct heights (widths) | 3395 | non-zero) to w->new_total would result in correct heights (widths) |
| 3381 | for window W and recursively all subwindows of W. | 3396 | for window W and recursively all child windows of W. |
| 3382 | 3397 | ||
| 3383 | Note: This function does not check any of `window-fixed-size-p', | 3398 | Note: This function does not check any of `window-fixed-size-p', |
| 3384 | `window-min-height' or `window-min-width'. It does check that window | 3399 | `window-min-height' or `window-min-width'. It does check that window |
| @@ -3393,7 +3408,7 @@ window_resize_check (struct window *w, int horflag) | |||
| 3393 | { | 3408 | { |
| 3394 | c = XWINDOW (w->vchild); | 3409 | c = XWINDOW (w->vchild); |
| 3395 | if (horflag) | 3410 | if (horflag) |
| 3396 | /* All subwindows of W must have the same width as W. */ | 3411 | /* All child windows of W must have the same width as W. */ |
| 3397 | { | 3412 | { |
| 3398 | while (c) | 3413 | while (c) |
| 3399 | { | 3414 | { |
| @@ -3405,8 +3420,8 @@ window_resize_check (struct window *w, int horflag) | |||
| 3405 | return 1; | 3420 | return 1; |
| 3406 | } | 3421 | } |
| 3407 | else | 3422 | else |
| 3408 | /* The sum of the heights of the subwindows of W must equal W's | 3423 | /* The sum of the heights of the child windows of W must equal |
| 3409 | height. */ | 3424 | W's height. */ |
| 3410 | { | 3425 | { |
| 3411 | int sum_of_sizes = 0; | 3426 | int sum_of_sizes = 0; |
| 3412 | while (c) | 3427 | while (c) |
| @@ -3424,7 +3439,7 @@ window_resize_check (struct window *w, int horflag) | |||
| 3424 | { | 3439 | { |
| 3425 | c = XWINDOW (w->hchild); | 3440 | c = XWINDOW (w->hchild); |
| 3426 | if (horflag) | 3441 | if (horflag) |
| 3427 | /* The sum of the widths of the subwindows of W must equal W's | 3442 | /* The sum of the widths of the child windows of W must equal W's |
| 3428 | width. */ | 3443 | width. */ |
| 3429 | { | 3444 | { |
| 3430 | int sum_of_sizes = 0; | 3445 | int sum_of_sizes = 0; |
| @@ -3438,7 +3453,7 @@ window_resize_check (struct window *w, int horflag) | |||
| 3438 | return (sum_of_sizes == XINT (w->new_total)); | 3453 | return (sum_of_sizes == XINT (w->new_total)); |
| 3439 | } | 3454 | } |
| 3440 | else | 3455 | else |
| 3441 | /* All subwindows of W must have the same height as W. */ | 3456 | /* All child windows of W must have the same height as W. */ |
| 3442 | { | 3457 | { |
| 3443 | while (c) | 3458 | while (c) |
| 3444 | { | 3459 | { |
| @@ -3458,9 +3473,9 @@ window_resize_check (struct window *w, int horflag) | |||
| 3458 | } | 3473 | } |
| 3459 | 3474 | ||
| 3460 | /* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to | 3475 | /* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to |
| 3461 | w->new_total for window W and recursively all subwindows of W. Also | 3476 | w->new_total for window W and recursively all child windows of W. |
| 3462 | calculate and assign the new vertical (horizontal) start positions of | 3477 | Also calculate and assign the new vertical (horizontal) start |
| 3463 | each of these windows. | 3478 | positions of each of these windows. |
| 3464 | 3479 | ||
| 3465 | This function does not perform any error checks. Make sure you have | 3480 | This function does not perform any error checks. Make sure you have |
| 3466 | run window_resize_check on W before applying this function. */ | 3481 | run window_resize_check on W before applying this function. */ |
| @@ -3534,8 +3549,8 @@ Optional argument HORIZONTAL omitted or nil means apply requested height | |||
| 3534 | values. HORIZONTAL non-nil means apply requested width values. | 3549 | values. HORIZONTAL non-nil means apply requested width values. |
| 3535 | 3550 | ||
| 3536 | This function checks whether the requested values sum up to a valid | 3551 | This function checks whether the requested values sum up to a valid |
| 3537 | window layout, recursively assigns the new sizes of all subwindows and | 3552 | window layout, recursively assigns the new sizes of all child windows |
| 3538 | calculates and assigns the new start positions of these windows. | 3553 | and calculates and assigns the new start positions of these windows. |
| 3539 | 3554 | ||
| 3540 | Note: This function does not check any of `window-fixed-size-p', | 3555 | Note: This function does not check any of `window-fixed-size-p', |
| 3541 | `window-min-height' or `window-min-width'. All these checks have to | 3556 | `window-min-height' or `window-min-width'. All these checks have to |
| @@ -3931,12 +3946,12 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3931 | 3946 | ||
| 3932 | if (!NILP (w->vchild)) | 3947 | if (!NILP (w->vchild)) |
| 3933 | { | 3948 | { |
| 3934 | delete_all_subwindows (w->vchild); | 3949 | delete_all_child_windows (w->vchild); |
| 3935 | w->vchild = Qnil; | 3950 | w->vchild = Qnil; |
| 3936 | } | 3951 | } |
| 3937 | else if (!NILP (w->hchild)) | 3952 | else if (!NILP (w->hchild)) |
| 3938 | { | 3953 | { |
| 3939 | delete_all_subwindows (w->hchild); | 3954 | delete_all_child_windows (w->hchild); |
| 3940 | w->hchild = Qnil; | 3955 | w->hchild = Qnil; |
| 3941 | } | 3956 | } |
| 3942 | else if (!NILP (w->buffer)) | 3957 | else if (!NILP (w->buffer)) |
| @@ -5218,10 +5233,10 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 5218 | DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height, | 5233 | DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height, |
| 5219 | 0, 1, 0, | 5234 | 0, 1, 0, |
| 5220 | doc: /* Return the height in lines of the text display area of WINDOW. | 5235 | doc: /* Return the height in lines of the text display area of WINDOW. |
| 5221 | WINDOW defaults to the selected window. | 5236 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 5222 | 5237 | ||
| 5223 | The return value does not include the mode line, any header line, nor | 5238 | The returned height does not include the mode line, any header line, |
| 5224 | any partial-height lines in the text display area. */) | 5239 | nor any partial-height lines at the bottom of the text area. */) |
| 5225 | (Lisp_Object window) | 5240 | (Lisp_Object window) |
| 5226 | { | 5241 | { |
| 5227 | struct window *w = decode_window (window); | 5242 | struct window *w = decode_window (window); |
| @@ -5515,7 +5530,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5515 | Save their current buffers in their height fields, since we may | 5530 | Save their current buffers in their height fields, since we may |
| 5516 | need it later, if a buffer saved in the configuration is now | 5531 | need it later, if a buffer saved in the configuration is now |
| 5517 | dead. */ | 5532 | dead. */ |
| 5518 | delete_all_subwindows (FRAME_ROOT_WINDOW (f)); | 5533 | delete_all_child_windows (FRAME_ROOT_WINDOW (f)); |
| 5519 | 5534 | ||
| 5520 | for (k = 0; k < saved_windows->header.size; k++) | 5535 | for (k = 0; k < saved_windows->header.size; k++) |
| 5521 | { | 5536 | { |
| @@ -5729,10 +5744,10 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5729 | } | 5744 | } |
| 5730 | 5745 | ||
| 5731 | 5746 | ||
| 5732 | /* Delete all subwindows reachable via the next, vchild, and hchild | 5747 | /* Recursively delete all child windows reachable via the next, vchild, |
| 5733 | slots of WINDOW. */ | 5748 | and hchild slots of WINDOW. */ |
| 5734 | void | 5749 | void |
| 5735 | delete_all_subwindows (Lisp_Object window) | 5750 | delete_all_child_windows (Lisp_Object window) |
| 5736 | { | 5751 | { |
| 5737 | register struct window *w; | 5752 | register struct window *w; |
| 5738 | 5753 | ||
| @@ -5740,18 +5755,18 @@ delete_all_subwindows (Lisp_Object window) | |||
| 5740 | 5755 | ||
| 5741 | if (!NILP (w->next)) | 5756 | if (!NILP (w->next)) |
| 5742 | /* Delete WINDOW's siblings (we traverse postorderly). */ | 5757 | /* Delete WINDOW's siblings (we traverse postorderly). */ |
| 5743 | delete_all_subwindows (w->next); | 5758 | delete_all_child_windows (w->next); |
| 5744 | 5759 | ||
| 5745 | w->total_lines = w->buffer; /* See Fset_window_configuration for excuse. */ | 5760 | w->total_lines = w->buffer; /* See Fset_window_configuration for excuse. */ |
| 5746 | 5761 | ||
| 5747 | if (!NILP (w->vchild)) | 5762 | if (!NILP (w->vchild)) |
| 5748 | { | 5763 | { |
| 5749 | delete_all_subwindows (w->vchild); | 5764 | delete_all_child_windows (w->vchild); |
| 5750 | w->vchild = Qnil; | 5765 | w->vchild = Qnil; |
| 5751 | } | 5766 | } |
| 5752 | else if (!NILP (w->hchild)) | 5767 | else if (!NILP (w->hchild)) |
| 5753 | { | 5768 | { |
| 5754 | delete_all_subwindows (w->hchild); | 5769 | delete_all_child_windows (w->hchild); |
| 5755 | w->hchild = Qnil; | 5770 | w->hchild = Qnil; |
| 5756 | } | 5771 | } |
| 5757 | else if (!NILP (w->buffer)) | 5772 | else if (!NILP (w->buffer)) |
| @@ -6583,14 +6598,16 @@ function `window-nest' and altered by the function `set-window-nest'. */); | |||
| 6583 | defsubr (&Swindow_use_time); | 6598 | defsubr (&Swindow_use_time); |
| 6584 | defsubr (&Swindow_top_line); | 6599 | defsubr (&Swindow_top_line); |
| 6585 | defsubr (&Swindow_left_column); | 6600 | defsubr (&Swindow_left_column); |
| 6586 | defsubr (&Swindow_total_size); | 6601 | defsubr (&Swindow_total_height); |
| 6602 | defsubr (&Swindow_total_width); | ||
| 6587 | defsubr (&Swindow_normal_size); | 6603 | defsubr (&Swindow_normal_size); |
| 6588 | defsubr (&Swindow_new_total); | 6604 | defsubr (&Swindow_new_total); |
| 6589 | defsubr (&Swindow_new_normal); | 6605 | defsubr (&Swindow_new_normal); |
| 6590 | defsubr (&Sset_window_new_total); | 6606 | defsubr (&Sset_window_new_total); |
| 6591 | defsubr (&Sset_window_new_normal); | 6607 | defsubr (&Sset_window_new_normal); |
| 6592 | defsubr (&Swindow_resize_apply); | 6608 | defsubr (&Swindow_resize_apply); |
| 6593 | defsubr (&Swindow_body_size); | 6609 | defsubr (&Swindow_body_height); |
| 6610 | defsubr (&Swindow_body_width); | ||
| 6594 | defsubr (&Swindow_hscroll); | 6611 | defsubr (&Swindow_hscroll); |
| 6595 | defsubr (&Sset_window_hscroll); | 6612 | defsubr (&Sset_window_hscroll); |
| 6596 | defsubr (&Swindow_redisplay_end_trigger); | 6613 | defsubr (&Swindow_redisplay_end_trigger); |
diff --git a/src/window.h b/src/window.h index c6fa5e7a338..6a9641e3e6d 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -824,7 +824,7 @@ extern Lisp_Object window_from_coordinates (struct frame *, int, int, | |||
| 824 | enum window_part *, int); | 824 | enum window_part *, int); |
| 825 | EXFUN (Fwindow_dedicated_p, 1); | 825 | EXFUN (Fwindow_dedicated_p, 1); |
| 826 | extern void resize_frame_windows (struct frame *, int, int); | 826 | extern void resize_frame_windows (struct frame *, int, int); |
| 827 | extern void delete_all_subwindows (Lisp_Object); | 827 | extern void delete_all_child_windows (Lisp_Object); |
| 828 | extern void freeze_window_starts (struct frame *, int); | 828 | extern void freeze_window_starts (struct frame *, int); |
| 829 | extern void grow_mini_window (struct window *, int); | 829 | extern void grow_mini_window (struct window *, int); |
| 830 | extern void shrink_mini_window (struct window *); | 830 | extern void shrink_mini_window (struct window *); |
diff --git a/src/xdisp.c b/src/xdisp.c index 9bb2396c4a3..ae4db3906ba 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -954,7 +954,7 @@ static int coords_in_mouse_face_p (struct window *, int, int); | |||
| 954 | 954 | ||
| 955 | This is the height of W minus the height of a mode line, if any. */ | 955 | This is the height of W minus the height of a mode line, if any. */ |
| 956 | 956 | ||
| 957 | inline int | 957 | int |
| 958 | window_text_bottom_y (struct window *w) | 958 | window_text_bottom_y (struct window *w) |
| 959 | { | 959 | { |
| 960 | int height = WINDOW_TOTAL_HEIGHT (w); | 960 | int height = WINDOW_TOTAL_HEIGHT (w); |
| @@ -968,7 +968,7 @@ window_text_bottom_y (struct window *w) | |||
| 968 | means return the total width of W, not including fringes to | 968 | means return the total width of W, not including fringes to |
| 969 | the left and right of the window. */ | 969 | the left and right of the window. */ |
| 970 | 970 | ||
| 971 | inline int | 971 | int |
| 972 | window_box_width (struct window *w, int area) | 972 | window_box_width (struct window *w, int area) |
| 973 | { | 973 | { |
| 974 | int cols = XFASTINT (w->total_cols); | 974 | int cols = XFASTINT (w->total_cols); |
| @@ -1007,7 +1007,7 @@ window_box_width (struct window *w, int area) | |||
| 1007 | /* Return the pixel height of the display area of window W, not | 1007 | /* Return the pixel height of the display area of window W, not |
| 1008 | including mode lines of W, if any. */ | 1008 | including mode lines of W, if any. */ |
| 1009 | 1009 | ||
| 1010 | inline int | 1010 | int |
| 1011 | window_box_height (struct window *w) | 1011 | window_box_height (struct window *w) |
| 1012 | { | 1012 | { |
| 1013 | struct frame *f = XFRAME (w->frame); | 1013 | struct frame *f = XFRAME (w->frame); |
| @@ -1054,7 +1054,7 @@ window_box_height (struct window *w) | |||
| 1054 | area AREA of window W. AREA < 0 means return the left edge of the | 1054 | area AREA of window W. AREA < 0 means return the left edge of the |
| 1055 | whole window, to the right of the left fringe of W. */ | 1055 | whole window, to the right of the left fringe of W. */ |
| 1056 | 1056 | ||
| 1057 | inline int | 1057 | int |
| 1058 | window_box_left_offset (struct window *w, int area) | 1058 | window_box_left_offset (struct window *w, int area) |
| 1059 | { | 1059 | { |
| 1060 | int x; | 1060 | int x; |
| @@ -1086,7 +1086,7 @@ window_box_left_offset (struct window *w, int area) | |||
| 1086 | area AREA of window W. AREA < 0 means return the right edge of the | 1086 | area AREA of window W. AREA < 0 means return the right edge of the |
| 1087 | whole window, to the left of the right fringe of W. */ | 1087 | whole window, to the left of the right fringe of W. */ |
| 1088 | 1088 | ||
| 1089 | inline int | 1089 | int |
| 1090 | window_box_right_offset (struct window *w, int area) | 1090 | window_box_right_offset (struct window *w, int area) |
| 1091 | { | 1091 | { |
| 1092 | return window_box_left_offset (w, area) + window_box_width (w, area); | 1092 | return window_box_left_offset (w, area) + window_box_width (w, area); |
| @@ -1096,7 +1096,7 @@ window_box_right_offset (struct window *w, int area) | |||
| 1096 | area AREA of window W. AREA < 0 means return the left edge of the | 1096 | area AREA of window W. AREA < 0 means return the left edge of the |
| 1097 | whole window, to the right of the left fringe of W. */ | 1097 | whole window, to the right of the left fringe of W. */ |
| 1098 | 1098 | ||
| 1099 | inline int | 1099 | int |
| 1100 | window_box_left (struct window *w, int area) | 1100 | window_box_left (struct window *w, int area) |
| 1101 | { | 1101 | { |
| 1102 | struct frame *f = XFRAME (w->frame); | 1102 | struct frame *f = XFRAME (w->frame); |
| @@ -1116,7 +1116,7 @@ window_box_left (struct window *w, int area) | |||
| 1116 | area AREA of window W. AREA < 0 means return the right edge of the | 1116 | area AREA of window W. AREA < 0 means return the right edge of the |
| 1117 | whole window, to the left of the right fringe of W. */ | 1117 | whole window, to the left of the right fringe of W. */ |
| 1118 | 1118 | ||
| 1119 | inline int | 1119 | int |
| 1120 | window_box_right (struct window *w, int area) | 1120 | window_box_right (struct window *w, int area) |
| 1121 | { | 1121 | { |
| 1122 | return window_box_left (w, area) + window_box_width (w, area); | 1122 | return window_box_left (w, area) + window_box_width (w, area); |
| @@ -1129,7 +1129,7 @@ window_box_right (struct window *w, int area) | |||
| 1129 | coordinates of the upper-left corner of the box. Return in | 1129 | coordinates of the upper-left corner of the box. Return in |
| 1130 | *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */ | 1130 | *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */ |
| 1131 | 1131 | ||
| 1132 | inline void | 1132 | void |
| 1133 | window_box (struct window *w, int area, int *box_x, int *box_y, | 1133 | window_box (struct window *w, int area, int *box_x, int *box_y, |
| 1134 | int *box_width, int *box_height) | 1134 | int *box_width, int *box_height) |
| 1135 | { | 1135 | { |