aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog16
-rw-r--r--lisp/comint.el6
-rw-r--r--lisp/net/rcirc.el21
-rw-r--r--src/ChangeLog27
-rw-r--r--src/alloc.c15
-rw-r--r--src/editfns.c5
-rw-r--r--src/gtkutil.c19
-rw-r--r--src/gtkutil.h1
-rw-r--r--src/xfns.c8
9 files changed, 98 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2785d5ed315..e153fc7da77 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -21,6 +21,22 @@
21 customization groups. Initialize value to 'unset. 21 customization groups. Initialize value to 'unset.
22 (display-buffer-reuse-window): Quote lambda with #'. 22 (display-buffer-reuse-window): Quote lambda with #'.
23 23
242011-06-05 Andreas Schwab <schwab@linux-m68k.org>
25
26 * comint.el (comint-dynamic-complete-as-filename)
27 (comint-dynamic-complete-filename): Correctly call
28 completion-in-region.
29
302011-06-05 Deniz Dogan <deniz@dogan.se>
31
32 * net/rcirc.el (rcirc-prompt-for-encryption): Fix bug introduced
33 in last change.
34
352011-06-05 Deniz Dogan <deniz@dogan.se>
36
37 * net/rcirc.el (rcirc-prompt-for-encryption): New function.
38 (rcirc): Use it to prompt for encryption.
39
242011-06-05 Roland Winkler <winkler@gnu.org> 402011-06-05 Roland Winkler <winkler@gnu.org>
25 41
26 * textmodes/bibtex.el (bibtex-search-buffer): New variable. 42 * textmodes/bibtex.el (bibtex-search-buffer): New variable.
diff --git a/lisp/comint.el b/lisp/comint.el
index e4bc530f361..5548d19ad30 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -3035,7 +3035,8 @@ Returns t if successful."
3035 (when (comint--match-partial-filename) 3035 (when (comint--match-partial-filename)
3036 (unless (window-minibuffer-p (selected-window)) 3036 (unless (window-minibuffer-p (selected-window))
3037 (message "Completing file name...")) 3037 (message "Completing file name..."))
3038 (apply #'completion-in-region (comint--complete-file-name-data)))) 3038 (let ((data (comint--complete-file-name-data)))
3039 (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data)))))
3039 3040
3040(defun comint-filename-completion () 3041(defun comint-filename-completion ()
3041 "Return completion data for filename at point, if any." 3042 "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)."
3152(defun comint-dynamic-complete-as-filename () 3153(defun comint-dynamic-complete-as-filename ()
3153 "Dynamically complete at point as a filename. 3154 "Dynamically complete at point as a filename.
3154See `comint-dynamic-complete-filename'. Returns t if successful." 3155See `comint-dynamic-complete-filename'. Returns t if successful."
3155 (apply #'completion-in-region (comint--complete-file-name-data))) 3156 (let ((data (comint--complete-file-name-data)))
3157 (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data))))
3156(make-obsolete 'comint-dynamic-complete-as-filename 3158(make-obsolete 'comint-dynamic-complete-as-filename
3157 'comint-filename-completion "24.1") 3159 'comint-filename-completion "24.1")
3158 3160
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index bd9d6846a4b..70190867e89 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -455,15 +455,7 @@ If ARG is non-nil, instead prompt for connection parameters."
455 :channels) 455 :channels)
456 " ")) 456 " "))
457 "[, ]+" t)) 457 "[, ]+" t))
458 (encryption 458 (encryption (rcirc-prompt-for-encryption server-plist)))
459 (intern (completing-read "Encryption (default plain): "
460 '("plain" "tls")
461 nil t
462 (let ((choice (plist-get server-plist
463 :encryption)))
464 (when choice
465 (symbol-name choice)))
466 nil "plain"))))
467 (rcirc-connect server port nick user-name 459 (rcirc-connect server port nick user-name
468 rcirc-default-full-name 460 rcirc-default-full-name
469 channels password encryption)) 461 channels password encryption))
@@ -596,6 +588,17 @@ If ARG is non-nil, instead prompt for connection parameters."
596 (time-to-seconds (current-time)) 588 (time-to-seconds (current-time))
597 (float-time))) 589 (float-time)))
598 590
591(defun rcirc-prompt-for-encryption (server-plist)
592 "Prompt the user for the encryption method to use.
593SERVER-PLIST is the property list for the server."
594 (let ((msg "Encryption (default %s): ")
595 (choices '("plain" "tls"))
596 (default (or (plist-get server-plist :encryption)
597 'plain)))
598 (intern
599 (completing-read (format msg default)
600 choices nil t nil nil (symbol-name default)))))
601
599(defun rcirc-keepalive () 602(defun rcirc-keepalive ()
600 "Send keep alive pings to active rcirc processes. 603 "Send keep alive pings to active rcirc processes.
601Kill processes that have not received a server message since the 604Kill processes that have not received a server message since the
diff --git a/src/ChangeLog b/src/ChangeLog
index 0cc2af13e6a..1932453bb79 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,30 @@
12011-06-06 Paul Eggert <eggert@cs.ucla.edu>
2
3 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
4 Do not assume that spare memory exists; that assumption is valid
5 only if SYSTEM_MALLOC.
6 (LARGE_REQUEST): New macro, so that the issue of large requests
7 is separated from the issue of spare memory.
8
92011-06-05 Andreas Schwab <schwab@linux-m68k.org>
10
11 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
12 format. (Bug#8806)
13
14 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
15
16 * xfns.c (x_set_scroll_bar_default_width): Move declarations
17 before statements.
18
192011-06-05 Jan Djärv <jan.h.d@swipnet.se>
20
21 * gtkutil.c (xg_get_default_scrollbar_width): New function.
22
23 * gtkutil.h: Declare xg_get_default_scrollbar_width.
24
25 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
26 min width by calling x_set_scroll_bar_default_width (Bug#8505).
27
12011-06-05 Juanma Barranquero <lekktu@gmail.com> 282011-06-05 Juanma Barranquero <lekktu@gmail.com>
2 29
3 * xdisp.c (single_display_spec_intangible_p): Remove declaration. 30 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
diff --git a/src/alloc.c b/src/alloc.c
index 0c18fca1755..8d0fdd125dc 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -196,6 +196,12 @@ static char *spare_memory[7];
196#define SPARE_MEMORY (1 << 14) 196#define SPARE_MEMORY (1 << 14)
197#endif 197#endif
198 198
199#ifdef SYSTEM_MALLOC
200# define LARGE_REQUEST (1 << 14)
201#else
202# define LARGE_REQUEST SPARE_MEMORY
203#endif
204
199/* Number of extra blocks malloc should get when it needs more core. */ 205/* Number of extra blocks malloc should get when it needs more core. */
200 206
201static int malloc_hysteresis; 207static int malloc_hysteresis;
@@ -3283,15 +3289,12 @@ memory_full (size_t nbytes)
3283{ 3289{
3284 /* Do not go into hysterics merely because a large request failed. */ 3290 /* Do not go into hysterics merely because a large request failed. */
3285 int enough_free_memory = 0; 3291 int enough_free_memory = 0;
3286 if (SPARE_MEMORY < nbytes) 3292 if (LARGE_REQUEST < nbytes)
3287 { 3293 {
3288 void *p = malloc (SPARE_MEMORY); 3294 void *p = malloc (LARGE_REQUEST);
3289 if (p) 3295 if (p)
3290 { 3296 {
3291 if (spare_memory[0]) 3297 free (p);
3292 free (p);
3293 else
3294 spare_memory[0] = p;
3295 enough_free_memory = 1; 3298 enough_free_memory = 1;
3296 } 3299 }
3297 } 3300 }
diff --git a/src/editfns.c b/src/editfns.c
index 0e40fde9ca4..b961e602e4c 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4083,7 +4083,10 @@ usage: (format STRING &rest OBJECTS) */)
4083 int exponent_bytes = 0; 4083 int exponent_bytes = 0;
4084 int signedp = src0 == '-' || src0 == '+' || src0 == ' '; 4084 int signedp = src0 == '-' || src0 == '+' || src0 == ' ';
4085 int significand_bytes; 4085 int significand_bytes;
4086 if (zero_flag && '0' <= src[signedp] && src[signedp] <= '9') 4086 if (zero_flag
4087 && ((src[signedp] >= '0' && src[signedp] <= '9')
4088 || (src[signedp] >= 'a' && src[signedp] <= 'f')
4089 || (src[signedp] >= 'A' && src[signedp] <= 'F')))
4087 { 4090 {
4088 leading_zeros += padding; 4091 leading_zeros += padding;
4089 padding = 0; 4092 padding = 0;
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 6e54006d913..dedb39a7a40 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3326,6 +3326,25 @@ xg_get_widget_from_map (int idx)
3326 return 0; 3326 return 0;
3327} 3327}
3328 3328
3329int
3330xg_get_default_scrollbar_width (FRAME_PTR f)
3331{
3332#ifdef HAVE_GTK3
3333 GtkAdjustment *vadj;
3334#else
3335 GtkObject *vadj;
3336#endif
3337 GtkWidget *wscroll;
3338 int w = 0, b = 0;
3339 vadj = gtk_adjustment_new (XG_SB_MIN, XG_SB_MIN, XG_SB_MAX, 0.1, 0.1, 0.1);
3340 wscroll = gtk_vscrollbar_new (GTK_ADJUSTMENT (vadj));
3341 gtk_widget_style_get (wscroll, "slider-width", &w, "trough-border", &b, NULL);
3342 gtk_widget_destroy (wscroll);
3343 w += 2*b;
3344 if (w < 16) w = 16;
3345 return w;
3346}
3347
3329/* Return the scrollbar id for X Window WID on display DPY. 3348/* Return the scrollbar id for X Window WID on display DPY.
3330 Return -1 if WID not in id_to_widget. */ 3349 Return -1 if WID not in id_to_widget. */
3331 3350
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 3dc0a1dd150..cf58d03b0ce 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -135,6 +135,7 @@ extern void xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
135 int position, 135 int position,
136 int whole); 136 int whole);
137extern int xg_event_is_for_scrollbar (FRAME_PTR f, XEvent *event); 137extern int xg_event_is_for_scrollbar (FRAME_PTR f, XEvent *event);
138extern int xg_get_default_scrollbar_width (FRAME_PTR f);
138 139
139extern void update_frame_tool_bar (FRAME_PTR f); 140extern void update_frame_tool_bar (FRAME_PTR f);
140extern void free_frame_tool_bar (FRAME_PTR f); 141extern void free_frame_tool_bar (FRAME_PTR f);
diff --git a/src/xfns.c b/src/xfns.c
index ab66ddf1845..3507a13d517 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1699,10 +1699,14 @@ void
1699x_set_scroll_bar_default_width (struct frame *f) 1699x_set_scroll_bar_default_width (struct frame *f)
1700{ 1700{
1701 int wid = FRAME_COLUMN_WIDTH (f); 1701 int wid = FRAME_COLUMN_WIDTH (f);
1702 1702 int minw = 16;
1703 int width;
1703#ifdef USE_TOOLKIT_SCROLL_BARS 1704#ifdef USE_TOOLKIT_SCROLL_BARS
1705#ifdef USE_GTK
1706 minw = xg_get_default_scrollbar_width (f);
1707#endif
1704 /* A minimum width of 14 doesn't look good for toolkit scroll bars. */ 1708 /* A minimum width of 14 doesn't look good for toolkit scroll bars. */
1705 int width = 16 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM; 1709 width = minw + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
1706 FRAME_CONFIG_SCROLL_BAR_COLS (f) = (width + wid - 1) / wid; 1710 FRAME_CONFIG_SCROLL_BAR_COLS (f) = (width + wid - 1) / wid;
1707 FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = width; 1711 FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = width;
1708#else 1712#else