1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

1849 Commits

Author SHA1 Message Date
Roland McGrath
7b1437089b (mail-abbrev-end-of-buffer): Changed interactive spec from "P" to "p". 1993-01-31 20:48:19 +00:00
Richard M. Stallman
c584550897 (c-macro-expand): Use expanded name to write or delete.
Send two eofs.
1993-01-30 03:43:24 +00:00
Richard M. Stallman
df3bb2ab7c (force_fit_type): Abort if T not INTEGER_CST. 1993-01-30 02:16:57 +00:00
Jim Blandy
b8baad4034 * window.c (Fscroll_left, Fscroll_right): Don't forget to apply
XWINDOW to selected_window before passing it to window_internal_width.
1993-01-30 01:21:00 +00:00
Jim Blandy
c4e5d591e0 * xmenu.c (Fx_popup_menu): Don't forget to turn the frame-relative
coordinates for the menu position into root-window-relative
	coordinates.
1993-01-29 22:13:36 +00:00
Jim Blandy
5e43ddf5ff * lread.c (read1): Although digits followed by a '.' are an
integer, a single . by itself (like, say, \.) should be a symbol.
1993-01-29 21:32:37 +00:00
Roland McGrath
b5e6f936b9 (next-complete-history-element): Restore point after replacing the
buffer text with the appropriate history element.
1993-01-28 20:22:03 +00:00
Richard M. Stallman
3def68cde8 (sendmail-program): Try /usr/ucblib/sendmail. 1993-01-28 06:17:47 +00:00
Richard M. Stallman
658eed663c Don't use the completion-oriented history commands. 1993-01-28 06:16:04 +00:00
Jim Blandy
753be5cc50 * make-dist: Don't distributed the RCS files in the etc directory. 1993-01-26 04:28:27 +00:00
Jim Blandy
31ef7f7a89 * fns.c (internal_equal): Protect the clause for comparing numbers
of different tpes with a "#ifdef LISP_FLOAT_TYPE".
1993-01-26 03:05:54 +00:00
Jim Blandy
dbc4e1c129 JimB's changes since January 18th 1993-01-26 01:58:16 +00:00
Jim Blandy
7276614481 JimB's changes from January 18 to present 1993-01-26 01:56:29 +00:00
Jim Blandy
ed015bddf7 * disass.el (disassemble): Add autoload cookie for this.
* bytecomp.el (byte-decompile-bytecode): Add an autoload for this.

	compiled-function-p has been renamed to byte-code-function-p.
	* subr.el: Define compiled-function-p as an alias for it.
	* bytecomp.el: Register compiled-function-p as obsolete.
	* bytecomp.el, byte-opt.el, disass.el, help.el, map-ynp.el: Change
	uses.

	unread-command-event has been replaced by unread-command-events.
	* simple.el (prefix-arg-internal): Use this to push back all
	key sequences for processing by the main command loop, instead of
	trying to simulate its behavior ourselves.
	* bytecomp.el: Document unread-command-event as an obsolete
	variable, although nothing but the GNU Emacs 19 sources use it.
	Adjust obsolescence message for unread-command-char.
	* comint.el (comint-dynamic-list-completions): Change uses of
	unread-command-event to work with unread-command-events.
	* ebuff-menu.el (electric-buffer-list, Electric-buffer-menu-exit):
	Same.
	* edebug.el (edebug-outside-excursion): Same.
	* ehelp.el (electric-help-command-loop): Same.
	* electric.el (Electric-command-loop): Same.
	* emerge.el (emerge-show-file-name): Same.
	* fortran.el (fortran-abbrev-start,
	fortran-window-create-momentarily): Same.
	* gnus.el (gnus-Subject-next-article): Same.
	* info.el (Info-summary): Same.
	* isearch-mode.el (isearch-update, isearch-unread): Same.
	* map-ynp.el (map-y-or-n-p): Same.
	* mlsupport.el (push-back-character): Same.
	* replace.el (perform-replace): Same.
	* simula.el (simula-electric-label): Same.
	* subr.el (read-quoted-char, momentary-string-display): Same.
	* sun-mouse.el (mouse-second-hit): Same.
	* terminal.el (te-escape-extended-command-unread): Same.
	* vip.el (vip-escape-to-emacs, vip-prefix-arg-value,
	vip-prefix-arg-com): Same.
