comparison src/gutter.c @ 3025:facf3239ba30

[xemacs-hg @ 2005-10-25 11:16:19 by ben] rename new->new_, convert 'foo to `foo' EmacsFrame.c, ExternalClient.c, ExternalShell.c, chartab.c, cmdloop.c, compiler.h, console.c, database.c, device-msw.c, device-x.c, device.c, doc.c, dragdrop.c, eval.c, event-msw.c, event-stream.c, events.c, extents.c, file-coding.c, fns.c, frame-tty.c, frame.c, gpmevent.c, gutter.c, hash.c, imgproc.c, indent.c, keymap.c, lisp-union.h, macros.c, malloc.c, marker.c, menubar-x.c, menubar.c, mule-charset.c, number.c, process.c, profile.h, ralloc.c, redisplay.c, select-common.h, select.c, syntax.c, sysfile.h, sysproc.h, systime.h, syswindows.h, toolbar.c, tooltalk.c, tparam.c, unexaix.c, unexalpha.c, unexconvex.c, unexec.c, unexhp9k800.c, unexmips.c, unicode.c, window.c: new -> new_. 'foo -> `foo'. lwlib-internal.h: redo assert macros to follow lisp.h and not trigger warnings. lwlib.c, xlwtabs.c: new -> new_.
author ben
date Tue, 25 Oct 2005 11:16:49 +0000
parents 3d8143fc88e1
children 05dd0ed58262
comparison
equal deleted inserted replaced
3024:b7f26b2f78bd 3025:facf3239ba30
737 RETURN_NOT_REACHED (TOP_GUTTER); 737 RETURN_NOT_REACHED (TOP_GUTTER);
738 } 738 }
739 739
740 DEFUN ("set-default-gutter-position", Fset_default_gutter_position, 1, 1, 0, /* 740 DEFUN ("set-default-gutter-position", Fset_default_gutter_position, 1, 1, 0, /*
741 Set the position that the `default-gutter' will be displayed at. 741 Set the position that the `default-gutter' will be displayed at.
742 Valid positions are 'top, 'bottom, 'left and 'right. 742 Valid positions are `top', `bottom', `left' and `right'.
743 See `default-gutter-position'. 743 See `default-gutter-position'.
744 */ 744 */
745 (position)) 745 (position))
746 { 746 {
747 enum gutter_pos cur = decode_gutter_position (Vdefault_gutter_position); 747 enum gutter_pos cur = decode_gutter_position (Vdefault_gutter_position);
748 enum gutter_pos new = decode_gutter_position (position); 748 enum gutter_pos new_ = decode_gutter_position (position);
749 749
750 if (cur != new) 750 if (cur != new_)
751 { 751 {
752 /* The following calls will automatically cause the dirty 752 /* The following calls will automatically cause the dirty
753 flags to be set; we delay frame size changes to avoid 753 flags to be set; we delay frame size changes to avoid
754 lots of frame flickering. */ 754 lots of frame flickering. */
755 /* #### I think this should be GC protected. -sb */ 755 /* #### I think this should be GC protected. -sb */
756 int depth = begin_hold_frame_size_changes (); 756 int depth = begin_hold_frame_size_changes ();
757 757
758 set_specifier_fallback (Vgutter[cur], list1 (Fcons (Qnil, Qnil))); 758 set_specifier_fallback (Vgutter[cur], list1 (Fcons (Qnil, Qnil)));
759 set_specifier_fallback (Vgutter[new], Vdefault_gutter); 759 set_specifier_fallback (Vgutter[new_], Vdefault_gutter);
760 set_specifier_fallback (Vgutter_size[cur], list1 (Fcons (Qnil, Qzero))); 760 set_specifier_fallback (Vgutter_size[cur], list1 (Fcons (Qnil, Qzero)));
761 set_specifier_fallback (Vgutter_size[new], 761 set_specifier_fallback (Vgutter_size[new_],
762 new == TOP_GUTTER || new == BOTTOM_GUTTER 762 new_ == TOP_GUTTER || new_ == BOTTOM_GUTTER
763 ? Vdefault_gutter_height 763 ? Vdefault_gutter_height
764 : Vdefault_gutter_width); 764 : Vdefault_gutter_width);
765 set_specifier_fallback (Vgutter_border_width[cur], 765 set_specifier_fallback (Vgutter_border_width[cur],
766 list1 (Fcons (Qnil, Qzero))); 766 list1 (Fcons (Qnil, Qzero)));
767 set_specifier_fallback (Vgutter_border_width[new], 767 set_specifier_fallback (Vgutter_border_width[new_],
768 Vdefault_gutter_border_width); 768 Vdefault_gutter_border_width);
769 set_specifier_fallback (Vgutter_visible_p[cur], list1 (Fcons (Qnil, Qt))); 769 set_specifier_fallback (Vgutter_visible_p[cur], list1 (Fcons (Qnil, Qt)));
770 set_specifier_fallback (Vgutter_visible_p[new], Vdefault_gutter_visible_p); 770 set_specifier_fallback (Vgutter_visible_p[new_], Vdefault_gutter_visible_p);
771 Vdefault_gutter_position = position; 771 Vdefault_gutter_position = position;
772 772
773 unbind_to (depth); 773 unbind_to (depth);
774 } 774 }
775 775
1033 { 1033 {
1034 if (NILP (instantiator)) 1034 if (NILP (instantiator))
1035 return; 1035 return;
1036 1036
1037 if (!INTP (instantiator) && !EQ (instantiator, Qautodetect)) 1037 if (!INTP (instantiator) && !EQ (instantiator, Qautodetect))
1038 invalid_argument ("Gutter size must be an integer or 'autodetect", instantiator); 1038 invalid_argument ("Gutter size must be an integer or `autodetect'", instantiator);
1039 } 1039 }
1040 1040
1041 DEFUN ("gutter-size-specifier-p", Fgutter_size_specifier_p, 1, 1, 0, /* 1041 DEFUN ("gutter-size-specifier-p", Fgutter_size_specifier_p, 1, 1, 0, /*
1042 Return non-nil if OBJECT is a gutter-size specifier. 1042 Return non-nil if OBJECT is a gutter-size specifier.
1043 1043
1233 Specifier for a fallback gutter. 1233 Specifier for a fallback gutter.
1234 Use `set-specifier' to change this. 1234 Use `set-specifier' to change this.
1235 1235
1236 The position of this gutter is specified in the function 1236 The position of this gutter is specified in the function
1237 `default-gutter-position'. If the corresponding position-specific 1237 `default-gutter-position'. If the corresponding position-specific
1238 gutter (e.g. `top-gutter' if `default-gutter-position' is 'top) 1238 gutter (e.g. `top-gutter' if `default-gutter-position' is `top')
1239 does not specify a gutter in a particular domain (usually a window), 1239 does not specify a gutter in a particular domain (usually a window),
1240 then the value of `default-gutter' in that domain, if any, will be 1240 then the value of `default-gutter' in that domain, if any, will be
1241 used instead. 1241 used instead.
1242 1242
1243 Note that the gutter at any particular position will not be 1243 Note that the gutter at any particular position will not be
1354 This is a specifier; use `set-specifier' to change it. 1354 This is a specifier; use `set-specifier' to change it.
1355 1355
1356 The position of the default gutter is specified by the function 1356 The position of the default gutter is specified by the function
1357 `set-default-gutter-position'. If the corresponding position-specific 1357 `set-default-gutter-position'. If the corresponding position-specific
1358 gutter thickness specifier (e.g. `top-gutter-height' if 1358 gutter thickness specifier (e.g. `top-gutter-height' if
1359 `default-gutter-position' is 'top) does not specify a thickness in a 1359 `default-gutter-position' is `top') does not specify a thickness in a
1360 particular domain (a window or a frame), then the value of 1360 particular domain (a window or a frame), then the value of
1361 `default-gutter-height' or `default-gutter-width' (depending on the 1361 `default-gutter-height' or `default-gutter-width' (depending on the
1362 gutter orientation) in that domain, if any, will be used instead. 1362 gutter orientation) in that domain, if any, will be used instead.
1363 1363
1364 Note that `default-gutter-height' is only used when 1364 Note that `default-gutter-height' is only used when
1365 `default-gutter-position' is 'top or 'bottom, and `default-gutter-width' 1365 `default-gutter-position' is `top' or `bottom', and `default-gutter-width'
1366 is only used when `default-gutter-position' is 'left or 'right. 1366 is only used when `default-gutter-position' is `left' or `right'.
1367 1367
1368 Note that all of the position-specific gutter thickness specifiers 1368 Note that all of the position-specific gutter thickness specifiers
1369 have a fallback value of zero when they do not correspond to the 1369 have a fallback value of zero when they do not correspond to the
1370 default gutter. Therefore, you will have to set a non-zero thickness 1370 default gutter. Therefore, you will have to set a non-zero thickness
1371 value if you want a position-specific gutter to be displayed. 1371 value if you want a position-specific gutter to be displayed.
1372 1372
1373 If you set the height to 'autodetect the size of the gutter will be 1373 If you set the height to `autodetect' the size of the gutter will be
1374 calculated to be large enough to hold the contents of the gutter. This 1374 calculated to be large enough to hold the contents of the gutter. This
1375 is the default. 1375 is the default.
1376 */ ); 1376 */ );
1377 Vdefault_gutter_height = Fmake_specifier (Qgutter_size); 1377 Vdefault_gutter_height = Fmake_specifier (Qgutter_size);
1378 set_specifier_caching (Vdefault_gutter_height, 1378 set_specifier_caching (Vdefault_gutter_height,
1486 This is a specifier; use `set-specifier' to change it. 1486 This is a specifier; use `set-specifier' to change it.
1487 1487
1488 The position of the default gutter is specified by the function 1488 The position of the default gutter is specified by the function
1489 `set-default-gutter-position'. If the corresponding position-specific 1489 `set-default-gutter-position'. If the corresponding position-specific
1490 gutter border width specifier (e.g. `top-gutter-border-width' if 1490 gutter border width specifier (e.g. `top-gutter-border-width' if
1491 `default-gutter-position' is 'top) does not specify a border width in a 1491 `default-gutter-position' is `top') does not specify a border width in a
1492 particular domain (a window or a frame), then the value of 1492 particular domain (a window or a frame), then the value of
1493 `default-gutter-border-width' in that domain, if any, will be used 1493 `default-gutter-border-width' in that domain, if any, will be used
1494 instead. 1494 instead.
1495 1495
1496 */ ); 1496 */ );
1577 This is a specifier; use `set-specifier' to change it. 1577 This is a specifier; use `set-specifier' to change it.
1578 1578
1579 The position of the default gutter is specified by the function 1579 The position of the default gutter is specified by the function
1580 `set-default-gutter-position'. If the corresponding position-specific 1580 `set-default-gutter-position'. If the corresponding position-specific
1581 gutter visibility specifier (e.g. `top-gutter-visible-p' if 1581 gutter visibility specifier (e.g. `top-gutter-visible-p' if
1582 `default-gutter-position' is 'top) does not specify a visible-p value 1582 `default-gutter-position' is `top') does not specify a visible-p value
1583 in a particular domain (a window or a frame), then the value of 1583 in a particular domain (a window or a frame), then the value of
1584 `default-gutter-visible-p' in that domain, if any, will be used 1584 `default-gutter-visible-p' in that domain, if any, will be used
1585 instead. 1585 instead.
1586 1586
1587 `default-gutter-visible-p' and all of the position-specific gutter 1587 `default-gutter-visible-p' and all of the position-specific gutter