Code cleanup, speed and consing improvements for uniquify.el.
(uniquify-ref-base, uniquify-ref-filename)
(uniquify-ref-buffer, uniquify-ref-proposed): New functions.
(uniquify-fix-item-base, uniquify-fix-item-filename)
(uniquify-fix-item-buffer, uniquify-fix-item-proposed): Deleted.
Callers changed.
(uniquify-set-proposed): Changed to work with a vector item.
(uniquify-rationalize-file-buffer-names): Use a list of arrays for
the fix list, and a list of strings for the non-file buffer
names. Both changes reduce consing.
(uniquify-rationalize-a-list): Local variable renaming.
(uniquify-rationalize-conflicting-sublist): Use member instead of
assoc.
(uniquify-rename-buffer): Use unless instead of if not.
These changes correct a corner case that the old code managed correctly.
Precisely when you have a buffer visiting a file in the root directory
and then revert it to a file with the same name in a different
directory.
(uniquify-fix-item-proposed): Renamed from
uniquify-fix-item-min-proposed.
(uniquify-set-proposed): New function.
(uniquify-rationalize-file-buffer-names): Code reshuffled for
clarity and speed.
(uniquify-item-greaterp): Substitutes uniquify-item-lessp. This
is equivalent to what the old code did.
(uniquify-rationalize-a-list): Never recompute the proposed
name. Sort the conflicting sublist before rationalising it: this
is equivalent to what the old code did, but one directory element
at a time, and only when necessary.
(uniquify-rationalize-conflicting-sublist): Recompute here the
proposed name.
(uniquify-rationalize-file-buffer-names): Add an
explicit test for " **lose**" buffers generated by
find-alternate-file to avoid an error in particular conditions.
Gerd Moellmann [Wed, 1 Aug 2001 13:27:18 +0000 (13:27 +0000)]
(message_cleared_p): New variable.
(clear_message): Set message_cleared_p when clearing the current
message.
(redisplay_internal): Look at message_cleared_p to capture
the case that the echo area should be cleared.
Gerd Moellmann [Wed, 1 Aug 2001 10:46:23 +0000 (10:46 +0000)]
(gnus-startup-file-coding-system): Revert to binary.
(gnus-ding-file-coding-system): New variable.
(gnus-read-newsrc-el-file, gnus-save-newsrc-file)
(gnus-slave-save-newsrc): Use it.
(abs): New macro.
(double_click_fuzz): New variable.
(make_lispy_event): Use it to determine what makes a double-click.
(syms_of_keyboard): DEFVAR_INT it.
(init_from_display_pos): If POS is in an overlay string,
deal with the first overlay string having an image `display'
property.
(try_window_reusing_current_matrix, compute_line_metrics): Fix
computation of row's visible height for the case that part of the
row is invisible above and part of the row is at the same time
invisible below the window.
(last-sexp-setup-props): New function.
(last-sexp-toggle-display): Renamed from last-sexp-print.
(last-sexp-toggle-display, eval-last-sexp-1): Use
last-sexp-setup-props.
(mouse-wheel-down-button, mouse-wheel-up-button):
New user-options.
(mouse-wheel-change-button): New function.
(mouse-wheel-mode): Use mouse-wheel-{up,down}-button.
(mwheel-scroll): Ditto.
(eval-last-sexp-1): Don't search for
`...', compare with unabbreviated printed representation instead.
(last-sexp-print): Bind print-length and print-level to nil.
(Vx_max_tooltip_size): New variable.
(syms_of_xfns): DEFVAR_LISP it.
(Fx_show_tip): Set frame's window_width to the width of the
window. Use a maximum tooltip size specified by
Vx_max_tooltip_size, if that has valid contents.
(x_create_tip_frame): Set tooltip buffer's truncate-lines to nil.
(last-sexp-print): New function.
(eval-last-sexp-1): Give printed text a `keymap' property and bind
<mouse-2> and <RET> in that map to a function printing the
unabbreviated value.
(resize_mini_window): Give up when inhibit-redisplay
is non-nil, instead of when redisplaying_p is non-zero. See
comment there.
(mark_window_display_accurate_1): Add an assertion.
(eval-last-sexp-1): If standard-output
is a buffer, put a text property `printed-value' on the printed
representation, with the Lisp object printed as value.
Eli Zaretskii [Wed, 25 Jul 2001 16:24:58 +0000 (16:24 +0000)]
(eval-print-last-sexp, eval-defun):
Mention the effect of eval-expression-print-length and
eval-expression-print-level. Suggested by Kevin Gallagher
<kevingal@onramp.net>.
(isearch-other-meta-char): Don't modify mode-line and
similar events for which fake prefix keys are generated. It's no
longer necessary since read_key_sequence doesn't modify these
events for internal purposes anymore.
Eli Zaretskii [Tue, 24 Jul 2001 11:05:40 +0000 (11:05 +0000)]
(mouse-avoidance-too-close-p): If the frame lacks a
tool-bar-lines parameter, behave as if its value were zero.
(mouse-avoidance-set-pointer-shape): Don't do anything if
x-pointer-shape is not boundp.