1993-01-26 01:36:02 +00:00
Jim Blandy
96d699f33e compiled-function-p has been renamed to byte-code-function-p.
* subr.el: Define compiled-function-p as an alias for it.
	* bytecomp.el: Register compiled-function-p as obsolete.
	* bytecomp.el, byte-opt.el, disass.el, help.el, map-ynp.el: Change
	uses.
1993-01-26 01:29:51 +00:00
Jim Blandy
d81fd0bf01 x-selection-value has been renamed to x-selection.
x-own-selection has been renamed to x-set-selection, and the order
	of its arguments has been reversed, for consistency with other
	lisp functions like put and aset.
	* term/x-win.el (x-select-text): Adjusted.
	(x-cut-buffer-or-selection-value): Check the primary selection,
	using x-selection, instead of checking the cut buffer again.

	* term/x-win.el: Doc fix.
1993-01-26 01:26:58 +00:00
Roland McGrath
312f637b70 (tags-query-replace): C-t 1993-01-25 23:30:39 +00:00
Richard M. Stallman
55f0149e49 [TERMINFO]: Don't define LIBS_TERMCAP. 1993-01-25 20:12:52 +00:00
Richard M. Stallman
baacd4229e [__GNUC__] (LD_SWITCH_SYSTEM): Remove -a.
[__GNUC__] (ORDINARY_LINK): Defined.
1993-01-25 20:11:29 +00:00
Roland McGrath
63ed0aa079 (add-change-log-entry): Restrict PARAGRAPH-END to being on the first
page.
1993-01-25 17:05:57 +00:00
Roland McGrath
c7e6987699 (next-complete-history-element): Use only buffer contents before point
to match history elements.
1993-01-25 16:59:48 +00:00
Roland McGrath
d0678801de ({next,previous}-complete-history-element): New functions.
Bind them to M-n/M-p and next/prior in minibuffer completion maps.
1993-01-25 00:45:01 +00:00
Jim Blandy
c0ff3fabb8 * xterm.c (x_scrollbar_create): Set the scrollbars to use
EastGravity.

	* frame.c (Fdelete_frame): Clear the frame's display after calling
	the window-system-dependent frame destruction routine.  We
	no longer need to pass the display as a separate argument to
	x_destroy_window.
	* xterm.c (x_destroy_window): Put the code which clears out f's
	display here, right after we free the storage it points to.  Put
	everything, including the code which clears x_focus_frame and
	x_highlight_frame, inside the BLOCK/UNBLOCK_INPUT pair.
1993-01-22 02:47:12 +00:00
Jim Blandy
8678b9ccf5 * frame.c (Fdelete_frame): Clear the frame's display after calling
the window-system-dependent frame destruction routine.  We
	no longer need to pass the display as a separate argument to
	x_destroy_window.
	* xterm.c (x_destroy_window): Put the code which clears out f's
	display here, right after we free the storage it points to.  Put
	everything, including the code which clears x_focus_frame and
	x_highlight_frame, inside the BLOCK/UNBLOCK_INPUT pair.

	* frame.c (Fdelete_frame): Clear the frame's display after calling
	the window-system-dependent frame destruction routine.  We
	no longer need to pass the display as a separate argument to
	x_destroy_window.
	* xterm.c (x_destroy_window): Put the code which clears out f's
	display here, right after we free the storage it points to.  Put
	everything, including the code which clears x_focus_frame and
	x_highlight_frame, inside the BLOCK/UNBLOCK_INPUT pair.
1993-01-22 02:45:16 +00:00
Roland McGrath
0f6b9c324b (tags-loop-scan): Set default value to an error form. 1993-01-21 22:43:16 +00:00
Roland McGrath
2ae6a918b9 (visit-tags-table-buffer): When propagating a change of name after
file-find-noselect, refer to tags-file-name, not the undefined var FILE.
1993-01-21 22:36:48 +00:00
Roland McGrath
bf349f3687 (visit-tags-table-buffer): Error if called with 'same and no current table. 1993-01-19 21:05:15 +00:00
Roland McGrath
46d3268aa2 (Fdisplay_buffer): Doc fix. 1993-01-19 00:56:45 +00:00
Jim Blandy
3a65941e41 * c-mode.el (c-switch-label-regexp): New constant.
(electric-c-terminator, c-indent-line, indent-c-exp): Use it to
	correctly recognize default labels in switch statements.
