Commit 1d00388a authored by Martin Rudalics's avatar Martin Rudalics

Merge from trunk

parents 348f5121 4d09bcf6
......@@ -21,6 +21,22 @@
customization groups. Initialize value to 'unset.
(display-buffer-reuse-window): Quote lambda with #'.
2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
* comint.el (comint-dynamic-complete-as-filename)
(comint-dynamic-complete-filename): Correctly call
completion-in-region.
2011-06-05 Deniz Dogan <deniz@dogan.se>
* net/rcirc.el (rcirc-prompt-for-encryption): Fix bug introduced
in last change.
2011-06-05 Deniz Dogan <deniz@dogan.se>
* net/rcirc.el (rcirc-prompt-for-encryption): New function.
(rcirc): Use it to prompt for encryption.
2011-06-05 Roland Winkler <winkler@gnu.org>
* textmodes/bibtex.el (bibtex-search-buffer): New variable.
......
......@@ -3035,7 +3035,8 @@ Returns t if successful."
(when (comint--match-partial-filename)
(unless (window-minibuffer-p (selected-window))
(message "Completing file name..."))
(apply #'completion-in-region (comint--complete-file-name-data))))
(let ((data (comint--complete-file-name-data)))
(completion-in-region (nth 0 data) (nth 1 data) (nth 2 data)))))
(defun comint-filename-completion ()
"Return completion data for filename at point, if any."
......@@ -3152,7 +3153,8 @@ in the same way as TABLE completes strings of the form (concat S2 S)."
(defun comint-dynamic-complete-as-filename ()
"Dynamically complete at point as a filename.
See `comint-dynamic-complete-filename'. Returns t if successful."
(apply #'completion-in-region (comint--complete-file-name-data)))
(let ((data (comint--complete-file-name-data)))
(completion-in-region (nth 0 data) (nth 1 data) (nth 2 data))))
(make-obsolete 'comint-dynamic-complete-as-filename
'comint-filename-completion "24.1")
......
......@@ -455,15 +455,7 @@ If ARG is non-nil, instead prompt for connection parameters."
:channels)
" "))
"[, ]+" t))
(encryption
(intern (completing-read "Encryption (default plain): "
'("plain" "tls")
nil t
(let ((choice (plist-get server-plist
:encryption)))
(when choice
(symbol-name choice)))
nil "plain"))))
(encryption (rcirc-prompt-for-encryption server-plist)))
(rcirc-connect server port nick user-name
rcirc-default-full-name
channels password encryption))
......@@ -596,6 +588,17 @@ If ARG is non-nil, instead prompt for connection parameters."
(time-to-seconds (current-time))
(float-time)))
(defun rcirc-prompt-for-encryption (server-plist)
"Prompt the user for the encryption method to use.
SERVER-PLIST is the property list for the server."
(let ((msg "Encryption (default %s): ")
(choices '("plain" "tls"))
(default (or (plist-get server-plist :encryption)
'plain)))
(intern
(completing-read (format msg default)
choices nil t nil nil (symbol-name default)))))
(defun rcirc-keepalive ()
"Send keep alive pings to active rcirc processes.
Kill processes that have not received a server message since the
......
2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
* alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
Do not assume that spare memory exists; that assumption is valid
only if SYSTEM_MALLOC.
(LARGE_REQUEST): New macro, so that the issue of large requests
is separated from the issue of spare memory.
2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
* editfns.c (Fformat): Correctly handle zero flag with hexadecimal
format. (Bug#8806)
* gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
* xfns.c (x_set_scroll_bar_default_width): Move declarations
before statements.
2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
* gtkutil.c (xg_get_default_scrollbar_width): New function.
* gtkutil.h: Declare xg_get_default_scrollbar_width.
* xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
min width by calling x_set_scroll_bar_default_width (Bug#8505).
2011-06-05 Juanma Barranquero <lekktu@gmail.com>
* xdisp.c (single_display_spec_intangible_p): Remove declaration.
......
......@@ -196,6 +196,12 @@ static char *spare_memory[7];
#define SPARE_MEMORY (1 << 14)
#endif
#ifdef SYSTEM_MALLOC
# define LARGE_REQUEST (1 << 14)
#else
# define LARGE_REQUEST SPARE_MEMORY
#endif
/* Number of extra blocks malloc should get when it needs more core. */
static int malloc_hysteresis;
......@@ -3283,15 +3289,12 @@ memory_full (size_t nbytes)
{
/* Do not go into hysterics merely because a large request failed. */
int enough_free_memory = 0;
if (SPARE_MEMORY < nbytes)
if (LARGE_REQUEST < nbytes)
{
void *p = malloc (SPARE_MEMORY);
void *p = malloc (LARGE_REQUEST);
if (p)
{
if (spare_memory[0])
free (p);
else
spare_memory[0] = p;
free (p);
enough_free_memory = 1;
}
}
......
......@@ -4083,7 +4083,10 @@ usage: (format STRING &rest OBJECTS) */)
int exponent_bytes = 0;
int signedp = src0 == '-' || src0 == '+' || src0 == ' ';
int significand_bytes;
if (zero_flag && '0' <= src[signedp] && src[signedp] <= '9')
if (zero_flag
&& ((src[signedp] >= '0' && src[signedp] <= '9')
|| (src[signedp] >= 'a' && src[signedp] <= 'f')
|| (src[signedp] >= 'A' && src[signedp] <= 'F')))
{
leading_zeros += padding;
padding = 0;
......
......@@ -3326,6 +3326,25 @@ xg_get_widget_from_map (int idx)
return 0;
}
int
xg_get_default_scrollbar_width (FRAME_PTR f)
{
#ifdef HAVE_GTK3
GtkAdjustment *vadj;
#else
GtkObject *vadj;
#endif
GtkWidget *wscroll;
int w = 0, b = 0;
vadj = gtk_adjustment_new (XG_SB_MIN, XG_SB_MIN, XG_SB_MAX, 0.1, 0.1, 0.1);
wscroll = gtk_vscrollbar_new (GTK_ADJUSTMENT (vadj));
gtk_widget_style_get (wscroll, "slider-width", &w, "trough-border", &b, NULL);
gtk_widget_destroy (wscroll);
w += 2*b;
if (w < 16) w = 16;
return w;
}
/* Return the scrollbar id for X Window WID on display DPY.
Return -1 if WID not in id_to_widget. */
......
......@@ -135,6 +135,7 @@ extern void xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
int position,
int whole);
extern int xg_event_is_for_scrollbar (FRAME_PTR f, XEvent *event);
extern int xg_get_default_scrollbar_width (FRAME_PTR f);
extern void update_frame_tool_bar (FRAME_PTR f);
extern void free_frame_tool_bar (FRAME_PTR f);
......
......@@ -1699,10 +1699,14 @@ void
x_set_scroll_bar_default_width (struct frame *f)
{
int wid = FRAME_COLUMN_WIDTH (f);
int minw = 16;
int width;
#ifdef USE_TOOLKIT_SCROLL_BARS
#ifdef USE_GTK
minw = xg_get_default_scrollbar_width (f);
#endif
/* A minimum width of 14 doesn't look good for toolkit scroll bars. */
int width = 16 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
width = minw + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
FRAME_CONFIG_SCROLL_BAR_COLS (f) = (width + wid - 1) / wid;
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = width;
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment