Jim Blandy [Sat, 3 Oct 1992 00:06:36 +0000 (00:06 +0000)]
* minibuf.c (read_minibuf): Don't bother to save the current
frame's focus, and have read_minibuf_unwind restore it; saving and
restoring the window configurations will take care of that.
(read_minibuf_unwind): Don't worry about restoring the frame's focus.
Jim Blandy [Sat, 3 Oct 1992 00:05:39 +0000 (00:05 +0000)]
* keymap.c (access_keymap, store_in_keymap,
Fsingle_key_description): No need to check for
EVENT_HAS_PARAMETERS before using EVENT_HEAD; the latter now
works properly on all sorts of events.
Jim Blandy [Fri, 2 Oct 1992 23:56:44 +0000 (23:56 +0000)]
* keyboard.h (EVENT_HAS_PARAMETERS): Definition changed - all events
are not 5 elements long.
(EVENT_HEAD): Work correctly on all sorts of events, not just
events with parameters.
(EVENT_WINDOW, EVENT_BUFFER_POSN, EVENT_SCROLLBAR_BUTTON,
EVENT_WINDOW_POSN, EVENT_TIMESTAMP): These aren't useful
anymore; this information may appear twice in an event. These
are replaced by the POSN_ accessors, which are meant to be
composed with the EVENT_START and EVENT_END accessors.
(EVENT_START, EVENT_END): Two new accessors, to get at the
starting and ending position of an event.
(POSN_WINDOW, POSN_BUFFER_POSN, PONS_SCROLLBAR_BUTTON,
POSN_WINDOW_POSN, POSN_TIMESTAMP): New macros, to futher
diasassemble the values returned by EVENT_START and EVENT_END.
* keyboard.h (Qevent_unmodified): Extern declaration replaced by...
(Qevent_symbol_elements): This.
(EVENT_HEAD_UNMODIFIED): Use the Qevent_symbol_elements
property, rather than the Qevent_unmodified property.
Jim Blandy [Fri, 2 Oct 1992 23:55:39 +0000 (23:55 +0000)]
* keyboard.c (echo_char, read_char): Apply EVENT_HEAD without first
testing for EVENT_HAS_PARAMETERS; EVENT_HEAD works properly on
all sorts of events now.
(read_key_sequence): Use the new accessors to decide in which window
an event occurred.
* keyboard.c (Qevent_unmodified): Replaced by...
(Qevent_symbol_elements): New property.
(syms_of_keyboard): initialize and staticpro the latter, not the
former.
* keyboard.c (readable_events): This doesn't need to scan and
discard mouse release events anymore; it just uses
EVENT_QUEUES_EMPTY.
(kbd_buffer_get_event): No need to skip past mouse release events.
* keyboard.c (button_down_location): New variable, which
stores the location at which each button was pressed, so we
can build a complete drag event when the button is released.
(make_lispy_event): When a button is pressed, record its
location in button_down_location, and turn it into a `down'
event. When a button is released, compare its release
location with its press location, and decide whether to call
it a `click' or `drag' event.
Change mouse movement events to be arranged like click events.
(format_modifiers): Note that the click modifier has no
written representation.
(modifier_names, modifer_symbols): New variables, used to
create the Qevent_symbol_elements property.
(modify_event_symbol): Change the format of the modified
symbol cache; there are too many modifier bits now to use a
vector indexed by a modifier mask. Use an assoc-list instead.
Document the format of the cache.
Put the Qevent_symbol_elements property on each new symbol,
instead of a Qevent_unmodified property.
(symbols_of_keyboard): Put Qevent_symbol_elements properties on
the symbols specified in head_table, not Qevent_unmodifed properties.
Initialize and staticpro modifier_symbols, and staticpro the
window elements of button_down_location.
Joseph Arceneaux [Fri, 2 Oct 1992 19:59:42 +0000 (19:59 +0000)]
* alloc.c: #include "intervals.h".
(init_intervals, make_interval,
mark_interval, mark_interval_tree): New functions conditionally
defined.
(make_uninit_string): Call INITIALIZE_INTERVAL.
(INIT_INTERVALS, UNMARK_BALANCE_INTERVALS, MARK_INTERVAL_TREE):
New macros, conditionally defined.
(mark_object): Call MARK_INTERVAL_TREE in case Lisp_String.
(gc_sweep): If text properties are in use, place all unmarked
intervals on the free list. Call UNMARK_BALANCE_INTERVALS on
`buffer->intervals' when unmarking `buffer'.
(compact_strings): Include INTERVAL_PTR_SIZE in calculation for
target of bcopy when relocating strings.
(init_alloc_once): Call INIT_INTERVALS.
(make_pure_string): Include INTERVAL_PTR_SIZE in calculation of
`size'.
Roland McGrath [Thu, 1 Oct 1992 02:00:41 +0000 (02:00 +0000)]
(compilation-parse-errors): Save (match-beginning 0) in a variable, so the
looking-at call doesn't clobber its value when we want to use it to back up
before the error we discard.
Make sure compilation-error-list is at least two elts long before checking
its first two elts for being in the same file.
Joseph Arceneaux [Thu, 1 Oct 1992 00:56:11 +0000 (00:56 +0000)]
* buffer.h: New macro TEMP_SET_PT. If intervals are used, SET_PT
and TEMP_SET_PT are function calls.
Similarly for BUF_SET_PT and BUF_TEMP_SET_PT.
Added DECLARE_INTERVALS to buffer structure to conditionally
compile an interval tree into it..
Jim Blandy [Wed, 30 Sep 1992 11:57:51 +0000 (11:57 +0000)]
* xterm.c (x_meta_mod_mask): New variable, indicating which X
modifier bits denote meta keys.
(x_find_modifier_meanings): New function, to set x_meta_mod_mask.
(x_convert_modifiers): Use that.
(x_term_init): Call x_find_modifier_meanings.
* xterm.c (XTread_socket): Pass PropertyNotify events from the
root window to x_invalidate_cut_buffer_cache.
(x_term_init): Call x_watch_cut_buffer_cache here.
Roland McGrath [Wed, 30 Sep 1992 01:45:47 +0000 (01:45 +0000)]
(compilation-parse-errors): After we get enough errors to stop early, toss
the last one (which is for a different file), so we don't lose
the same way on the next run.
Jim Blandy [Tue, 29 Sep 1992 18:30:35 +0000 (18:30 +0000)]
* xselect.c (Qcut_buffer0): Symbol removed; we're using a new
interface to the cut buffer now.
(NUM_CUT_BUFFERS, cut_buffer_atom, cut_buffer_value,
cut_buffer_cached, cut_buffer_just_set): New variables.
(Fx_own_selection, Fx_selection_value): Dike out the code to
handle CUT_BUFFER0 requests.
(Fx_get_cut_buffer, Fx_set_cut_buffer, x_watch_cut_buffer_cache,
x_invalidate_cut_buffer_cache): New functions.
(syms_of_xselect): Don't bother to initialize Qcut_buffer0.
Initialize and staticpro cut_buffer_value, and defsubr
Sx_get_cut_buffer and Sx_set_cut_buffer.
* xterm.c (XTread_socket): Pass PropertyNotify events from the
root window to x_invalidate_cut_buffer_cache.
(x_term_init): Call x_watch_cut_buffer_cache here.
Jim Blandy [Tue, 29 Sep 1992 13:44:55 +0000 (13:44 +0000)]
* keyboard.c (recent_keys): Turn this from an array, which is a
pain in the neck to staticpro, into a vector, which is easier.
(read_char, Frecent_keys): Access recent_keys as a lisp vector,
not a C array.
(init_keyboard): Set recent_keys to be a vector, and staticpro
it.
Jim Blandy [Tue, 29 Sep 1992 09:57:12 +0000 (09:57 +0000)]
* gud.el: When we send a command to the debugger via gud-call,
it's annoying to see the command and the new prompt in the
debugger interaction buffer; nuke the command and the old prompt.
(gud-delete-prompt-marker): New variable, with extensive documentation.
(gud-mode): Make gud-delete-prompt-marker buffer-local, and
initialize it.
(gud-filter-insert): If gud-delete-prompt-marker is set, delete
the prompt, and clear gud-delete-prompt-marker.
(gud-call): Arrange for the last prompt printed to get deleted, by
setting gud-delete-prompt-char.
Jim Blandy [Tue, 29 Sep 1992 07:45:05 +0000 (07:45 +0000)]
* gud.el (gud-def): Doc fix.
(gud-gdb-marker-filter, gud-sdb-marker-filter,
gud-dbx-marker-filter): Rename the argument `s' or `str' to
`string', and change all uses; these definitions were referring to
`string', which is unbound in the lexical context, but which
happens to end up being bound to the right thing by the caller,
gud-filter.
(sdb): Set comint-prompt-regexp, not comint-prompt-pattern; the
latter doesn't exist.
(gud-dbx-debugger-setup): Use the argument `f', not the variable
`file', which happens to be bound in the caller.
(gud-filter-insert): The variable `start' is never used. The
variable `moving' is unnecessary. The variable `old-buffer' and
the unwind-protect form are unneeded, since save-excursion can do
their work. The binding of output-after-point should be done after
switching to the process's buffer, not in whatever random buffer
happens to be current when the process filter is called. There's
no need to set the process mark if we've just inserted at its
location using insert-before-markers.
(gud-read-address): Don't bother setting the variable `result'; it
is never used.
* gud.el (gud-mode-map): Bind gud-refresh to C-c C-l, not C-c l;
the latter is reserved for the user's purposes.
* gud.el (gdb, sdb, dbx): Use C-c C-r ("resume") for continuing,
instead of C-c C-c. C-c C-c should be comint-interrupt-subjob;
it's important to have that available, and the C-c C-c binding is
consistent with all the other comint-derived modes.
Jim Blandy [Tue, 29 Sep 1992 04:08:04 +0000 (04:08 +0000)]
* buffer.c (Fbury_buffer): This used to undisplay the buffer being
buried only if the BUFFER argument was nil. Instead, undisplay the
buffer whenever it's displayed in the selected window, no matter
how it was specified by BUFFER. This is how it behaves in 18.58,
and I can't find any ChangeLog entry in 18.58 or 19.0 saying why
they differ. Fix the doc string accordingly.
Jim Blandy [Tue, 29 Sep 1992 01:08:33 +0000 (01:08 +0000)]
* ralloc.c: Since the users of the relocating allocation code
handle memory exhaustion, it's better to return an error code to
them than to call abort.
(obtain): If we cannot allocate more memory, don't call
abort. Instead, return non-zero iff the allocation is successful.
(get_more_space): If obtain fails, return zero.
(get_bloc): Return zero if we can't allocate the new bloc.
(r_alloc_sbrk): Return zero if we can't allocate more memory.
(r_alloc): If we can't allocate more memory, set *PTR to zero and
return zero.
(r_re_alloc): If we can't allocate more memory, leave *PTR
unchanged, and return zero.
* ralloc.c (warnfunction): Renamed to warn_function; users changed.
Richard M. Stallman [Mon, 28 Sep 1992 13:02:21 +0000 (13:02 +0000)]
(ws-mark-word): Use forward-word, with an arg, instead of backward-word.
(wordstar-mode): Move after definition of keymap.
(ws-move-block): Just two args for kill-region.
Jim Blandy [Mon, 28 Sep 1992 06:55:54 +0000 (06:55 +0000)]
* keyboard.c (read_char): If we're returning an event from a
macro, set Vlast_event_frame to Qmacro, instead of leaving it set
to the frame of the previous real event.
(read_key_sequence): If Vlast_event_frame isn't a frame, don't
bother switching buffers.
(syms_of_keyboard): Doc fix for Vlast_event_frame.
(Vlast_event_frame): Doc fix.
* keyboard.c (format_modifiers, reorder_modifiers): Handle the new
modifier bits.
Jim Blandy [Mon, 28 Sep 1992 06:53:29 +0000 (06:53 +0000)]
* termhooks.h (alt_modifier, hyper_modifier, super_modifier,
down_modifier, drag_modifier): New modifiers, to support the new
input system. Re-arranged modifiers so that their bits are in
canonical order; this makes reorder_modifiers slightly simpler.
Jim Blandy [Mon, 28 Sep 1992 06:10:03 +0000 (06:10 +0000)]
* window.c (delete_all_subwindows): Save the window's buffer in
its `height' field; we may need to know the window's old buffer
once we have restored it from a window configuration.
Fset_window_configuration): When we restore a window, if its
`height' field is a buffer, restore its `buffer' field from that.
This allows us to leave the window's buffer unchanged if the
buffer recorded in the configuration is dead.
* window.c (delete_all_subwindows): Removed unused variable named
"count".
Jim Blandy [Mon, 28 Sep 1992 02:20:23 +0000 (02:20 +0000)]
* keymap.c (access_keymap): Remove code to notice bindings for
Qt.
* keymap.c (Fwhere_is_internal): Don't forget to advance map to
the next element when we find something that is neither a vector
nor a cons. Don't forget to QUIT in the appropriate places,
either.
Roland McGrath [Sun, 27 Sep 1992 01:51:04 +0000 (01:51 +0000)]
(vc-checkin-hook): New user hook variable.
(vc-log-after-operation-hook): New internal defvar.
(vc-checkin): Set vc-log-after-operation-hook to 'vc-checkin-hook.
(vc-finish-logentry): (run-hooks vc-log-after-operation-hook) at end.
(vc-update-change-log): When doing all visited files, remove directory
names from file names that are in default-directory.
Roland McGrath [Sun, 27 Sep 1992 01:31:15 +0000 (01:31 +0000)]
(vc-update-change-log): Use shell-command, not shell-command-on-region.
Take optional args to pass to script.
Add fancy interactive spec: C-u for current file only; M-0 for all visited.