1993-01-16 06:04:16 +00:00
Jim Blandy
cf7cb199e5 * xterm.c (x_window_to_scrollbar): Search frames'
condemned_scrollbars list as well; input might arrive during
	redisplay.
	(x_scrollbar_report_motion): Don't forget to BLOCK_INPUT.
	(XTjudge_scrollbars): Clear the condemned scrollbar list before
	traversing it, so we don't try to process an event on a scrollbar
	we've killed.
1993-01-16 05:58:15 +00:00
Richard M. Stallman
22d7cb8974 (Frecent_keys): Doc fix. 1993-01-15 21:57:50 +00:00
Richard M. Stallman
62c9fad7e2 (shell): Doc fix. 1993-01-15 07:02:35 +00:00
Paul Eggert
0b67eabf74 Add copyright and authorship notices. 1993-01-15 05:33:29 +00:00
Roland McGrath
2be5e5dbe6 (switch-to-buffer-other-frame): Pass t to pop-to-buffer. 1993-01-14 21:28:18 +00:00
Richard M. Stallman
b0c33a9470 (Fwindow_at): Doc fix. 1993-01-14 21:20:01 +00:00
David J. MacKenzie
65565c6881 *** empty log message *** 1993-01-14 20:38:21 +00:00
Richard M. Stallman
1e8e116226 (find_entries): If filename ends in .f or .for, don't try anything but Fortran. 1993-01-14 20:09:22 +00:00
Jim Blandy
bf03a38a2a The shell comment char is #, not ;. 1993-01-14 17:45:39 +00:00
Jim Blandy
23d030749e Remove info from the distribution. It looks very out of date now. 1993-01-14 17:37:06 +00:00
Jim Blandy
9a572e2a2a * xterm.c (x_scrollbar_create): Include PointerMotionHintMask in
the event mask for scrollbars.
1993-01-14 17:31:56 +00:00
Jim Blandy
fda4e8f6d1 * make-dist: Include `./lisp/calc-2.02' in the distribution.
Add `./cpp', `./info', and `./man' back into the distribution.
1993-01-14 17:30:26 +00:00
Jim Blandy
9d0d777ceb * dispnew.c (Fredraw_display): DEFUN was missing a closing paren. 1993-01-14 16:15:54 +00:00
Jim Blandy
96858c4206 * make-dist: Remember that the authoritative COPYING notice is
`etc/COPYING', not `../etc/COPYING'.
1993-01-14 15:37:33 +00:00
Jim Blandy
b236749086 * .gdbinit: Add "-geometry +0+0" to default args.
(xscrollbar): New command.
1993-01-14 15:36:25 +00:00
Jim Blandy
4e0277936a Make scrollbar structures into lisp objects, so that they can be
GC'd; this allows windows and scrollbars can refer to each other
	without worrying about dangling pointers.
	* xterm.h (struct x_display): vertical_scrollbars and
	judge_timestamp members deleted.
	(struct scrollbar): Redesigned to be a template for a Lisp_Vector.
	(SCROLLBAR_VEC_SIZE, XSCROLLBAR, SCROLLBAR_PACK, SCROLLBAR_UNPACK,
	SCROLLBAR_X_WINDOW, SET_SCROLLBAR_X_WINDOW,
	VERTICAL_SCROLLBAR_INSIDE_WIDTH, VERTICAL_SCROLLBAR_TOP_RANGE,
	VERTICAL_SCROLLBAR_INSIDE_HEIGHT, VERTICAL_SCROLLBAR_MIN_HANDLE):
	New macros, to help deal with the lispy structures, and deal with
	the graphics.
	* frame.h (WINDOW_VERTICAL_SCROLLBAR): Macro deleted.
	(struct frame): New fields `scrollbars' and
	`condemned_scrollbars', for use by the scrollbar implementation.
	[MULTI_FRAME and not MULTI_FRAME] (FRAME_SCROLLBARS,
	FRAME_CONDEMNED_SCROLLBARS): Accessors for the new field.
	* window.h (struct window): Doc fix for vertical_scrollbar field.
	* frame.c (make_frame): Initialize the `scrollbars' and
	`condemned_scrollbars' fields of the new frame.
	* alloc.c (mark_object): Mark the `scrollbars' and
	`condemned_scrollbars' slots of frames.
	* xterm.c (x_window_to_scrollbar): Scrollbars are chained on
	frames' scrollbar field, not their x.display->vertical_scrollbars
	field.
	(x_scrollbar_create, x_scrollbar_set_handle, x_scrollbar_move,
	x_scrollbar_remove, XTset_vertical_scrollbar,
	XTcondemn_scrollbars, XTredeem_scrollbar, XTjudge_scrollbars,
	x_scrollbar_expose, x_scrollbar_handle_click,
	x_scrollbar_handle_motion): Substantially rewritten to correct
	typos and brainos, and to accomodate the lispy structures.

	* xterm.h (CHAR_TO_PIXEL_WIDTH, CHAR_TO_PIXEL_HEIGHT,
	PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Rewritten, using:
	(CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, PIXEL_TO_CHAR_ROW,
	PIXEL_TO_CHAR_COL): New macros.
	* xfns.c [not HAVE_X11] (Fx_create_frame): Use the
	PIXEL_TO_CHAR_{HEIGHT,WIDTH} macros to figure the frame's
	character size, and the CHAR_TO_PIXEL* macros for vice versa.
	* xterm.c (XTwrite_glyphs, XTclear_end_of_line, stufflines,
	scraplines, dumprectangle, pixel_to_glyph_coords, x_draw_box,
	clear_cursor, x_display_bar_cursor, x_draw_single_glyph,
	x_set_mouse_position): Use the CHAR_TO_PIXEL_* macros.
1993-01-14 15:34:59 +00:00
Jim Blandy
12ba150f2f Make scrollbar structures into lisp objects, so that they can be
GC'd; this allows windows and scrollbars can refer to each other
	without worrying about dangling pointers.
	* xterm.h (struct x_display): vertical_scrollbars and
	judge_timestamp members deleted.
	(struct scrollbar): Redesigned to be a template for a Lisp_Vector.
	(SCROLLBAR_VEC_SIZE, XSCROLLBAR, SCROLLBAR_PACK, SCROLLBAR_UNPACK,
	SCROLLBAR_X_WINDOW, SET_SCROLLBAR_X_WINDOW,
	VERTICAL_SCROLLBAR_INSIDE_WIDTH, VERTICAL_SCROLLBAR_TOP_RANGE,
	VERTICAL_SCROLLBAR_INSIDE_HEIGHT, VERTICAL_SCROLLBAR_MIN_HANDLE):
	New macros, to help deal with the lispy structures, and deal with
	the graphics.
	* frame.h (WINDOW_VERTICAL_SCROLLBAR): Macro deleted.
	(struct frame): New fields `scrollbars' and
	`condemned_scrollbars', for use by the scrollbar implementation.
	[MULTI_FRAME and not MULTI_FRAME] (FRAME_SCROLLBARS,
	FRAME_CONDEMNED_SCROLLBARS): Accessors for the new field.
	* window.h (struct window): Doc fix for vertical_scrollbar field.
	* frame.c (make_frame): Initialize the `scrollbars' and
	`condemned_scrollbars' fields of the new frame.
	* alloc.c (mark_object): Mark the `scrollbars' and
	`condemned_scrollbars' slots of frames.
	* xterm.c (x_window_to_scrollbar): Scrollbars are chained on
	frames' scrollbar field, not their x.display->vertical_scrollbars
	field.
	(x_scrollbar_create, x_scrollbar_set_handle, x_scrollbar_move,
	x_scrollbar_remove, XTset_vertical_scrollbar,
	XTcondemn_scrollbars, XTredeem_scrollbar, XTjudge_scrollbars,
	x_scrollbar_expose, x_scrollbar_handle_click,
	x_scrollbar_handle_motion): Substantially rewritten to correct
	typos and brainos, and to accomodate the lispy structures.

	* xterm.c (x_scrollbar_background_expose): Function deleted; we
	don't want anything in the background there after all.
	(XTread_socket): Don't call x_scrollbar_background_expose.  We
	don't care.

	* xterm.h (CHAR_TO_PIXEL_WIDTH, CHAR_TO_PIXEL_HEIGHT,
	PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Rewritten, using:
	(CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, PIXEL_TO_CHAR_ROW,
	PIXEL_TO_CHAR_COL): New macros.
	* xfns.c [not HAVE_X11] (Fx_create_frame): Use the
	PIXEL_TO_CHAR_{HEIGHT,WIDTH} macros to figure the frame's
	character size, and the CHAR_TO_PIXEL* macros for vice versa.
	* xterm.c (XTwrite_glyphs, XTclear_end_of_line, stufflines,
	scraplines, dumprectangle, pixel_to_glyph_coords, x_draw_box,
	clear_cursor, x_display_bar_cursor, x_draw_single_glyph,
	x_set_mouse_position): Use the CHAR_TO_PIXEL_* macros.

	* xterm.c (x_wm_set_size_hint): The max_width and max_height
	members of the size_hints are expressed in pixels, not columns.

	* xterm.c (x_set_window_size): Remove ibw var; it's not used.
	Set FRAME_WIDTH (f) to cols instead of rows.  Duh.

	* xterm.c (pixel_to_glyph_coords): Properly set *bounds to the
	character cell bounding the position, even when the position is
	off the frame.

	* termhooks.h (mouse_position_hook): Doc fix.
	(set_vertical_scrollbar_hook): This doesn't return anything any
	more, and doesn't take a struct scrollbar * argument any more.
	(condemn_scrollbars_hook, redeem_scrollbar_hook,
	judge_scrollbars_hook): Doc fixes.
	* term.c (mouse_position_hook): Doc fix.
	(set_vertical_scrollbar_hook): This doesn't return
	anything any more.  Doc fixes.
	* keyboard.c (kbd_buffer_get_event): Receive the scrollbar's
	window from *mouse_position_hook and pass it to
	make_lispy_movement, instead of working with a pointer to a struct
	scrollbar.
	(make_lispy_event): We don't need a window_from_scrollbar function
	anymore; we are given the window directly in *EVENT.
	Unify the code which generates
	text-area mouse clicks and scrollbar clicks; use the same code to
	distinguish clicks from drags on the scrollbar as in the text area.
	Distinguish clicks from drags by storing a copy of the lispy
	position list returned as part of the event.
	(button_down_location): Make this a lisp vector, rather than an
	array of random structures.
	(struct mouse_position): Remove this; it's been replaced by a lisp
	list.
	(make_lispy_movement): Accept the scrollbar's window as a
	parameter, rather than the scrollbar itself.
	If FRAME is zero, assume that the other arguments are garbage.
	(syms_of_keyboard): No need to staticpro each window of
	button_down_location now; just initialize and staticpro it.
	* window.c (window_from_scrollbar): Function deleted; no longer
	needed.
	* xdisp.c (redisplay_window): Just pass the window to
	set_vertical_scrollbar hook; don't pass the scrollbar object too.
	* xterm.c (XTmouse_position): Don't return a pointer to the
	scrollbar for scrollbar motion; instead, return the scrollbar's
	window.

	* xterm.c (XTmouse_position): Entirely rewritten, using
	XTranslateCoordinates.  Call x_scrollbar_report_motion to handle
	scrollbar movement events.
	(x_scrollbar_report_motion): New function, to help out
	XTmouse_position.

	* termhooks.h (struct input_event): Replace the frame member with
	a Lisp_Object member by the name of frame_or_window.  Doc fixes.
	Remove the scrollbar member; instead, use frame_or_window to hold the
	window whose scrollbar was clicked.
	* keyboard.c (kbd_buffer_store_event, kbd_buffer_get_event,
	make_lispy_event): Adjust references to frame member of struct
	input_event to use frame_or_window now.
	* xterm.c (construct_mouse_click, XTread_socket): Same.

	* xterm.c (last_mouse_bar, last_mouse_bar_frame, last_mouse_part,
	last_mouse_scroll_range_start, last_mouse_scroll_range_end):
	Replaced with...
	(last_mouse_scrollbar): New variable.
	(note_mouse_movement): Clear last_mouse_scrollbar when we have
	receieved a new motion.
	(syms_of_xterm): Staticpro last_mouse_scrollbar.

	* xterm.c (note_mouse_position): Renamed to note_mouse_movement,
	because that's what it really does.
	(x_scrollbar_handle_motion): Renamed to x_scrollbar_note_movement,
	for consistency.
	(XTread_socket): Adjusted.

	* xterm.c (XTset_scrollbar): Renamed to XTset_vertical_scrollbar.
	(x_term_init): Adjusted.

	* emacs.c (shut_down_emacs): New function.
	(fatal_error_signal, Fkill_emacs): Call it, instead of writing it out.
	* xterm.c (x_connection_closed): Call shut_down_emacs instead of
	Fkill_emacs; the latter will try to perform operations on the X
	server and die a horrible death.
	* lisp.h (shut_down_emacs): Add extern declaration for it.

	* xterm.c (x_error_quitter): Move the abort call to after we print
	the error message.  No harm in that.
1993-01-14 15:34:14 +00:00
Jim Blandy
cf177271a6 * xfns.c (Fx_create_frame): After mapping the frame, call
SET_FRAME_GARBAGED, not just plain FRAME_GARBAGED.

	* xfns.c (Qvertical_scrollbars): New symbol.  Use it as the name
	of the parameter which decides whether or not the frame has
	scrollbars, instead of Qvertical_scrollbar.
	(Fx_create_frame): Adjusted accordingly.
	(syms_of_xfns): Initialize and staticpro Qvertical_scrollbars.
	(x_set_vertical_scrollbar): Renamed to x_set_vertical_scrollbars.
	(x_frame_parms): Adjusted accordingly.

	* xterm.h (CHAR_TO_PIXEL_WIDTH, CHAR_TO_PIXEL_HEIGHT,
	PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Rewritten, using:
	(CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, PIXEL_TO_CHAR_ROW,
	PIXEL_TO_CHAR_COL): New macros.
	* xfns.c [not HAVE_X11] (Fx_create_frame): Use the
	PIXEL_TO_CHAR_{HEIGHT,WIDTH} macros to figure the frame's
	character size, and the CHAR_TO_PIXEL* macros for vice versa.
	* xterm.c (XTwrite_glyphs, XTclear_end_of_line, stufflines,
	scraplines, dumprectangle, pixel_to_glyph_coords, x_draw_box,
	clear_cursor, x_display_bar_cursor, x_draw_single_glyph,
	x_set_mouse_position): Use the CHAR_TO_PIXEL_* macros.

	* xfns.c (x_set_name): To request that the modelines be redrawn,
	execute the statement "update_mode_lines = 1;" instead of the
	silly statement "update_mode_lines;".

	* xfns.c (x_set_vertical_scrollbars): Don't try to set the
	X window's size if the frame's X window hasn't been created yet.

	* xfns.c (x_figure_window_size): Set the frame's
	vertical_scrollbar_extra field before trying to calculate its
	pixel dimensions.

	* xfns.c (x_window): When calling x_implicitly_set_name for the
	sake of drawing the name for the first time, remember to clear and
	set the frame's explicit_name member as well as its name member.
	(Fx_create_frame): Set the frame's explicit_name member if the
	user specified the name explicitly.

	* xfns.c (Fx_get_resource): Add CLASS argument, to give class of
	ATTRIBUTE.
	[not HAVE_X11]: Change definition of Fx_get_resource macro
	accordingly.
	(x_get_arg): Add CLASS argument, to give the class of ATTRIBUTE.
	Pass it along to Fx_get_resource.
	(x_figure_window_size, x_icon): Pass new argument to x_get_arg.
	(x_default_parameter): Add XCLASS argument, to give the class of
	XPROP.  Pass it along to x_get_arg.
	(Fx_create_frame): Pass new args to x_get_arg and
	x_default_parameter.

	* xfns.c (Fx_create_frame): Use the same resource names and
	classes as xterm and Emacs 18.
1993-01-14 15:19:55 +00:00
Jim Blandy
b1d1124bde * window.c (window_internal_width): New function, which accounts
for scrollbars if present.
	* lisp.h (window_internal_height, window_internal_width): Add
	extern declarations for these.
	* dispnew.c (direct_output_for_insert, direct_output_forward_char,
	buffer_posn_from_coords): Use window_internal_width instead of
	writing out its definition.
	* indent.c (compute_motion): Doc fix; mention scrollbars and
	window_internal_width.
	(pos_tab_offset, Fvertical_motion): Use window_internal_width
	instead of writing it out.
	* window.c (Fpos_visible_in_window_p, Fwindow_width, Fscroll_left,
	Fscroll_right): Same.
	* xdisp.c (redisplay, try_window, try_window_id,
	display_text_line): Same.

	* xdisp.c (display_string): Add new variable `f', to be W's
	frame.  Use it to set desired_glyphs, and to get the frame's width
	to decide whether or not to draw vertical bars.

	* xdisp.c (display_text_line): If we're using vertical scrollbars,
	don't draw the vertical bars separating side-by-side windows.
	(display_string): Same thing.  Draw spaces to fill in the part of
	the mode line that is under the scrollbar in partial-width
	windows.

	* xdisp.c (display_text_line): Use the usable internal width of
	the window, as calculated above, as the limit on the length of the
	overlay arrow's image, rather than using the window's width field,
	less one.

	* xdisp.c (redisplay): Call condemn_scrollbars_hook and
	judge_scrollbars_hook whenever they are set, not just when the
	frame has vertical scrollbars.

	* termhooks.h (mouse_position_hook): Doc fix.
	(set_vertical_scrollbar_hook): This doesn't return anything any
	more, and doesn't take a struct scrollbar * argument any more.
	(condemn_scrollbars_hook, redeem_scrollbar_hook,
	judge_scrollbars_hook): Doc fixes.
	* term.c (mouse_position_hook): Doc fix.
	(set_vertical_scrollbar_hook): This doesn't return
	anything any more.  Doc fixes.
	* keyboard.c (kbd_buffer_get_event): Receive the scrollbar's
	window from *mouse_position_hook and pass it to
	make_lispy_movement, instead of working with a pointer to a struct
	scrollbar.
	(make_lispy_event): We don't need a window_from_scrollbar function
	anymore; we are given the window directly in *EVENT.
	Unify the code which generates
	text-area mouse clicks and scrollbar clicks; use the same code to
	distinguish clicks from drags on the scrollbar as in the text area.
	Distinguish clicks from drags by storing a copy of the lispy
	position list returned as part of the event.
	(button_down_location): Make this a lisp vector, rather than an
	array of random structures.
	(struct mouse_position): Remove this; it's been replaced by a lisp
	list.
	(make_lispy_movement): Accept the scrollbar's window as a
	parameter, rather than the scrollbar itself.
	If FRAME is zero, assume that the other arguments are garbage.
	(syms_of_keyboard): No need to staticpro each window of
	button_down_location now; just initialize and staticpro it.
	* window.c (window_from_scrollbar): Function deleted; no longer
	needed.
	* xdisp.c (redisplay_window): Just pass the window to
	set_vertical_scrollbar hook; don't pass the scrollbar object too.
	* xterm.c (XTmouse_position): Don't return a pointer to the
	scrollbar for scrollbar motion; instead, return the scrollbar's
	window.

	* xdisp.c (echo_area_display): Move the assignment of f and the
	check for visibility out of the "#ifdef MULTI_FRAME" clause; they
	should work under any circumstances.

	* xdisp.c (redisplay_window): If we're not going to redisplay this
	window because it's a minibuffer whose contents have already been
	updated, go ahead and jump to the scrollbar refreshing code
	anyway; they still need to be updated.  Initialize opoint, so it's
	known to be valid when we jump.  Calculate the scrollbar settings
	properly for minibuffers, no matter what they are displaying at
	the time.

	* xdisp.c (redisplay_windows): Don't restore the current buffer
	and its point before refreshing the scrollbars; we need the buffer
	accurate.
1993-01-14 15:18:53 +00:00
Jim Blandy
7c299e7aa4 Make scrollbar structures into lisp objects, so that they can be
GC'd; this allows windows and scrollbars can refer to each other
	without worrying about dangling pointers.
	* xterm.h (struct x_display): vertical_scrollbars and
	judge_timestamp members deleted.
	(struct scrollbar): Redesigned to be a template for a Lisp_Vector.
	(SCROLLBAR_VEC_SIZE, XSCROLLBAR, SCROLLBAR_PACK, SCROLLBAR_UNPACK,
	SCROLLBAR_X_WINDOW, SET_SCROLLBAR_X_WINDOW,
	VERTICAL_SCROLLBAR_INSIDE_WIDTH, VERTICAL_SCROLLBAR_TOP_RANGE,
	VERTICAL_SCROLLBAR_INSIDE_HEIGHT, VERTICAL_SCROLLBAR_MIN_HANDLE):
	New macros, to help deal with the lispy structures, and deal with
	the graphics.
	* frame.h (WINDOW_VERTICAL_SCROLLBAR): Macro deleted.
	(struct frame): New fields `scrollbars' and
	`condemned_scrollbars', for use by the scrollbar implementation.
	[MULTI_FRAME and not MULTI_FRAME] (FRAME_SCROLLBARS,
	FRAME_CONDEMNED_SCROLLBARS): Accessors for the new field.
	* window.h (struct window): Doc fix for vertical_scrollbar field.
	* frame.c (make_frame): Initialize the `scrollbars' and
	`condemned_scrollbars' fields of the new frame.
	* alloc.c (mark_object): Mark the `scrollbars' and
	`condemned_scrollbars' slots of frames.
	* xterm.c (x_window_to_scrollbar): Scrollbars are chained on
	frames' scrollbar field, not their x.display->vertical_scrollbars
	field.
	(x_scrollbar_create, x_scrollbar_set_handle, x_scrollbar_move,
	x_scrollbar_remove, XTset_vertical_scrollbar,
	XTcondemn_scrollbars, XTredeem_scrollbar, XTjudge_scrollbars,
	x_scrollbar_expose, x_scrollbar_handle_click,
	x_scrollbar_handle_motion): Substantially rewritten to correct
	typos and brainos, and to accomodate the lispy structures.
1993-01-14 15:17:39 +00:00
Jim Blandy
535e0b8ef6 * window.c (window_internal_width): New function, which accounts
for scrollbars if present.
	* lisp.h (window_internal_height, window_internal_width): Add
	extern declarations for these.
	* dispnew.c (direct_output_for_insert, direct_output_forward_char,
	buffer_posn_from_coords): Use window_internal_width instead of
	writing out its definition.
	* indent.c (compute_motion): Doc fix; mention scrollbars and
	window_internal_width.
	(pos_tab_offset, Fvertical_motion): Use window_internal_width
	instead of writing it out.
	* window.c (Fpos_visible_in_window_p, Fwindow_width, Fscroll_left,
	Fscroll_right): Same.
	* xdisp.c (redisplay, try_window, try_window_id,
	display_text_line): Same.

	* termhooks.h (mouse_position_hook): Doc fix.
	(set_vertical_scrollbar_hook): This doesn't return anything any
	more, and doesn't take a struct scrollbar * argument any more.
	(condemn_scrollbars_hook, redeem_scrollbar_hook,
	judge_scrollbars_hook): Doc fixes.
	* term.c (mouse_position_hook): Doc fix.
	(set_vertical_scrollbar_hook): This doesn't return
	anything any more.  Doc fixes.
	* keyboard.c (kbd_buffer_get_event): Receive the scrollbar's
	window from *mouse_position_hook and pass it to
	make_lispy_movement, instead of working with a pointer to a struct
	scrollbar.
	(make_lispy_event): We don't need a window_from_scrollbar function
	anymore; we are given the window directly in *EVENT.
	Unify the code which generates
	text-area mouse clicks and scrollbar clicks; use the same code to
	distinguish clicks from drags on the scrollbar as in the text area.
	Distinguish clicks from drags by storing a copy of the lispy
	position list returned as part of the event.
	(button_down_location): Make this a lisp vector, rather than an
	array of random structures.
	(struct mouse_position): Remove this; it's been replaced by a lisp
	list.
	(make_lispy_movement): Accept the scrollbar's window as a
	parameter, rather than the scrollbar itself.
	If FRAME is zero, assume that the other arguments are garbage.
	(syms_of_keyboard): No need to staticpro each window of
	button_down_location now; just initialize and staticpro it.
	* window.c (window_from_scrollbar): Function deleted; no longer
	needed.
	* xdisp.c (redisplay_window): Just pass the window to
	set_vertical_scrollbar hook; don't pass the scrollbar object too.
	* xterm.c (XTmouse_position): Don't return a pointer to the
	scrollbar for scrollbar motion; instead, return the scrollbar's
	window.
1993-01-14 15:17:11 +00:00