aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2014-06-21 12:45:59 -0700
committerGlenn Morris2014-06-21 12:45:59 -0700
commitc400516ab1d827d08225ffb3e1bc1969c73cc45e (patch)
treeb16343b9e11c916c96b12ab56b6024cad91d3aff /src
parent539ad293eb36b4cf458cbdb5a6b37f5cd1bb68a1 (diff)
parent8047f439ec7d0bbe0085800a13bee8da883ae4dd (diff)
downloademacs-c400516ab1d827d08225ffb3e1bc1969c73cc45e.tar.gz
emacs-c400516ab1d827d08225ffb3e1bc1969c73cc45e.zip
Merge from emacs-24; up to 2014-06-06T02:22:40Z!monnier@iro.umontreal.ca
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog39
-rw-r--r--src/dispextern.h3
-rw-r--r--src/fileio.c5
-rw-r--r--src/font.c3
-rw-r--r--src/image.c47
-rw-r--r--src/indent.c27
-rw-r--r--src/keyboard.c23
-rw-r--r--src/xdisp.c7
8 files changed, 115 insertions, 39 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 94f4444d38c..c845568ddcf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,42 @@
12014-06-21 Eli Zaretskii <eliz@gnu.org>
2
3 * indent.c (Fvertical_motion): Doc fix.
4 Move to the goal column, if any, with a single call to
5 move_it_in_display_line, not in two calls. Doing this with two
6 calls causes move_it_in_display_line apply the line-prefix
7 handling twice instead of just once. (Bug#17823)
8
92014-06-21 Paul Eggert <eggert@cs.ucla.edu>
10
11 Port to OS X ACLs (Bug#17810).
12 * fileio.c (Ffile_acl): Port to OS X, where acl_get_file (...,
13 ACL_TYPE_ACCESS) doesn't work.
14
152014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
16
17 * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
18 before checking key-translation-map (bug#17659).
19
202014-06-21 Dmitry Antipov <dmantipov@yandex.ru>
21
22 * font.c (font_make_object): Avoid dangling pointer which may
23 crash GC (Bug#17771).
24
252014-06-21 Eli Zaretskii <eliz@gnu.org>
26
27 * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the
28 prototype of DGifCloseFile as appropriate for older and newer
29 versions of giflib.
30 (gif_close): New function, encapsulates the differences in the
31 calling sequence of DGifCloseFile before v5.1.0 and after it.
32 (gif_load): Call gif_close instead of DGifCloseFile. Divulge the
33 error string where appropriate. (Bug#17790)
34
35 * xdisp.c (Fmove_point_visually): Instead of testing for keyboard
36 macro execution, make sure point didn't move since last complete
37 redisplay, as the condition for using the glyph matrix
38 information. (Bug#17777)
39
12014-06-19 Dmitry Antipov <dmantipov@yandex.ru> 402014-06-19 Dmitry Antipov <dmantipov@yandex.ru>
2 41
3 Minor cleanup of fonset code. 42 Minor cleanup of fonset code.
diff --git a/src/dispextern.h b/src/dispextern.h
index e710f8e35d7..5396aeb6c8e 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2591,7 +2591,8 @@ struct it
2591 int vpos; 2591 int vpos;
2592 2592
2593 /* Horizontal matrix position reached in move_it_in_display_line. 2593 /* Horizontal matrix position reached in move_it_in_display_line.
2594 Only set there, not in display_line. */ 2594 Only set there, not in display_line, and only when the X
2595 coordinate is past first_visible_x. */
2595 int hpos; 2596 int hpos;
2596 2597
2597 /* Left fringe bitmap number (enum fringe_bitmap_type). */ 2598 /* Left fringe bitmap number (enum fringe_bitmap_type). */
diff --git a/src/fileio.c b/src/fileio.c
index 6fe11303ded..c7736661207 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3013,6 +3013,9 @@ was unable to determine the ACL entries. */)
3013 acl_t acl; 3013 acl_t acl;
3014 Lisp_Object acl_string; 3014 Lisp_Object acl_string;
3015 char *str; 3015 char *str;
3016# ifndef HAVE_ACL_TYPE_EXTENDED
3017 acl_type_t ACL_TYPE_EXTENDED = ACL_TYPE_ACCESS;
3018# endif
3016#endif 3019#endif
3017 3020
3018 absname = expand_and_dir_to_file (filename, 3021 absname = expand_and_dir_to_file (filename,
@@ -3027,7 +3030,7 @@ was unable to determine the ACL entries. */)
3027#ifdef HAVE_ACL_SET_FILE 3030#ifdef HAVE_ACL_SET_FILE
3028 absname = ENCODE_FILE (absname); 3031 absname = ENCODE_FILE (absname);
3029 3032
3030 acl = acl_get_file (SSDATA (absname), ACL_TYPE_ACCESS); 3033 acl = acl_get_file (SSDATA (absname), ACL_TYPE_EXTENDED);
3031 if (acl == NULL) 3034 if (acl == NULL)
3032 return Qnil; 3035 return Qnil;
3033 3036
diff --git a/src/font.c b/src/font.c
index 9e472fb3e3b..251d43ba8b2 100644
--- a/src/font.c
+++ b/src/font.c
@@ -207,6 +207,9 @@ font_make_object (int size, Lisp_Object entity, int pixelsize)
207 = (struct font *) allocate_pseudovector (size, FONT_OBJECT_MAX, PVEC_FONT); 207 = (struct font *) allocate_pseudovector (size, FONT_OBJECT_MAX, PVEC_FONT);
208 int i; 208 int i;
209 209
210 /* GC can happen before the driver is set up,
211 so avoid dangling pointer here (Bug#17771). */
212 font->driver = NULL;
210 XSETFONT (font_object, font); 213 XSETFONT (font_object, font);
211 214
212 if (! NILP (entity)) 215 if (! NILP (entity))
diff --git a/src/image.c b/src/image.c
index 3220a45a282..f8c2402bfc4 100644
--- a/src/image.c
+++ b/src/image.c
@@ -7250,7 +7250,11 @@ gif_image_p (Lisp_Object object)
7250#ifdef WINDOWSNT 7250#ifdef WINDOWSNT
7251 7251
7252/* GIF library details. */ 7252/* GIF library details. */
7253#if 5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)
7254DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *, int *));
7255#else
7253DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *)); 7256DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *));
7257#endif
7254DEF_IMGLIB_FN (int, DGifSlurp, (GifFileType *)); 7258DEF_IMGLIB_FN (int, DGifSlurp, (GifFileType *));
7255#if GIFLIB_MAJOR < 5 7259#if GIFLIB_MAJOR < 5
7256DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc)); 7260DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc));
@@ -7320,6 +7324,22 @@ gif_read_from_memory (GifFileType *file, GifByteType *buf, int len)
7320 return len; 7324 return len;
7321} 7325}
7322 7326
7327static int
7328gif_close (GifFileType *gif, int *err)
7329{
7330 int retval;
7331
7332#if 5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)
7333 retval = fn_DGifCloseFile (gif, err);
7334#else
7335 retval = fn_DGifCloseFile (gif);
7336#if GIFLIB_MAJOR >= 5
7337 if (err)
7338 *err = gif->Error;
7339#endif
7340#endif
7341 return retval;
7342}
7323 7343
7324/* Load GIF image IMG for use on frame F. Value is true if 7344/* Load GIF image IMG for use on frame F. Value is true if
7325 successful. */ 7345 successful. */
@@ -7344,9 +7364,7 @@ gif_load (struct frame *f, struct image *img)
7344 Lisp_Object specified_data = image_spec_value (img->spec, QCdata, NULL); 7364 Lisp_Object specified_data = image_spec_value (img->spec, QCdata, NULL);
7345 unsigned long bgcolor = 0; 7365 unsigned long bgcolor = 0;
7346 EMACS_INT idx; 7366 EMACS_INT idx;
7347#if GIFLIB_MAJOR >= 5
7348 int gif_err; 7367 int gif_err;
7349#endif
7350 7368
7351 if (NILP (specified_data)) 7369 if (NILP (specified_data))
7352 { 7370 {
@@ -7414,7 +7432,7 @@ gif_load (struct frame *f, struct image *img)
7414 if (!check_image_size (f, gif->SWidth, gif->SHeight)) 7432 if (!check_image_size (f, gif->SWidth, gif->SHeight))
7415 { 7433 {
7416 image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); 7434 image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
7417 fn_DGifCloseFile (gif); 7435 gif_close (gif, NULL);
7418 return 0; 7436 return 0;
7419 } 7437 }
7420 7438
@@ -7423,7 +7441,7 @@ gif_load (struct frame *f, struct image *img)
7423 if (rc == GIF_ERROR || gif->ImageCount <= 0) 7441 if (rc == GIF_ERROR || gif->ImageCount <= 0)
7424 { 7442 {
7425 image_error ("Error reading `%s'", img->spec, Qnil); 7443 image_error ("Error reading `%s'", img->spec, Qnil);
7426 fn_DGifCloseFile (gif); 7444 gif_close (gif, NULL);
7427 return 0; 7445 return 0;
7428 } 7446 }
7429 7447
@@ -7435,7 +7453,7 @@ gif_load (struct frame *f, struct image *img)
7435 { 7453 {
7436 image_error ("Invalid image number `%s' in image `%s'", 7454 image_error ("Invalid image number `%s' in image `%s'",
7437 image_number, img->spec); 7455 image_number, img->spec);
7438 fn_DGifCloseFile (gif); 7456 gif_close (gif, NULL);
7439 return 0; 7457 return 0;
7440 } 7458 }
7441 } 7459 }
@@ -7453,7 +7471,7 @@ gif_load (struct frame *f, struct image *img)
7453 if (!check_image_size (f, width, height)) 7471 if (!check_image_size (f, width, height))
7454 { 7472 {
7455 image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); 7473 image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
7456 fn_DGifCloseFile (gif); 7474 gif_close (gif, NULL);
7457 return 0; 7475 return 0;
7458 } 7476 }
7459 7477
@@ -7471,7 +7489,7 @@ gif_load (struct frame *f, struct image *img)
7471 && 0 <= subimg_left && subimg_left <= width - subimg_width)) 7489 && 0 <= subimg_left && subimg_left <= width - subimg_width))
7472 { 7490 {
7473 image_error ("Subimage does not fit in image", Qnil, Qnil); 7491 image_error ("Subimage does not fit in image", Qnil, Qnil);
7474 fn_DGifCloseFile (gif); 7492 gif_close (gif, NULL);
7475 return 0; 7493 return 0;
7476 } 7494 }
7477 } 7495 }
@@ -7479,7 +7497,7 @@ gif_load (struct frame *f, struct image *img)
7479 /* Create the X image and pixmap. */ 7497 /* Create the X image and pixmap. */
7480 if (!image_create_x_image_and_pixmap (f, img, width, height, 0, &ximg, 0)) 7498 if (!image_create_x_image_and_pixmap (f, img, width, height, 0, &ximg, 0))
7481 { 7499 {
7482 fn_DGifCloseFile (gif); 7500 gif_close (gif, NULL);
7483 return 0; 7501 return 0;
7484 } 7502 }
7485 7503
@@ -7650,7 +7668,18 @@ gif_load (struct frame *f, struct image *img)
7650 Fcons (make_number (gif->ImageCount), 7668 Fcons (make_number (gif->ImageCount),
7651 img->lisp_data)); 7669 img->lisp_data));
7652 7670
7653 fn_DGifCloseFile (gif); 7671 if (gif_close (gif, &gif_err) == GIF_ERROR)
7672 {
7673#if 5 <= GIFLIB_MAJOR
7674 char *error_text = fn_GifErrorString (gif_err);
7675
7676 if (error_text)
7677 image_error ("Error closing `%s': %s",
7678 img->spec, build_string (error_text));
7679#else
7680 image_error ("Error closing `%s'", img->spec, Qnil);
7681#endif
7682 }
7654 7683
7655 /* Maybe fill in the background field while we have ximg handy. */ 7684 /* Maybe fill in the background field while we have ximg handy. */
7656 if (NILP (image_spec_value (img->spec, QCbackground, NULL))) 7685 if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
diff --git a/src/indent.c b/src/indent.c
index dc862518924..711792f75cd 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1944,9 +1944,12 @@ The optional second argument WINDOW specifies the window to use for
1944parameters such as width, horizontal scrolling, and so on. 1944parameters such as width, horizontal scrolling, and so on.
1945The default is to use the selected window's parameters. 1945The default is to use the selected window's parameters.
1946 1946
1947LINES can optionally take the form (COLS . LINES), in which case 1947LINES can optionally take the form (COLS . LINES), in which case the
1948the motion will not stop at the start of a screen line but on 1948motion will not stop at the start of a screen line but COLS column
1949its column COLS (if such exists on that line, that is). 1949from the visual start of the line (if such exists on that line, that
1950is). If the line is scrolled horizontally, COLS is interpreted
1951visually, i.e., as addition to the columns of text beyond the left
1952edge of the window.
1950 1953
1951`vertical-motion' always uses the current buffer, 1954`vertical-motion' always uses the current buffer,
1952regardless of which buffer is displayed in WINDOW. 1955regardless of which buffer is displayed in WINDOW.
@@ -2126,20 +2129,14 @@ whether or not it is currently displayed in some window. */)
2126 } 2129 }
2127 } 2130 }
2128 2131
2129 /* Move to the goal column, if one was specified. */ 2132 /* Move to the goal column, if one was specified. If the window
2133 was originally hscrolled, the goal column is interpreted as
2134 an addition to the hscroll amount. */
2130 if (!NILP (lcols)) 2135 if (!NILP (lcols))
2131 { 2136 {
2132 /* If the window was originally hscrolled, move forward by 2137 int to_x = (int)(cols * FRAME_COLUMN_WIDTH (XFRAME (w->frame)) + 0.5);
2133 the hscrolled amount first. */ 2138
2134 if (first_x > 0) 2139 move_it_in_display_line (&it, ZV, first_x + to_x, MOVE_TO_X);
2135 {
2136 move_it_in_display_line (&it, ZV, first_x, MOVE_TO_X);
2137 it.current_x = 0;
2138 }
2139 move_it_in_display_line
2140 (&it, ZV,
2141 (int)(cols * FRAME_COLUMN_WIDTH (XFRAME (w->frame)) + 0.5),
2142 MOVE_TO_X);
2143 } 2140 }
2144 2141
2145 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); 2142 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
diff --git a/src/keyboard.c b/src/keyboard.c
index 3e5e405d66e..1da300b77cc 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2181,7 +2181,7 @@ show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object,
2181 2181
2182 2182
2183 2183
2184/* Input of single characters from keyboard */ 2184/* Input of single characters from keyboard. */
2185 2185
2186static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu, 2186static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu,
2187 struct timespec *end_time); 2187 struct timespec *end_time);
@@ -9382,16 +9382,6 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9382 first_unbound = min (t, first_unbound); 9382 first_unbound = min (t, first_unbound);
9383 9383
9384 head = EVENT_HEAD (key); 9384 head = EVENT_HEAD (key);
9385 if (help_char_p (head) && t > 0)
9386 {
9387 read_key_sequence_cmd = Vprefix_help_command;
9388 keybuf[t++] = key;
9389 last_nonmenu_event = key;
9390 /* The Microsoft C compiler can't handle the goto that
9391 would go here. */
9392 dummyflag = 1;
9393 break;
9394 }
9395 9385
9396 if (SYMBOLP (head)) 9386 if (SYMBOLP (head))
9397 { 9387 {
@@ -9649,6 +9639,17 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9649 9639
9650 goto replay_sequence; 9640 goto replay_sequence;
9651 } 9641 }
9642
9643 if (NILP (current_binding)
9644 && help_char_p (EVENT_HEAD (key)) && t > 1)
9645 {
9646 read_key_sequence_cmd = Vprefix_help_command;
9647 /* The Microsoft C compiler can't handle the goto that
9648 would go here. */
9649 dummyflag = 1;
9650 break;
9651 }
9652
9652 /* If KEY is not defined in any of the keymaps, 9653 /* If KEY is not defined in any of the keymaps,
9653 and cannot be part of a function key or translation, 9654 and cannot be part of a function key or translation,
9654 and is a shifted function key, 9655 and is a shifted function key,
diff --git a/src/xdisp.c b/src/xdisp.c
index 70e4d1b5e59..8711487780c 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -15790,7 +15790,7 @@ set_vertical_scroll_bar (struct window *w)
15790 redisplay itself, when it decides that the previous window start 15790 redisplay itself, when it decides that the previous window start
15791 point is fine and should be kept. Search for "goto force_start" 15791 point is fine and should be kept. Search for "goto force_start"
15792 below to see the details. Like the values of window-start 15792 below to see the details. Like the values of window-start
15793 specified outside of redisply, these internally deduced values 15793 specified outside of redisplay, these internally-deduced values
15794 are tested for feasibility, and ignored if found to be 15794 are tested for feasibility, and ignored if found to be
15795 unfeasible. 15795 unfeasible.
15796 15796
@@ -20741,12 +20741,15 @@ Value is the new character position of point. */)
20741 recorded in the glyphs, at least as long as the goal is on the 20741 recorded in the glyphs, at least as long as the goal is on the
20742 screen. */ 20742 screen. */
20743 if (w->window_end_valid 20743 if (w->window_end_valid
20744 && NILP (Vexecuting_kbd_macro)
20745 && !windows_or_buffers_changed 20744 && !windows_or_buffers_changed
20746 && b 20745 && b
20747 && !b->clip_changed 20746 && !b->clip_changed
20748 && !b->prevent_redisplay_optimizations_p 20747 && !b->prevent_redisplay_optimizations_p
20749 && !window_outdated (w) 20748 && !window_outdated (w)
20749 /* We rely below on the cursor coordinates to be up to date, but
20750 we cannot trust them if some command moved point since the
20751 last complete redisplay. */
20752 && w->last_point == BUF_PT (b)
20750 && w->cursor.vpos >= 0 20753 && w->cursor.vpos >= 0
20751 && w->cursor.vpos < w->current_matrix->nrows 20754 && w->cursor.vpos < w->current_matrix->nrows
20752 && (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos))->enabled_p) 20755 && (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos))->enabled_p)