aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley2016-04-02 14:51:33 -0700
committerJohn Wiegley2016-04-02 14:51:33 -0700
commitc558890bde00f4b5079edd2c1d0d51086af3b13b (patch)
treebeda72a5f248e3e758690a8d4562771519d1aa20 /src
parent52c7b770d5f3d9deedf47fec4a23190d48bd62a1 (diff)
parente65c3079c65595d95749348366af9811fafff062 (diff)
downloademacs-c558890bde00f4b5079edd2c1d0d51086af3b13b.tar.gz
emacs-c558890bde00f4b5079edd2c1d0d51086af3b13b.zip
Merge from origin/emacs-25
e65c307 * src/font.c (QCuser_spec): Add missing colon to :user-spec. c8b868b Don't start the 'midnight' timer twice 278c8a7 * src/xwidget.c (Fxwidget_resize): Fix inappropriate use of X... e5c17f4 Fix todo-mode category movement bc70fda * lisp/xt-mouse.el (xterm-mouse-utf-8): Add :version. cf40f38 Ignore non-nil. non-cons values of unread-command-events 8ee4c52 Improve documentatuon of 'truncate-partial-width-windows' fb9a62c * src/ftfont.c (ftfont_shape_by_flt): Parenthesize as per GNU... 1e1ea22 Fix 'dired-goto-file' in Dired buffers produced by find-dired 3a13472 Fix map-put and map-delete for alists (Bug#23105) 422c3da Minor copyedits of documentation for temporary displays 90fb9b3 Add customization option for using UTF-8 coordinates in xt-mouse f14d463 Minor doc string fixes in replace.el e70ee9d Fix scrolling upwards with 'xwidget-webkit-browse-url' 44782de Fix display of Indic scripts 326c64f Fix splash screen display at startup 7ab2a97 ; In NEWS mention new display of minibuffer completions window a1cd84c Describe temporary displays in Emacs manual 5ec1056 Avoid stray As next to IDLW icons 45577d5 Avoid GTK 3 crash with icons and masks e99ff6e * lisp/minibuffer.el (minibuffer-completion-help): Use fit-wi... 077b78c Define make_save_ptr_ptr unconditionally 20a1003 Preserve current buffer when popping up TTY menus 7eba90c Improve font selection by family on MS-Windows 73d213f Comint, term, and compile now set EMACS 9524ec5 Ignore more merges when generating ChangeLog ad250f2 Sync with gnulib c0165ea Resurrect GNUS-NEWS autogeneration 1e5327c ; Backport ChangeLog.2 fixes from master e643977 Make `toggle-frame-maximized' respect the dock on OS X (bug#2... 38a43f1 Fix bug in displaying header line with a box face 91e6676 Fix an Isearch var to be a string (Bug#23038) 76ef522 Fix (args-out-of-range 1) error in cursor-sensor--detect 8a35f83 Render empty <ul><li><ul> correctly d8b2ce5 Ignore invalid base64 encoded embedded images 52ba24b Fix <p> and <div> newlines with or without <li> in shr b8ea08b Avoid errors in 'newline' fc3cd53 Fix Bug#23032 dd2737b Adjudicate review comments in abbrevs.texi 26f9c50 Fixup the "normal" matcher; highlight global var symbols, too 413e73b ; Small theme additions cd950da Honor prefix arg in doc-view-next-line-or-next-page ed909c0 ; Spelling fixes 6da3a6d Port to strict C99 offsetof de7601f Port to GTK with strict C11 compiler 658aa2d Port to GTK with strict C99 compiler 1df7173 Avoid screen artifacts with new OS X visible bell after scrol... 7a2edd3 Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into... dca240a Suppress some Tramp tests for OSX, do not merge with master 9094304 * lisp/progmodes/xref.el (xref-buffer-name, xref--window): Mo... cbedfc2 * lisp/gnus/mm-decode.el (gnus-format-message): Autoload it. 005ac7c * lisp/mail/rmail.el (rmail-mime-entity-truncated): Declare. 9ab03f2 ; Auto-commit of loaddefs files. 56df617 Address compilation warnings due to 2016-01-03 mml refactoring. a1ef911 * lisp/emacs-lisp/smie.el (smie-indent-keyword): Don't burp i... 79ae7fb * lisp/dired-x.el (dired-omit-here-always): Correct error mes... 253929f * lisp/dired-x.el (dired-omit-here-always): Replace undefined... ce53389 * lisp/xml.el (xml-parse-tag-1): Replace undefined function. d6d164f Avoid segfaults due to frame image cache being absent bc7f6f6 Improve documentation of glyphless-character display 6b6916e ; * src/xdisp.c (with_echo_area_buffer): Fix typos in comments. ee9a1f7 Support safe navigation operator in non-SMIE indentation code c3ed95b Move xsd:base64Binary decoding fix to debbugs.el 0.9.1 2036be4 Fix Ruby's operator precedence 1d686c2 (ruby-interpolation-inside-another-interpolation): New failin... 7950e1d Port to clang 3.7.0 on x86-64 218ae59 * test/automated/package-test.el (package-test-signed): Tweak... ba33b7c Sync with gnulib 38b276d Fix startup of "emacs -nw" on systems that CANNOT_DUMP dbfbedd Do not tokenize a comment before continuation as ';' 0403620 Don't misindent arguments of a method call inside continuation e6776f8 * src/keyboard.c (echo_keystrokes_p): Don't test cursor_in_ec... 8475f3d ASCII-only etc/NEWS etc. 5cc6919 Fix a cacheing bug, which led to inordinately slow c-beginnin... 0ce37ea Fix Isearch prompt when invoked with an argument f3033d4 Fix a typo in the Emacs manual 4235d2d Curved quotes in etc/NEWS etc. 26b56dc Fix some single quotes in documentation 80ec484 Make lisp-completion-at-point's argument optional 9d463ae Tweak the left precedence of '=>' 5b705bc Indent '.' relative to the first sibling expression 04f5525 Make '.' associative, for easier sexp navigation ba24c99 Revert "Simplify "Visit New File" to "New File""
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c2
-rw-r--r--src/font.c2
-rw-r--r--src/frame.c2
-rw-r--r--src/ftfont.c7
-rw-r--r--src/gtkutil.c100
-rw-r--r--src/keyboard.c8
-rw-r--r--src/term.c7
-rw-r--r--src/w32font.c3
-rw-r--r--src/xdisp.c7
-rw-r--r--src/xwidget.c4
10 files changed, 61 insertions, 81 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 1e4ec8b0573..56a535411c8 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3724,7 +3724,6 @@ make_save_ptr_int (void *a, ptrdiff_t b)
3724 return val; 3724 return val;
3725} 3725}
3726 3726
3727#if ! (defined USE_X_TOOLKIT || defined USE_GTK)
3728Lisp_Object 3727Lisp_Object
3729make_save_ptr_ptr (void *a, void *b) 3728make_save_ptr_ptr (void *a, void *b)
3730{ 3729{
@@ -3735,7 +3734,6 @@ make_save_ptr_ptr (void *a, void *b)
3735 p->data[1].pointer = b; 3734 p->data[1].pointer = b;
3736 return val; 3735 return val;
3737} 3736}
3738#endif
3739 3737
3740Lisp_Object 3738Lisp_Object
3741make_save_funcptr_ptr_obj (void (*a) (void), void *b, Lisp_Object c) 3739make_save_funcptr_ptr_obj (void (*a) (void), void *b, Lisp_Object c)
diff --git a/src/font.c b/src/font.c
index 5ab3b3e8399..2519599bc63 100644
--- a/src/font.c
+++ b/src/font.c
@@ -5317,7 +5317,7 @@ syms_of_font (void)
5317 DEFSYM (Qja, "ja"); 5317 DEFSYM (Qja, "ja");
5318 DEFSYM (Qko, "ko"); 5318 DEFSYM (Qko, "ko");
5319 5319
5320 DEFSYM (QCuser_spec, "user-spec"); 5320 DEFSYM (QCuser_spec, ":user-spec");
5321 5321
5322 staticpro (&scratch_font_spec); 5322 staticpro (&scratch_font_spec);
5323 scratch_font_spec = Ffont_spec (0, NULL); 5323 scratch_font_spec = Ffont_spec (0, NULL);
diff --git a/src/frame.c b/src/frame.c
index 88102a36625..9c8926c42c7 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4563,7 +4563,7 @@ On Nextstep, this just calls `ns-parse-geometry'. */)
4563 4563
4564 This function does not make the coordinates positive. */ 4564 This function does not make the coordinates positive. */
4565 4565
4566#define DEFAULT_ROWS 35 4566#define DEFAULT_ROWS 36
4567#define DEFAULT_COLS 80 4567#define DEFAULT_COLS 80
4568 4568
4569long 4569long
diff --git a/src/ftfont.c b/src/ftfont.c
index a402245a067..7285aee9bd4 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -2596,7 +2596,12 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font,
2596 language information, and select a proper flt for them 2596 language information, and select a proper flt for them
2597 here. */ 2597 here. */
2598 int c1 = LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 1)); 2598 int c1 = LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 1));
2599 if (CHAR_HAS_CATEGORY (c1, '^')) 2599 /* For the combining characters in the range U+300..U+36F,
2600 "combining" is the sole FLT provided by the m17n-lib. In
2601 addition, it is the sole FLT that can handle the other
2602 combining characters with non-OTF fonts. */
2603 if ((0x300 <= c1 && c1 <= 0x36F)
2604 || (! otf && CHAR_HAS_CATEGORY (c1, '^')))
2600 flt = mflt_get (msymbol ("combining")); 2605 flt = mflt_get (msymbol ("combining"));
2601 } 2606 }
2602 if (! flt && ! otf) 2607 if (! flt && ! otf)
diff --git a/src/gtkutil.c b/src/gtkutil.c
index ba059b73a70..e791e6ac317 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -252,35 +252,6 @@ xg_create_default_cursor (Display *dpy)
252 return gdk_cursor_new_for_display (gdpy, GDK_LEFT_PTR); 252 return gdk_cursor_new_for_display (gdpy, GDK_LEFT_PTR);
253} 253}
254 254
255static GdkPixbuf *
256xg_get_pixbuf_from_pixmap (struct frame *f, Pixmap pix)
257{
258 int iunused;
259 GdkPixbuf *tmp_buf;
260 Window wunused;
261 unsigned int width, height, uunused;
262 XImage *xim;
263
264 XGetGeometry (FRAME_X_DISPLAY (f), pix, &wunused, &iunused, &iunused,
265 &width, &height, &uunused, &uunused);
266
267 xim = XGetImage (FRAME_X_DISPLAY (f), pix, 0, 0, width, height,
268 ~0, XYPixmap);
269 if (!xim) return 0;
270
271 tmp_buf = gdk_pixbuf_new_from_data ((guchar *) xim->data,
272 GDK_COLORSPACE_RGB,
273 FALSE,
274 xim->bitmap_unit,
275 width,
276 height,
277 xim->bytes_per_line,
278 NULL,
279 NULL);
280 XDestroyImage (xim);
281 return tmp_buf;
282}
283
284/* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel. */ 255/* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel. */
285 256
286static GdkPixbuf * 257static GdkPixbuf *
@@ -288,46 +259,43 @@ xg_get_pixbuf_from_pix_and_mask (struct frame *f,
288 Pixmap pix, 259 Pixmap pix,
289 Pixmap mask) 260 Pixmap mask)
290{ 261{
291 int width, height; 262 GdkPixbuf *icon_buf = 0;
292 GdkPixbuf *icon_buf, *tmp_buf; 263 int iunused;
293 264 Window wunused;
294 tmp_buf = xg_get_pixbuf_from_pixmap (f, pix); 265 unsigned int width, height, depth, uunused;
295 icon_buf = gdk_pixbuf_add_alpha (tmp_buf, FALSE, 0, 0, 0);
296 g_object_unref (G_OBJECT (tmp_buf));
297
298 width = gdk_pixbuf_get_width (icon_buf);
299 height = gdk_pixbuf_get_height (icon_buf);
300 266
301 if (mask) 267 if (FRAME_DISPLAY_INFO (f)->red_bits != 8)
268 return 0;
269 XGetGeometry (FRAME_X_DISPLAY (f), pix, &wunused, &iunused, &iunused,
270 &width, &height, &uunused, &depth);
271 if (depth != 24)
272 return 0;
273 XImage *xim = XGetImage (FRAME_X_DISPLAY (f), pix, 0, 0, width, height,
274 ~0, XYPixmap);
275 if (xim)
302 { 276 {
303 GdkPixbuf *mask_buf = xg_get_pixbuf_from_pixmap (f, mask); 277 XImage *xmm = (! mask ? 0
304 guchar *pixels = gdk_pixbuf_get_pixels (icon_buf); 278 : XGetImage (FRAME_X_DISPLAY (f), mask, 0, 0,
305 guchar *mask_pixels = gdk_pixbuf_get_pixels (mask_buf); 279 width, height, ~0, XYPixmap));
306 int rowstride = gdk_pixbuf_get_rowstride (icon_buf); 280 icon_buf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height);
307 int mask_rowstride = gdk_pixbuf_get_rowstride (mask_buf); 281 if (icon_buf)
308 int y; 282 {
309 283 guchar *pixels = gdk_pixbuf_get_pixels (icon_buf);
310 for (y = 0; y < height; ++y) 284 int rowjunkwidth = gdk_pixbuf_get_rowstride (icon_buf) - width * 4;
311 { 285 for (int y = 0; y < height; y++, pixels += rowjunkwidth)
312 guchar *iconptr, *maskptr; 286 for (int x = 0; x < width; x++)
313 int x; 287 {
314 288 unsigned long rgb = XGetPixel (xim, x, y);
315 iconptr = pixels + y * rowstride; 289 *pixels++ = (rgb >> 16) & 255;
316 maskptr = mask_pixels + y * mask_rowstride; 290 *pixels++ = (rgb >> 8) & 255;
317 291 *pixels++ = rgb & 255;
318 for (x = 0; x < width; ++x) 292 *pixels++ = xmm && !XGetPixel (xmm, x, y) ? 0 : 255;
319 { 293 }
320 /* In a bitmap, RGB is either 255/255/255 or 0/0/0. Checking 294 }
321 just R is sufficient. */
322 if (maskptr[0] == 0)
323 iconptr[3] = 0; /* 0, 1, 2 is R, G, B. 3 is alpha. */
324
325 iconptr += rowstride/width;
326 maskptr += mask_rowstride/width;
327 }
328 }
329 295
330 g_object_unref (G_OBJECT (mask_buf)); 296 if (xmm)
297 XDestroyImage (xmm);
298 XDestroyImage (xim);
331 } 299 }
332 300
333 return icon_buf; 301 return icon_buf;
diff --git a/src/keyboard.c b/src/keyboard.c
index 1a5dbd0f617..54643eebba4 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2529,7 +2529,7 @@ read_char (int commandflag, Lisp_Object map,
2529 if (KEYMAPP (map) && INTERACTIVE 2529 if (KEYMAPP (map) && INTERACTIVE
2530 && !NILP (prev_event) && ! EVENT_HAS_PARAMETERS (prev_event) 2530 && !NILP (prev_event) && ! EVENT_HAS_PARAMETERS (prev_event)
2531 /* Don't bring up a menu if we already have another event. */ 2531 /* Don't bring up a menu if we already have another event. */
2532 && NILP (Vunread_command_events) 2532 && !CONSP (Vunread_command_events)
2533 && !detect_input_pending_run_timers (0)) 2533 && !detect_input_pending_run_timers (0))
2534 { 2534 {
2535 c = read_char_minibuf_menu_prompt (commandflag, map); 2535 c = read_char_minibuf_menu_prompt (commandflag, map);
@@ -2660,7 +2660,7 @@ read_char (int commandflag, Lisp_Object map,
2660 && !EQ (XCAR (prev_event), Qmenu_bar) 2660 && !EQ (XCAR (prev_event), Qmenu_bar)
2661 && !EQ (XCAR (prev_event), Qtool_bar) 2661 && !EQ (XCAR (prev_event), Qtool_bar)
2662 /* Don't bring up a menu if we already have another event. */ 2662 /* Don't bring up a menu if we already have another event. */
2663 && NILP (Vunread_command_events)) 2663 && !CONSP (Vunread_command_events))
2664 { 2664 {
2665 c = read_char_x_menu_prompt (map, prev_event, used_mouse_menu); 2665 c = read_char_x_menu_prompt (map, prev_event, used_mouse_menu);
2666 2666
@@ -9877,7 +9877,7 @@ clear_input_pending (void)
9877bool 9877bool
9878requeued_events_pending_p (void) 9878requeued_events_pending_p (void)
9879{ 9879{
9880 return (!NILP (Vunread_command_events)); 9880 return (CONSP (Vunread_command_events));
9881} 9881}
9882 9882
9883DEFUN ("input-pending-p", Finput_pending_p, Sinput_pending_p, 0, 1, 0, 9883DEFUN ("input-pending-p", Finput_pending_p, Sinput_pending_p, 0, 1, 0,
@@ -9888,7 +9888,7 @@ if there is a doubt, the value is t.
9888If CHECK-TIMERS is non-nil, timers that are ready to run will do so. */) 9888If CHECK-TIMERS is non-nil, timers that are ready to run will do so. */)
9889 (Lisp_Object check_timers) 9889 (Lisp_Object check_timers)
9890{ 9890{
9891 if (!NILP (Vunread_command_events) 9891 if (CONSP (Vunread_command_events)
9892 || !NILP (Vunread_post_input_method_events) 9892 || !NILP (Vunread_post_input_method_events)
9893 || !NILP (Vunread_input_method_events)) 9893 || !NILP (Vunread_input_method_events))
9894 return (Qt); 9894 return (Qt);
diff --git a/src/term.c b/src/term.c
index 17f36795998..a77e5729b5b 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3402,9 +3402,11 @@ static void
3402tty_pop_down_menu (Lisp_Object arg) 3402tty_pop_down_menu (Lisp_Object arg)
3403{ 3403{
3404 tty_menu *menu = XSAVE_POINTER (arg, 0); 3404 tty_menu *menu = XSAVE_POINTER (arg, 0);
3405 struct buffer *orig_buffer = XSAVE_POINTER (arg, 1);
3405 3406
3406 block_input (); 3407 block_input ();
3407 tty_menu_destroy (menu); 3408 tty_menu_destroy (menu);
3409 set_buffer_internal (orig_buffer);
3408 unblock_input (); 3410 unblock_input ();
3409} 3411}
3410 3412
@@ -3683,7 +3685,10 @@ tty_menu_show (struct frame *f, int x, int y, int menuflags,
3683 3685
3684 pane = selidx = 0; 3686 pane = selidx = 0;
3685 3687
3686 record_unwind_protect (tty_pop_down_menu, make_save_ptr (menu)); 3688 /* We save and restore the current buffer because tty_menu_activate
3689 triggers redisplay, which switches buffers at will. */
3690 record_unwind_protect (tty_pop_down_menu,
3691 make_save_ptr_ptr (menu, current_buffer));
3687 3692
3688 specbind (Qoverriding_terminal_local_map, 3693 specbind (Qoverriding_terminal_local_map,
3689 Fsymbol_value (Qtty_menu_navigation_map)); 3694 Fsymbol_value (Qtty_menu_navigation_map));
diff --git a/src/w32font.c b/src/w32font.c
index a1878adb4bd..018e6572563 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -796,7 +796,8 @@ w32font_list_internal (struct frame *f, Lisp_Object font_spec,
796 && !EQ (spec_charset, Qiso10646_1) 796 && !EQ (spec_charset, Qiso10646_1)
797 && !EQ (spec_charset, Qunicode_bmp) 797 && !EQ (spec_charset, Qunicode_bmp)
798 && !EQ (spec_charset, Qunicode_sip) 798 && !EQ (spec_charset, Qunicode_sip)
799 && !EQ (spec_charset, Qunknown)) 799 && !EQ (spec_charset, Qunknown)
800 && !EQ (spec_charset, Qascii_0))
800 return Qnil; 801 return Qnil;
801 } 802 }
802 803
diff --git a/src/xdisp.c b/src/xdisp.c
index bdc8af8b5bf..290f69878da 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -31386,8 +31386,11 @@ Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI). */);
31386 Vtruncate_partial_width_windows, 31386 Vtruncate_partial_width_windows,
31387 doc: /* Non-nil means truncate lines in windows narrower than the frame. 31387 doc: /* Non-nil means truncate lines in windows narrower than the frame.
31388For an integer value, truncate lines in each window narrower than the 31388For an integer value, truncate lines in each window narrower than the
31389full frame width, provided the window width is less than that integer; 31389full frame width, provided the total window width in column units is less
31390otherwise, respect the value of `truncate-lines'. 31390than that integer; otherwise, respect the value of `truncate-lines'.
31391The total width of the window is as returned by `window-total-width', it
31392includes the fringes, the continuation and truncation glyphs, the
31393display margins (if any), and the scroll bar
31391 31394
31392For any other non-nil value, truncate lines in all windows that do 31395For any other non-nil value, truncate lines in all windows that do
31393not span the full frame width. 31396not span the full frame width.
diff --git a/src/xwidget.c b/src/xwidget.c
index d438d879098..c24475f5312 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -767,14 +767,14 @@ VALUE is the amount to scroll, either relatively or absolutely. */)
767 Lisp_Object value) 767 Lisp_Object value)
768{ 768{
769 CHECK_XWIDGET (xwidget); 769 CHECK_XWIDGET (xwidget);
770 CHECK_NATNUM (value); 770 CHECK_NUMBER (value);
771 struct xwidget *xw = XXWIDGET (xwidget); 771 struct xwidget *xw = XXWIDGET (xwidget);
772 GtkAdjustment *adjustment 772 GtkAdjustment *adjustment
773 = ((EQ (Qhorizontal, axis) 773 = ((EQ (Qhorizontal, axis)
774 ? gtk_scrolled_window_get_hadjustment 774 ? gtk_scrolled_window_get_hadjustment
775 : gtk_scrolled_window_get_vadjustment) 775 : gtk_scrolled_window_get_vadjustment)
776 (GTK_SCROLLED_WINDOW (xw->widgetscrolledwindow_osr))); 776 (GTK_SCROLLED_WINDOW (xw->widgetscrolledwindow_osr)));
777 double final_value = XFASTINT (value); 777 double final_value = XINT (value);
778 if (EQ (Qt, relative)) 778 if (EQ (Qt, relative))
779 final_value += gtk_adjustment_get_value (adjustment); 779 final_value += gtk_adjustment_get_value (adjustment);
780 gtk_adjustment_set_value (adjustment, final_value); 780 gtk_adjustment_set_value (adjustment, final_value);