------------------------------------------------------------ revno: 117476 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2014-07-04 06:28:54 +0400 message: * font.h (struct font_driver): Remove get_outline and free_outline; not used by any font driver. * ftfont.c (ftfont_driver): * macfont.m (macfont_driver): * nsfont.m (nsfont_driver): * w32font.c (w32font_driver): * w32uniscribe.c (uniscribe_font_driver): * xfont.c (xfont_driver): Related users changed. * xselect.c (x_get_window_property): Use convenient xmalloc. Call to xfree only if some data was really allocated. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-07-03 18:12:41 +0000 +++ src/ChangeLog 2014-07-04 02:28:54 +0000 @@ -1,3 +1,16 @@ +2014-07-04 Dmitry Antipov + + * font.h (struct font_driver): Remove get_outline and free_outline; + not used by any font driver. + * ftfont.c (ftfont_driver): + * macfont.m (macfont_driver): + * nsfont.m (nsfont_driver): + * w32font.c (w32font_driver): + * w32uniscribe.c (uniscribe_font_driver): + * xfont.c (xfont_driver): Related users changed. + * xselect.c (x_get_window_property): Use convenient xmalloc. + Call to xfree only if some data was really allocated. + 2014-07-03 Dmitry Antipov On MS-Windows, display busy cursor on all GUI frames. === modified file 'src/font.h' --- src/font.h 2014-07-03 12:20:00 +0000 +++ src/font.h 2014-07-04 02:28:54 +0000 @@ -614,15 +614,6 @@ #endif /* HAVE_WINDOW_SYSTEM */ /* Optional. - Return an outline data for glyph-code CODE of FONT. The format - of the outline data depends on the font-driver. */ - void *(*get_outline) (struct font *font, unsigned code); - - /* Optional. - Free OUTLINE (that is obtained by the above method). */ - void (*free_outline) (struct font *font, void *outline); - - /* Optional. Get coordinates of the INDEXth anchor point of the glyph whose code is CODE. Store the coordinates in *X and *Y. Return 0 if the operations was successful. Otherwise return -1. */ === modified file 'src/ftfont.c' --- src/ftfont.c 2014-06-17 16:09:19 +0000 +++ src/ftfont.c 2014-07-04 02:28:54 +0000 @@ -538,8 +538,6 @@ NULL, /* draw */ ftfont_get_bitmap, NULL, /* free_bitmap */ - NULL, /* get_outline */ - NULL, /* free_outline */ ftfont_anchor_point, #ifdef HAVE_LIBOTF ftfont_otf_capability, === modified file 'src/macfont.m' --- src/macfont.m 2014-06-11 17:57:51 +0000 +++ src/macfont.m 2014-07-04 02:28:54 +0000 @@ -1580,8 +1580,6 @@ macfont_draw, NULL, /* get_bitmap */ NULL, /* free_bitmap */ - NULL, /* get_outline */ - NULL, /* free_outline */ NULL, /* anchor_point */ NULL, /* otf_capability */ NULL, /* otf_drive */ === modified file 'src/nsfont.m' --- src/nsfont.m 2014-05-25 10:28:52 +0000 +++ src/nsfont.m 2014-07-04 02:28:54 +0000 @@ -649,7 +649,7 @@ nsfont_encode_char, nsfont_text_extents, nsfont_draw, - /* excluded: get_bitmap, free_bitmap, get_outline, free_outline, + /* excluded: get_bitmap, free_bitmap, anchor_point, otf_capability, otf_driver, start_for_frame, end_for_frame, shape */ }; === modified file 'src/w32font.c' --- src/w32font.c 2014-01-19 15:42:48 +0000 +++ src/w32font.c 2014-07-04 02:28:54 +0000 @@ -757,19 +757,6 @@ static void w32font_free_bitmap (struct font *font, struct font_bitmap *bitmap); */ -/* w32 implementation of get_outline for font backend. - Optional. - Return an outline data for glyph-code CODE of FONT. The format - of the outline data depends on the font-driver. -static void * -w32font_get_outline (struct font *font, unsigned code); - */ -/* w32 implementation of free_outline for font backend. - Optional. - Free OUTLINE (that is obtained by the above method). -static void -w32font_free_outline (struct font *font, void *outline); - */ /* w32 implementation of anchor_point for font backend. Optional. Get coordinates of the INDEXth anchor point of the glyph whose @@ -2557,8 +2544,6 @@ w32font_draw, NULL, /* get_bitmap */ NULL, /* free_bitmap */ - NULL, /* get_outline */ - NULL, /* free_outline */ NULL, /* anchor_point */ NULL, /* otf_capability */ NULL, /* otf_drive */ === modified file 'src/w32uniscribe.c' --- src/w32uniscribe.c 2014-01-01 07:43:34 +0000 +++ src/w32uniscribe.c 2014-07-04 02:28:54 +0000 @@ -604,8 +604,6 @@ int uniscribe_get_bitmap (struct font *font, unsigned code, struct font_bitmap *bitmap, int bits_per_pixel); void uniscribe_free_bitmap (struct font *font, struct font_bitmap *bitmap); - void * uniscribe_get_outline (struct font *font, unsigned code); - void uniscribe_free_outline (struct font *font, void *outline); int uniscribe_anchor_point (struct font *font, unsigned code, int index, int *x, int *y); int uniscribe_start_for_frame (struct frame *f); @@ -981,8 +979,6 @@ w32font_draw, NULL, /* get_bitmap */ NULL, /* free_bitmap */ - NULL, /* get_outline */ - NULL, /* free_outline */ NULL, /* anchor_point */ uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works. */ NULL, /* otf_drive - use shape instead. */ === modified file 'src/xfont.c' --- src/xfont.c 2014-06-10 03:32:36 +0000 +++ src/xfont.c 2014-07-04 02:28:54 +0000 @@ -146,7 +146,7 @@ xfont_encode_char, xfont_text_extents, xfont_draw, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, xfont_check, NULL, /* get_variation_glyphs */ NULL, /* filter_properties */ === modified file 'src/xselect.c' --- src/xselect.c 2014-06-22 05:00:14 +0000 +++ src/xselect.c 2014-07-04 02:28:54 +0000 @@ -1299,9 +1299,7 @@ if (total_size_max < bytes_remaining) goto size_overflow; total_size = bytes_remaining; - data = malloc (total_size + 1); - if (! data) - goto memory_exhausted; + data = xmalloc (total_size + 1); /* Now read, until we've gotten it all. */ while (bytes_remaining) @@ -1352,9 +1350,7 @@ if (remaining_lim < 0 || remaining_lim < bytes_remaining) goto size_overflow; total_size = offset + bytes_gotten + bytes_remaining; - data1 = realloc (data, total_size + 1); - if (! data1) - goto memory_exhausted; + data1 = xrealloc (data, total_size + 1); data = data1; } @@ -1386,14 +1382,10 @@ return; size_overflow: - free (data); + if (data) + xfree (data); unblock_input (); memory_full (SIZE_MAX); - - memory_exhausted: - free (data); - unblock_input (); - memory_full (total_size + 1); } /* Use xfree, not XFree, to free the data obtained with this function. */ ------------------------------------------------------------ revno: 117475 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16328 author: Phil Sainty committer: Stefan Monnier branch nick: trunk timestamp: Thu 2014-07-03 22:00:54 -0400 message: * lisp/emacs-lisp/lisp.el (narrow-to-defun-include-comments): New var. (narrow-to-defun): New arg include-comments, defaulting to it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-07-03 22:22:42 +0000 +++ lisp/ChangeLog 2014-07-04 02:00:54 +0000 @@ -1,3 +1,9 @@ +2014-07-04 Phil Sainty (tiny change) + + * emacs-lisp/lisp.el (narrow-to-defun-include-comments): New var. + (narrow-to-defun): New arg include-comments, defaulting to it + (bug#16328). + 2014-07-03 Stefan Monnier * rect.el (rectangle--highlight-for-redisplay): Don't pass `orig' with === modified file 'lisp/emacs-lisp/lisp.el' --- lisp/emacs-lisp/lisp.el 2014-05-26 02:28:09 +0000 +++ lisp/emacs-lisp/lisp.el 2014-07-04 02:00:54 +0000 @@ -522,11 +522,15 @@ (beginning-of-defun)) (re-search-backward "^\n" (- (point) 1) t))))) -(defun narrow-to-defun (&optional _arg) +(defvar narrow-to-defun-include-comments nil + "If non-nil, `narrow-to-defun' will also show comments preceding the defun.") + +(defun narrow-to-defun (&optional include-comments) "Make text outside current defun invisible. -The defun visible is the one that contains point or follows point. -Optional ARG is ignored." - (interactive) +The current defun is the one that contains point or follows point. +Preceding comments are included if INCLUDE-COMMENTS is non-nil. +Interactively, the behavior depends on `narrow-to-defun-include-comments'." + (interactive (list narrow-to-defun-include-comments)) (save-excursion (widen) (let ((opoint (point)) @@ -562,6 +566,18 @@ (setq end (point)) (beginning-of-defun) (setq beg (point))) + (when include-comments + (goto-char beg) + ;; Move back past all preceding comments (and whitespace). + (when (forward-comment -1) + (while (forward-comment -1)) + ;; Move forwards past any page breaks within these comments. + (when (and page-delimiter (not (string= page-delimiter ""))) + (while (re-search-forward page-delimiter beg t))) + ;; Lastly, move past any empty lines. + (skip-chars-forward "[:space:]\n") + (beginning-of-line) + (setq beg (point)))) (goto-char end) (re-search-backward "^\n" (- (point) 1) t) (narrow-to-region beg end)))) ------------------------------------------------------------ revno: 117474 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2014-07-03 18:22:42 -0400 message: * lisp/rect.el (rectangle--highlight-for-redisplay): Don't pass `orig' with different calling convention to rectangle--unhighlight-for-redisplay. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-07-03 09:27:02 +0000 +++ lisp/ChangeLog 2014-07-03 22:22:42 +0000 @@ -1,3 +1,8 @@ +2014-07-03 Stefan Monnier + + * rect.el (rectangle--highlight-for-redisplay): Don't pass `orig' with + different calling convention to rectangle--unhighlight-for-redisplay. + 2014-07-03 Michael Albinus * net/tramp.el (tramp-call-process): Handle error strings. === modified file 'lisp/rect.el' --- lisp/rect.el 2014-06-17 19:33:58 +0000 +++ lisp/rect.el 2014-07-03 22:22:42 +0000 @@ -719,7 +719,7 @@ ((not rectangle-mark-mode) (funcall orig start end window rol)) (rectangle--inhibit-region-highlight - (rectangle--unhighlight-for-redisplay orig rol) + (funcall redisplay-unhighlight-region-function rol) nil) ((and (eq 'rectangle (car-safe rol)) (eq (nth 1 rol) (buffer-chars-modified-tick)) ------------------------------------------------------------ revno: 117473 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2014-07-03 22:12:41 +0400 message: On MS-Windows, display busy cursor on all GUI frames. This is similar to what we have on X. Quickly tested by Dani Moncayo. * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used. (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window): Likewise. (hide_hourglass, show_hourglass): Redesign to match X counterparts. * xdisp.c (start_hourglass): Remove Windows-specific bits. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-07-03 12:20:00 +0000 +++ src/ChangeLog 2014-07-03 18:12:41 +0000 @@ -1,5 +1,15 @@ 2014-07-03 Dmitry Antipov + On MS-Windows, display busy cursor on all GUI frames. + This is similar to what we have on X. Quickly tested by Dani Moncayo. + * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used. + (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window): + Likewise. + (hide_hourglass, show_hourglass): Redesign to match X counterparts. + * xdisp.c (start_hourglass): Remove Windows-specific bits. + +2014-07-03 Dmitry Antipov + Use convenient alists to manage per-frame font driver-specific data. * frame.h (struct frame): Rename font_data_list to... [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now. === modified file 'src/w32fns.c' --- src/w32fns.c 2014-06-29 16:12:08 +0000 +++ src/w32fns.c 2014-07-03 18:12:41 +0000 @@ -89,9 +89,6 @@ extern const char *map_w32_filename (const char *, const char **); extern char * w32_strerror (int error_no); -/* If non-NULL, a handle to a frame where to display the hourglass cursor. */ -static HWND hourglass_hwnd = NULL; - #ifndef IDC_HAND #define IDC_HAND MAKEINTRESOURCE(32649) #endif @@ -233,10 +230,6 @@ extern void syms_of_w32uniscribe (void); extern int uniscribe_available; -/* Function prototypes for hourglass support. */ -static void w32_show_hourglass (struct frame *); -static void w32_hide_hourglass (void); - #ifdef WINDOWSNT /* From w32inevt.c */ extern int faked_key; @@ -5500,95 +5493,62 @@ Busy cursor ***********************************************************************/ -void -w32_note_current_window (void) -{ - struct frame * f = SELECTED_FRAME (); - - if (!FRAME_W32_P (f)) - return; - - hourglass_hwnd = FRAME_W32_WINDOW (f); -} +/* Display an hourglass cursor. Set the hourglass_p flag in display info + to indicate that an hourglass cursor is shown. */ void show_hourglass (struct atimer *timer) { - struct frame *f; - hourglass_atimer = NULL; - block_input (); - f = x_window_to_frame (&one_w32_display_info, - hourglass_hwnd); - - if (f) - f->output_data.w32->hourglass_p = 0; - else - f = SELECTED_FRAME (); - - if (!FRAME_W32_P (f)) - { - unblock_input (); - return; - } - - w32_show_hourglass (f); - unblock_input (); -} - -void -hide_hourglass (void) -{ - block_input (); - w32_hide_hourglass (); - unblock_input (); -} - - -/* Display an hourglass cursor. Set the hourglass_p flag in display info - to indicate that an hourglass cursor is shown. */ - -static void -w32_show_hourglass (struct frame *f) -{ if (!hourglass_shown_p) { - f->output_data.w32->hourglass_p = 1; - if (!menubar_in_use && !current_popup_menu) - SetCursor (f->output_data.w32->hourglass_cursor); + Lisp_Object tail, frame; + + block_input (); + FOR_EACH_FRAME (tail, frame) + { + struct frame *f = XFRAME (frame); + + if (FRAME_W32_P (f) && !menubar_in_use && !current_popup_menu) + { + f->output_data.w32->hourglass_p = 1; + SetCursor (f->output_data.w32->hourglass_cursor); + } + } + unblock_input (); hourglass_shown_p = 1; } } - /* Hide the hourglass cursor on all frames, if it is currently shown. */ -static void -w32_hide_hourglass (void) +void +hide_hourglass (void) { if (hourglass_shown_p) { - struct frame *f = x_window_to_frame (&one_w32_display_info, - hourglass_hwnd); - if (f) - f->output_data.w32->hourglass_p = 0; - else - /* If frame was deleted, restore to selected frame's cursor. */ - f = SELECTED_FRAME (); - - if (FRAME_W32_P (f)) - SetCursor (f->output_data.w32->current_cursor); - else - /* No cursors on non GUI frames - restore to stock arrow cursor. */ - SetCursor (w32_load_cursor (IDC_ARROW)); - + Lisp_Object tail, frame; + + block_input (); + FOR_EACH_FRAME (tail, frame) + { + struct frame *f = XFRAME (frame); + + if (FRAME_W32_P (f)) + { + f->output_data.w32->hourglass_p = 0; + SetCursor (f->output_data.w32->current_cursor); + } + else + /* No cursors on non GUI frames - restore to stock arrow cursor. */ + SetCursor (w32_load_cursor (IDC_ARROW)); + } + unblock_input (); hourglass_shown_p = 0; } } - - /*********************************************************************** Tool tips ***********************************************************************/ @@ -8415,9 +8375,6 @@ #endif defsubr (&Sset_message_beep); - - hourglass_hwnd = NULL; - defsubr (&Sx_show_tip); defsubr (&Sx_hide_tip); tip_timer = Qnil; === modified file 'src/xdisp.c' --- src/xdisp.c 2014-07-03 06:00:53 +0000 +++ src/xdisp.c 2014-07-03 18:12:41 +0000 @@ -30683,13 +30683,6 @@ else delay = make_timespec (DEFAULT_HOURGLASS_DELAY, 0); -#ifdef HAVE_NTGUI - { - extern void w32_note_current_window (void); - w32_note_current_window (); - } -#endif /* HAVE_NTGUI */ - hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay, show_hourglass, NULL); } ------------------------------------------------------------ revno: 117472 committer: Kelvin White branch nick: trunk timestamp: Thu 2014-07-03 08:30:26 -0400 message: Fix nick duplication in format-@nick diff: === modified file 'lisp/erc/erc.el' --- lisp/erc/erc.el 2014-06-19 17:22:31 +0000 +++ lisp/erc/erc.el 2014-07-03 12:30:26 +0000 @@ -9,7 +9,7 @@ ;; Andreas Fuchs (afs@void.at) ;; Gergely Nagy (algernon@midgard.debian.net) ;; David Edmondson (dme@dme.org) -;; Kelvin White +;; Kelvin White (kwhite@gnu.org) ;; Maintainer: emacs-devel@gnu.org ;; Keywords: IRC, chat, client, Internet ;; Version: 5.3 @@ -4252,7 +4252,7 @@ (let ((nick (erc-server-user-nickname user))) (concat (erc-propertize (erc-get-user-mode-prefix nick) - 'face 'erc-nick-prefix-face) nick nick)))) + 'face 'erc-nick-prefix-face) nick)))) (defun erc-format-my-nick () "Return the beginning of this user's message, correctly propertized." ------------------------------------------------------------ revno: 117471 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2014-07-03 16:20:00 +0400 message: Use convenient alists to manage per-frame font driver-specific data. * frame.h (struct frame): Rename font_data_list to... [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now. * font.h (struct font_data_list): Remove; no longer need a special data type. (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]: Adjust prototypes. * font.c (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list management. * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame): Related users changed. * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise. Prefer convenient xmalloc and xfree. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-07-03 06:00:53 +0000 +++ src/ChangeLog 2014-07-03 12:20:00 +0000 @@ -1,3 +1,20 @@ +2014-07-03 Dmitry Antipov + + Use convenient alists to manage per-frame font driver-specific data. + * frame.h (struct frame): Rename font_data_list to... + [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now. + * font.h (struct font_data_list): Remove; no longer need a special + data type. + (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]: + Adjust prototypes. + * font.c (font_put_frame_data, font_get_frame_data) + [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list + management. + * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame): + Related users changed. + * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise. + Prefer convenient xmalloc and xfree. + 2014-07-03 Eli Zaretskii * dispnew.c (prepare_desired_row): Accept 2 additional arguments: === modified file 'src/font.c' --- src/font.c 2014-06-21 19:45:59 +0000 +++ src/font.c 2014-07-03 12:20:00 +0000 @@ -3539,53 +3539,34 @@ return active_drivers; } -int -font_put_frame_data (struct frame *f, struct font_driver *driver, void *data) +#if defined (HAVE_XFT) || defined (HAVE_FREETYPE) + +void +font_put_frame_data (struct frame *f, Lisp_Object driver, void *data) { - struct font_data_list *list, *prev; - - for (prev = NULL, list = f->font_data_list; list; - prev = list, list = list->next) - if (list->driver == driver) - break; - if (! data) - { - if (list) - { - if (prev) - prev->next = list->next; - else - f->font_data_list = list->next; - xfree (list); - } - return 0; - } - - if (! list) - { - list = xmalloc (sizeof *list); - list->driver = driver; - list->next = f->font_data_list; - f->font_data_list = list; - } - list->data = data; - return 0; + Lisp_Object val = assq_no_quit (driver, f->font_data); + + if (!data) + f->font_data = Fdelq (val, f->font_data); + else + { + if (NILP (val)) + f->font_data = Fcons (Fcons (driver, make_save_ptr (data)), + f->font_data); + else + XSETCDR (val, make_save_ptr (data)); + } } - void * -font_get_frame_data (struct frame *f, struct font_driver *driver) +font_get_frame_data (struct frame *f, Lisp_Object driver) { - struct font_data_list *list; + Lisp_Object val = assq_no_quit (driver, f->font_data); - for (list = f->font_data_list; list; list = list->next) - if (list->driver == driver) - break; - if (! list) - return NULL; - return list->data; + return NILP (val) ? NULL : XSAVE_POINTER (XCDR (val), 0); } +#endif /* HAVE_XFT || HAVE_FREETYPE */ /* Sets attributes on a font. Any properties that appear in ALIST and BOOLEAN_PROPERTIES or NON_BOOLEAN_PROPERTIES are set on the font. === modified file 'src/font.h' --- src/font.h 2014-06-10 03:32:36 +0000 +++ src/font.h 2014-07-03 12:20:00 +0000 @@ -723,20 +723,6 @@ struct font_driver_list *next; }; - -/* Chain of arbitrary data specific to each font driver. - Each frame has its own font data list at F->font_data_list. */ - -struct font_data_list -{ - /* Pointer to the font driver. */ - struct font_driver *driver; - /* Data specific to the font driver. */ - void *data; - /* Pointer to the next element of the chain. */ - struct font_data_list *next; -}; - extern Lisp_Object copy_font_spec (Lisp_Object); extern Lisp_Object merge_font_spec (Lisp_Object, Lisp_Object); @@ -809,11 +795,10 @@ extern Lisp_Object font_put_extra (Lisp_Object font, Lisp_Object prop, Lisp_Object val); -extern int font_put_frame_data (struct frame *f, - struct font_driver *driver, - void *data); -extern void *font_get_frame_data (struct frame *f, - struct font_driver *driver); +#if defined (HAVE_XFT) || defined (HAVE_FREETYPE) +extern void font_put_frame_data (struct frame *, Lisp_Object, void *); +extern void *font_get_frame_data (struct frame *f, Lisp_Object); +#endif /* HAVE_XFT || HAVE_FREETYPE */ extern void font_filter_properties (Lisp_Object font, Lisp_Object alist, === modified file 'src/frame.h' --- src/frame.h 2014-06-17 16:09:19 +0000 +++ src/frame.h 2014-07-03 12:20:00 +0000 @@ -159,6 +159,11 @@ tool bar only supports top. */ Lisp_Object tool_bar_position; +#if defined (HAVE_XFT) || defined (HAVE_FREETYPE) + /* List of data specific to font-driver and frame, but common to faces. */ + Lisp_Object font_data; +#endif + /* Beyond here, there should be no more Lisp_Object components. */ /* Cache of realized faces. */ @@ -328,9 +333,6 @@ /* List of font-drivers available on the frame. */ struct font_driver_list *font_driver_list; - /* List of data specific to font-driver and frame, but common to - faces. */ - struct font_data_list *font_data_list; /* Total width of fringes reserved for drawing truncation bitmaps, continuation bitmaps and alike. The width is in canonical char === modified file 'src/ftxfont.c' --- src/ftxfont.c 2014-06-08 18:27:22 +0000 +++ src/ftxfont.c 2014-07-03 12:20:00 +0000 @@ -59,7 +59,7 @@ XColor color; XGCValues xgcv; int i; - struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver); + struct ftxfont_frame_data *data = font_get_frame_data (f, Qftx); struct ftxfont_frame_data *prev = NULL, *this = NULL, *new; if (data) @@ -78,19 +78,11 @@ } } - new = malloc (sizeof *new); - if (! new) - return NULL; + new = xmalloc (sizeof *new); new->next = this; if (prev) - { prev->next = new; - } - else if (font_put_frame_data (f, &ftxfont_driver, new) < 0) - { - free (new); - return NULL; - } + font_put_frame_data (f, Qftx, new); new->colors[0].pixel = background; new->colors[1].pixel = foreground; @@ -123,8 +115,8 @@ if (prev) prev->next = new->next; else if (data) - font_put_frame_data (f, &ftxfont_driver, new->next); - free (new); + font_put_frame_data (f, Qftx, new->next); + xfree (new); return NULL; } return new->gcs; @@ -337,7 +329,7 @@ static int ftxfont_end_for_frame (struct frame *f) { - struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver); + struct ftxfont_frame_data *data = font_get_frame_data (f, Qftx); block_input (); while (data) @@ -347,11 +339,11 @@ for (i = 0; i < 6; i++) XFreeGC (FRAME_X_DISPLAY (f), data->gcs[i]); - free (data); + xfree (data); data = next; } unblock_input (); - font_put_frame_data (f, &ftxfont_driver, NULL); + font_put_frame_data (f, Qftx, NULL); return 0; } === modified file 'src/xftfont.c' --- src/xftfont.c 2014-06-16 08:49:09 +0000 +++ src/xftfont.c 2014-07-03 12:20:00 +0000 @@ -593,7 +593,7 @@ static XftDraw * xftfont_get_xft_draw (struct frame *f) { - XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver); + XftDraw *xft_draw = font_get_frame_data (f, Qxft); if (! xft_draw) { @@ -604,7 +604,7 @@ FRAME_X_COLORMAP (f)); unblock_input (); eassert (xft_draw != NULL); - font_put_frame_data (f, &xftfont_driver, xft_draw); + font_put_frame_data (f, Qxft, xft_draw); } return xft_draw; } @@ -680,14 +680,14 @@ /* Don't do anything if display is dead */ if (FRAME_X_DISPLAY (f) == NULL) return 0; - xft_draw = font_get_frame_data (f, &xftfont_driver); + xft_draw = font_get_frame_data (f, Qxft); if (xft_draw) { block_input (); XftDrawDestroy (xft_draw); unblock_input (); - font_put_frame_data (f, &xftfont_driver, NULL); + font_put_frame_data (f, Qxft, NULL); } return 0; } ------------------------------------------------------------ revno: 117470 committer: Michael Albinus branch nick: trunk timestamp: Thu 2014-07-03 11:27:02 +0200 message: * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. * net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. * net/tramp.el (tramp-call-process): Handle error strings. * net/trampver.el: Update release number. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-07-03 06:00:53 +0000 +++ lisp/ChangeLog 2014-07-03 09:27:02 +0000 @@ -1,3 +1,14 @@ +2014-07-03 Michael Albinus + + * net/tramp.el (tramp-call-process): Handle error strings. + + * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. + + * net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime) + (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. + + * net/trampver.el: Update release number. + 2014-07-03 Juri Linkov * desktop.el (desktop-save): Rename arg `auto-save' to === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2014-06-24 07:15:26 +0000 +++ lisp/net/tramp-adb.el 2014-07-03 09:27:02 +0000 @@ -458,9 +458,7 @@ (insert " " (mapconcat 'identity sorted-lines "\n "))) ;; Add final newline. (goto-char (point-max)) - (unless (= (point) (line-beginning-position)) - (insert "\n")))) - + (unless (bolp) (insert "\n")))) (defun tramp-adb-ls-output-time-less-p (a b) "Sort \"ls\" output by time, descending." === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2014-07-01 14:06:11 +0000 +++ lisp/net/tramp-sh.el 2014-07-03 09:27:02 +0000 @@ -1265,8 +1265,7 @@ (format "%s -ild %s" (tramp-get-ls-command v) (tramp-shell-quote-argument localname))) - (setq attr (buffer-substring (point) - (progn (end-of-line) (point))))) + (setq attr (buffer-substring (point) (point-at-eol)))) (tramp-set-file-property v localname "visited-file-modtime-ild" attr)) (when (boundp 'last-coding-system-used) @@ -1317,8 +1316,7 @@ (tramp-get-ls-command v) (tramp-shell-quote-argument localname))) (with-current-buffer (tramp-get-buffer v) - (setq attr (buffer-substring - (point) (progn (end-of-line) (point))))) + (setq attr (buffer-substring (point) (point-at-eol)))) (equal attr (tramp-get-file-property === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2014-06-15 15:47:35 +0000 +++ lisp/net/tramp.el 2014-07-03 09:27:02 +0000 @@ -4127,10 +4127,9 @@ (defun tramp-call-process (vec program &optional infile destination display &rest args) "Calls `call-process' on the local host. -This is needed because for some Emacs flavors Tramp has -defadvised `call-process' to behave like `process-file'. The -Lisp error raised when PROGRAM is nil is trapped also, returning 1. -Furthermore, traces are written with verbosity of 6." +It always returns a return code. The Lisp error raised when +PROGRAM is nil is trapped also, returning 1. Furthermore, traces +are written with verbosity of 6." (let ((v (or vec (vector tramp-current-method tramp-current-user tramp-current-host nil nil))) @@ -4144,6 +4143,9 @@ (setq result (apply 'call-process program infile (or destination t) display args)) + ;; `result' could also be an error string. + (when (stringp result) + (signal 'file-error (list result))) (with-current-buffer (if (bufferp destination) destination (current-buffer)) (tramp-message v 6 "%d\n%s" result (buffer-string)))) === modified file 'lisp/net/trampver.el' --- lisp/net/trampver.el 2014-06-15 15:47:35 +0000 +++ lisp/net/trampver.el 2014-07-03 09:27:02 +0000 @@ -24,14 +24,14 @@ ;;; Code: -;; In the Tramp CVS repository, the version number and the bug report +;; In the Tramp GIT repository, the version number and the bug report ;; address are auto-frobbed from configure.ac, so you should edit that ;; file and run "autoconf && ./configure" to change them. (X)Emacs ;; version check is defined in macro AC_EMACS_INFO of aclocal.m4; ;; should be changed only there. ;;;###tramp-autoload -(defconst tramp-version "2.2.10" +(defconst tramp-version "2.2.11-pre" "This version of Tramp.") ;;;###tramp-autoload @@ -44,7 +44,7 @@ (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" - (format "Tramp 2.2.10 is not fit for %s" + (format "Tramp 2.2.11-pre is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) (unless (string-match "\\`ok\\'" x) (error "%s" x))) ------------------------------------------------------------ revno: 117469 committer: Michael Albinus branch nick: trunk timestamp: Thu 2014-07-03 11:10:05 +0200 message: * trampver.texi: Update release number. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-07-03 06:00:53 +0000 +++ doc/misc/ChangeLog 2014-07-03 09:10:05 +0000 @@ -1,3 +1,7 @@ +2014-07-03 Michael Albinus + + * trampver.texi: Update release number. + 2014-07-03 Glenn Morris * info.texi, mh-e.texi: "Online help" doesn't mean what it === modified file 'doc/misc/trampver.texi' --- doc/misc/trampver.texi 2014-06-15 15:09:22 +0000 +++ doc/misc/trampver.texi 2014-07-03 09:10:05 +0000 @@ -5,10 +5,10 @@ @c Copyright (C) 2003-2014 Free Software Foundation, Inc. @c See file doclicense.texi for copying conditions. -@c In the Tramp CVS, the version number is auto-frobbed from +@c In the Tramp GIT, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.2.10 +@set trampver 2.2.11-pre @c Other flags from configuration @set instprefix /usr/local ------------------------------------------------------------ revno: 117468 [merge] committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-07-02 23:00:53 -0700 message: Merge from emacs-24; up to r117340 diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-06-23 06:43:20 +0000 +++ doc/emacs/ChangeLog 2014-07-03 06:00:53 +0000 @@ -1,3 +1,9 @@ +2014-07-03 Glenn Morris + + * help.texi (Misc Help): + * trouble.texi (Checklist): "Online" help doesn't mean what it + used to any more. + 2014-06-23 Glenn Morris * Makefile.in (%.texi): Disable implicit rules. === modified file 'doc/emacs/help.texi' --- doc/emacs/help.texi 2014-06-08 23:41:43 +0000 +++ doc/emacs/help.texi 2014-07-03 06:00:53 +0000 @@ -490,8 +490,7 @@ @kindex C-h i @findex info @cindex Info -@cindex manuals, on-line -@cindex on-line manuals +@cindex manuals, included @kbd{C-h i} (@code{info}) runs the Info program, which browses structured documentation files. The entire Emacs manual is available within Info, along with many other manuals for the GNU system. Type === modified file 'doc/emacs/trouble.texi' --- doc/emacs/trouble.texi 2014-05-02 12:28:10 +0000 +++ doc/emacs/trouble.texi 2014-06-29 02:33:50 +0000 @@ -847,7 +847,7 @@ @item If the bug is that the Emacs Manual or the Emacs Lisp Reference Manual fails to describe the actual behavior of Emacs, or that the text is -confusing, copy in the text from the online manual which you think is +confusing, copy in the text from the manual which you think is at fault. If the section is small, just the section name is enough. @item === modified file 'doc/lispintro/ChangeLog' --- doc/lispintro/ChangeLog 2014-06-23 06:43:20 +0000 +++ doc/lispintro/ChangeLog 2014-07-03 06:00:53 +0000 @@ -1,3 +1,8 @@ +2014-07-03 Glenn Morris + + * emacs-lisp-intro.texi (Note for Novices, Finding More, Conclusion): + "Online" help doesn't mean what it used to any more. + 2014-06-23 Glenn Morris * Makefile.in (%.texi): Disable implicit rules. === modified file 'doc/lispintro/emacs-lisp-intro.texi' --- doc/lispintro/emacs-lisp-intro.texi 2014-06-10 02:20:31 +0000 +++ doc/lispintro/emacs-lisp-intro.texi 2014-07-03 06:00:53 +0000 @@ -903,7 +903,7 @@ If you don't know GNU Emacs, you can still read this document profitably. However, I recommend you learn Emacs, if only to learn to move around your computer screen. You can teach yourself how to use -Emacs with the on-line tutorial. To use it, type @kbd{C-h t}. (This +Emacs with the built-in tutorial. To use it, type @kbd{C-h t}. (This means you press and release the @key{CTRL} key and the @kbd{h} at the same time, and then press and release @kbd{t}.) @@ -4657,7 +4657,7 @@ rather than a general library. Each library, or file, contains functions that relate to a particular topic or activity, such as @file{abbrev.el} for handling abbreviations and other typing -shortcuts, and @file{help.el} for on-line help. (Sometimes several +shortcuts, and @file{help.el} for help. (Sometimes several libraries provide code for a single activity, as the various @file{rmail@dots{}} files provide code for reading electronic mail.) In @cite{The GNU Emacs Manual}, you will see sentences such as ``The @@ -18685,9 +18685,9 @@ experts, but for people who know what you know. (The @cite{Reference Manual} comes with the standard GNU Emacs distribution. Like this introduction, it comes as a Texinfo source file, so you can read it -on-line and as a typeset, printed book.) +on your computer and as a typeset, printed book.) -Go to the other on-line help that is part of GNU Emacs: the on-line +Go to the other built-in help that is part of GNU Emacs: the built-in documentation for all functions and variables, and @code{find-tag}, the program that takes you to sources. === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-07-02 01:49:31 +0000 +++ doc/lispref/ChangeLog 2014-07-03 06:00:53 +0000 @@ -1,3 +1,8 @@ +2014-07-03 Glenn Morris + + * help.texi (Help Functions): "Online" help doesn't mean what it + used to any more. + 2014-07-02 Stefan Monnier * keymaps.texi (Key Lookup): Remove mention of indirect entries. === modified file 'doc/lispref/help.texi' --- doc/lispref/help.texi 2014-03-16 09:26:58 +0000 +++ doc/lispref/help.texi 2014-06-29 02:33:50 +0000 @@ -508,7 +508,7 @@ @node Help Functions @section Help Functions - Emacs provides a variety of on-line help functions, all accessible to + Emacs provides a variety of built-in help functions, all accessible to the user as subcommands of the prefix @kbd{C-h}. For more information about them, see @ref{Help, , Help, emacs, The GNU Emacs Manual}. Here we describe some program-level interfaces to the same information. === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-06-24 07:15:26 +0000 +++ doc/misc/ChangeLog 2014-07-03 06:00:53 +0000 @@ -1,3 +1,10 @@ +2014-07-03 Glenn Morris + + * info.texi, mh-e.texi: "Online help" doesn't mean what it + used to any more. + + * idlwave.texi (Introduction): Comment out dead http screenshot links. + 2014-06-24 Leo Liu * dired-x.texi (Omitting Files in Dired, Omitting Variables): === modified file 'doc/misc/idlwave.texi' --- doc/misc/idlwave.texi 2014-06-10 02:20:31 +0000 +++ doc/misc/idlwave.texi 2014-07-03 06:00:53 +0000 @@ -239,24 +239,27 @@ And much, much more... @end itemize +@c Dead links, 2014/06. +@ignore @ifnottex @cindex Screenshots Here are a number of screenshots showing IDLWAVE in action: @itemize @bullet @item -@uref{http://idlwave.org/screenshots/emacs_21_nav.gif,An IDLWAVE buffer} -@item -@uref{http://idlwave.org/screenshots/emacs_21_keys.gif,A keyword being completed} -@item -@uref{http://idlwave.org/screenshots/emacs_21_help.gif,Online help text.} -@item -@uref{http://idlwave.org/screenshots/emacs_21_ri.gif,Routine information displayed} -@item -@uref{http://idlwave.org/screenshots/emacs_21_bp.gif,Debugging code +@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_nav.gif,An IDLWAVE buffer} +@item +@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_keys.gif,A keyword being completed} +@item +@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_help.gif,Online help text.} +@item +@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_ri.gif,Routine information displayed} +@item +@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_bp.gif,Debugging code stopped at a breakpoint} @end itemize @end ifnottex +@end ignore IDLWAVE is the distant successor to the @file{idl.el} and @file{idl-shell.el} files written by Chris Chase. The modes and files === modified file 'doc/misc/info.texi' --- doc/misc/info.texi 2014-06-08 19:30:13 +0000 +++ doc/misc/info.texi 2014-06-29 02:33:50 +0000 @@ -12,7 +12,7 @@ @comment %**end of header @copying -This file describes how to use Info, the on-line, menu-driven GNU +This file describes how to use Info, the menu-driven GNU documentation system. Copyright @copyright{} 1989, 1992, 1996--2014 Free Software Foundation, Inc. @@ -51,7 +51,7 @@ @node Top @top Info: An Introduction -The GNU Project distributes most of its on-line manuals in the +The GNU Project distributes most of its manuals in the @dfn{Info format}, which you read using an @dfn{Info reader}. You are probably using an Info reader to read this now. @@ -98,7 +98,7 @@ about them. Reading it on paper or with an HTML browser is less effective, since you must take it on faith that the commands described really do what the manual says. By all means go through this manual -now that you have it; but please try going through the on-line version +now that you have it; but please try going through the Info version as well. @cindex Info reader, how to invoke === modified file 'doc/misc/mh-e.texi' --- doc/misc/mh-e.texi 2014-06-10 02:20:31 +0000 +++ doc/misc/mh-e.texi 2014-07-03 06:00:53 +0000 @@ -227,7 +227,7 @@ @kindex C-h t If you don't already use GNU Emacs but want to learn more, you can -read an online tutorial by starting GNU Emacs and typing @kbd{C-h t} +read a built-in tutorial by starting GNU Emacs and typing @kbd{C-h t} (@code{help-with-tutorial}). (To learn about this notation, see @ref{Conventions}.) If you want to take the plunge, consult the @iftex @@ -1066,9 +1066,9 @@ about every MH-E command and option. @cindex Emacs, info -@cindex Emacs, online help +@cindex Emacs, built-in help @cindex info -@cindex online help +@cindex built-in help @findex describe-mode @findex mh-help @kindex ? @@ -1083,12 +1083,12 @@ like to rebind the keys, the command summaries also list the associated Emacs Lisp function. Furthermore, even if you're stranded on a desert island with a laptop and are without your manuals, you can -get a summary of all these commands with GNU Emacs online help: use +get a summary of all these commands with GNU Emacs built-in help: use @kbd{C-h m} (@code{describe-mode}) for a brief summary of commands, @kbd{?} (@code{mh-help}) for an even briefer summary@footnote{This help appears in a buffer called @file{*MH-E Help*} (@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h -i} to read this manual via Info. The online help is quite good; try +i} to read this manual via Info. The built-in help is quite good; try running @kbd{C-h C-h}. This brings up a list of available help topics, one of which displays the documentation for a given key (like @kbd{C-h k C-n}). Another useful help feature is to view the manual section @@ -1120,21 +1120,21 @@ @c Yes, some of the stuff in the following sections is redundant, but @c TeX barfs if the @ifs are inside the @footnote. @iftex -@footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available -online in the Info system by typing @kbd{C-h i m Emacs Lisp +@footnote{The @cite{GNU Emacs Lisp Reference Manual} should be available +via the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}. It is also available online at @* @uref{http://www.gnu.org/software/emacs/manual/elisp.html}.} @end iftex @ifinfo @footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU -Emacs Lisp Reference Manual}, which may be available online in the +Emacs Lisp Reference Manual}, which should be available via the Info system. It is also available online at @uref{http://www.gnu.org/software/emacs/manual/elisp.html}.} @end ifinfo @ifhtml @footnote{The @uref{http://www.gnu.org/software/emacs/manual/elisp.html, -The GNU Emacs Lisp Reference Manual} may also be available online in +The GNU Emacs Lisp Reference Manual} should be available via the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}.} @end ifhtml and you can look at the code itself for examples. Look in the Emacs @@ -1142,7 +1142,7 @@ @file{/usr/local/share/emacs/lisp/mh-e}) and find all the @file{mh-*.el} files there. When calling MH-E and other Emacs Lisp functions directly from Emacs Lisp code, you'll need to know the correct arguments. Use -the online help for this. For example, try @kbd{C-h f +the built-in help for this. For example, try @kbd{C-h f mh-execute-commands @key{RET}}. If you write your own functions, please do not prefix your symbols (variables and functions) with @samp{mh-}. This prefix is reserved for the MH-E package. To avoid @@ -6405,7 +6405,7 @@ The Menu Bar} in @cite{The GNU Emacs Manual}. @end ifhtml -The Emacs manual describes how to get online help for a particular +The Emacs manual describes how to get help for a particular menu item. You can also look up a menu item in the index of this manual in two ways: all of the menu items are listed alphabetically, and you can also browse all of the items under the index entry === modified file 'etc/ChangeLog' --- etc/ChangeLog 2014-06-28 17:27:29 +0000 +++ etc/ChangeLog 2014-07-03 06:00:53 +0000 @@ -1,3 +1,8 @@ +2014-07-03 Glenn Morris + + * refcards/calccard.tex (section{Getting Help}): + Meaning of "on-line" has changed. + 2014-06-28 Glenn Morris * publicsuffix.txt: Update from source. === modified file 'etc/refcards/calccard.tex' --- etc/refcards/calccard.tex 2014-01-01 07:43:34 +0000 +++ etc/refcards/calccard.tex 2014-06-29 02:33:50 +0000 @@ -297,7 +297,7 @@ \key{describe key briefly}{h c} \key{describe key fully}{h k} \key{describe function or command}{h f} -\key{read on-line manual}{h i{\rm\enskip or\enskip}\calcprefix i} +\key{read Info manual}{h i{\rm\enskip or\enskip}\calcprefix i} \key{read full Calc summary}{h s{\rm\enskip or\enskip}\calcprefix s} \section{Error Recovery} === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-07-02 00:57:53 +0000 +++ lisp/ChangeLog 2014-07-03 06:00:53 +0000 @@ -1,3 +1,56 @@ +2014-07-03 Juri Linkov + + * desktop.el (desktop-save): Rename arg `auto-save' to + `only-if-changed'. Doc fix. (Bug#17873) + +2014-07-03 Stefan Monnier + + * mouse.el (mouse-yank-primary, mouse-yank-secondary): + Use insert-for-yank (bug#17271). + +2014-07-03 Leo Liu + + * emacs-lisp/pp.el (pp-eval-expression, pp-eval-last-sexp): + Support lexical-binding. + +2014-07-03 Stefan Monnier + + * vc/log-edit.el (log-edit-goto-eoh): New function. + (log-edit--match-first-line): Use it (bug#17861). + +2014-07-03 Glenn Morris + + * vc/log-edit.el (log-edit-hook): Add missing :version. + +2014-07-03 Fabián Ezequiel Gallina + + * progmodes/python.el (python-indent-post-self-insert-function): + Enhancements to electric indentation behavior inside + parens. (Bug#17658) + +2014-07-03 Stefan Monnier + + * ps-def.el (ps-generate-postscript-with-faces1): Don't mess with + buffer-invisibility-spec (bug#17867). + +2014-07-03 Andreas Schwab + + * vc/vc-git.el (vc-git-checkin): When operating on the whole tree + pass "-a". + +2014-07-03 Glenn Morris + + * cus-edit.el (help): + * finder.el (finder-known-keywords): + * help.el (help-for-help-internal): + * vc/ediff-mult.el (ediff-meta-buffer-verbose-message) + (ediff-redraw-registry-buffer): + * vc/ediff-ptch.el (ediff-patch-file-internal): + Doc fixes re "online" help. (Bug#17803) + + * progmodes/idlwave.el (idlwave): Update url-link for custom group. + (idlwave-mode): Doc URL update. + 2014-07-01 Juri Linkov * man.el: Display man pages immediately and use process-filter === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2014-02-10 01:34:22 +0000 +++ lisp/cus-edit.el 2014-06-29 02:33:50 +0000 @@ -324,7 +324,7 @@ :group 'emacs) (defgroup help nil - "Support for on-line help systems." + "Support for Emacs help systems." :group 'emacs) (defgroup multimedia nil === modified file 'lisp/desktop.el' --- lisp/desktop.el 2014-06-24 23:23:41 +0000 +++ lisp/desktop.el 2014-07-02 23:45:12 +0000 @@ -942,12 +942,13 @@ :predicate #'desktop--check-dont-save)))) ;;;###autoload -(defun desktop-save (dirname &optional release auto-save) +(defun desktop-save (dirname &optional release only-if-changed) "Save the desktop in a desktop file. Parameter DIRNAME specifies where to save the desktop file. Optional parameter RELEASE says whether we're done with this desktop. -If AUTO-SAVE is non-nil, compare the saved contents to the one last saved, -and don't save the buffer if they are the same." +If ONLY-IF-CHANGED is non-nil, compare the current desktop information +to that in the desktop file, and if the desktop information has not +changed since it was last saved then do not rewrite the file." (interactive (list ;; Or should we just use (car desktop-path)? (let ((default (if (member "." desktop-path) @@ -1020,7 +1021,7 @@ (setq default-directory desktop-dirname) ;; When auto-saving, avoid writing if nothing has changed since the last write. - (let* ((beg (and auto-save + (let* ((beg (and only-if-changed (save-excursion (goto-char (point-min)) ;; Don't check the header with changing timestamp === modified file 'lisp/ehelp.el' --- lisp/ehelp.el 2014-02-10 01:34:22 +0000 +++ lisp/ehelp.el 2014-06-29 02:33:50 +0000 @@ -25,7 +25,7 @@ ;;; Commentary: ;; This package provides a pre-packaged `Electric Help Mode' for -;; browsing on-line help screens. There is one entry point, +;; browsing Emacs help screens. There is one entry point, ;; `with-electric-help'; all you have to give it is a no-argument ;; function that generates the actual text of the help into the current ;; buffer. === modified file 'lisp/emacs-lisp/pp.el' --- lisp/emacs-lisp/pp.el 2014-01-01 07:43:34 +0000 +++ lisp/emacs-lisp/pp.el 2014-07-02 05:05:50 +0000 @@ -129,7 +129,7 @@ (interactive (list (read--expression "Eval: "))) (message "Evaluating...") - (setq values (cons (eval expression) values)) + (setq values (cons (eval expression lexical-binding) values)) (pp-display-expression (car values) "*Pp Eval Output*")) ;;;###autoload @@ -165,7 +165,7 @@ Ignores leading comment characters." (interactive "P") (if arg - (insert (pp-to-string (eval (pp-last-sexp)))) + (insert (pp-to-string (eval (pp-last-sexp) lexical-binding))) (pp-eval-expression (pp-last-sexp)))) ;;;###autoload === modified file 'lisp/emulation/viper.el' --- lisp/emulation/viper.el 2014-01-27 02:02:28 +0000 +++ lisp/emulation/viper.el 2014-06-29 02:33:50 +0000 @@ -107,7 +107,7 @@ ;; ---------------- ;; Bug reports and ideas contributed by many users have helped ;; improve Viper and the various versions of VIP. -;; See the on-line manual for a complete list of contributors. +;; See the manual for a complete list of contributors. ;; ;; ;;; Notes: === modified file 'lisp/finder.el' --- lisp/finder.el 2014-03-14 20:41:01 +0000 +++ lisp/finder.el 2014-06-29 02:33:50 +0000 @@ -52,7 +52,7 @@ (frames . "Emacs frames and window systems") (games . "games, jokes and amusements") (hardware . "interfacing with system hardware") - (help . "on-line help systems") + (help . "Emacs help systems") (hypermedia . "links between text or other media types") (i18n . "internationalization and character-set support") (internal . "code for Emacs internals, build process, defaults") === modified file 'lisp/help.el' --- lisp/help.el 2014-06-13 09:00:08 +0000 +++ lisp/help.el 2014-07-03 06:00:53 +0000 @@ -23,7 +23,7 @@ ;;; Commentary: -;; This code implements GNU Emacs's on-line help system, the one invoked by +;; This code implements GNU Emacs's built-in help system, the one invoked by ;; `M-x help-for-help'. ;;; Code: @@ -198,13 +198,13 @@ documentation matches the PATTERN (a list of words or a regexp). e Go to the *Messages* buffer which logs echo-area messages. f FUNCTION Display documentation for the given function. -F COMMAND Show the on-line manual's section that describes the command. +F COMMAND Show the Emacs manual's section that describes the command. g Display information about the GNU project. h Display the HELLO file which illustrates various scripts. -i Start the Info documentation reader: read on-line manuals. +i Start the Info documentation reader: read included manuals. I METHOD Describe a specific input method, or RET for current. k KEYS Display the full documentation for the key sequence. -K KEYS Show the on-line manual's section for the command bound to KEYS. +K KEYS Show the Emacs manual's section for the command bound to KEYS. l Show last 300 input keystrokes (lossage). L LANG-ENV Describes a specific language environment, or RET for current. m Display documentation of current minor modes and current major mode, @@ -214,7 +214,7 @@ P PACKAGE Describe the given Emacs Lisp package. r Display the Emacs manual in Info mode. s Display contents of current syntax table, plus explanations. -S SYMBOL Show the section for the given symbol in the on-line manual +S SYMBOL Show the section for the given symbol in the Info manual for the programming language used in this buffer. t Start the Emacs learn-by-doing tutorial. v VARIABLE Display the given variable's documentation and value. === modified file 'lisp/mouse.el' --- lisp/mouse.el 2014-06-23 15:32:24 +0000 +++ lisp/mouse.el 2014-07-03 06:00:53 +0000 @@ -1079,7 +1079,7 @@ (unless primary (error "No selection is available")) (push-mark (point)) - (insert primary))) + (insert-for-yank primary))) (defun mouse-kill-ring-save (click) "Copy the region between point and the mouse click in the kill ring. @@ -1361,7 +1361,7 @@ (or mouse-yank-at-point (mouse-set-point click)) (let ((secondary (x-get-selection 'SECONDARY))) (if secondary - (insert secondary) + (insert-for-yank secondary) (error "No secondary selection")))) (defun mouse-kill-secondary () === modified file 'lisp/progmodes/f90.el' --- lisp/progmodes/f90.el 2014-05-29 03:45:29 +0000 +++ lisp/progmodes/f90.el 2014-07-03 06:00:53 +0000 @@ -71,8 +71,8 @@ ;; For example: ;; (add-to-list 'auto-mode-alist '("\\.f\\'" . f90-mode)) -;; Once you have entered f90-mode, you may get more info by using -;; the command describe-mode (C-h m). For online help use +;; Once you have entered f90-mode, you can get more info by using +;; the command describe-mode (C-h m). For help use ;; C-h f , or ;; C-h v . === modified file 'lisp/progmodes/idlw-complete-structtag.el' --- lisp/progmodes/idlw-complete-structtag.el 2014-01-01 07:43:34 +0000 +++ lisp/progmodes/idlw-complete-structtag.el 2014-06-29 02:17:17 +0000 @@ -49,14 +49,14 @@ ;; ;; New versions of IDLWAVE, documentation, and more information available ;; from: -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;; INSTALLATION ;; ============ ;; Put this file on the emacs load path and load it with the following ;; line in your init file: ;; -;; (add-hook 'idlwave-load-hook +;; (add-hook 'idlwave-load-hook ;; (lambda () (require 'idlw-complete-structtag))) ;; ;; DESCRIPTION === modified file 'lisp/progmodes/idlw-help.el' --- lisp/progmodes/idlw-help.el 2014-05-29 03:45:29 +0000 +++ lisp/progmodes/idlw-help.el 2014-07-03 06:00:53 +0000 @@ -32,7 +32,7 @@ ;; along with new versions of IDLWAVE, documentation, and more ;; information, at: ;; -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; === modified file 'lisp/progmodes/idlw-shell.el' --- lisp/progmodes/idlw-shell.el 2014-06-26 06:28:04 +0000 +++ lisp/progmodes/idlw-shell.el 2014-07-03 06:00:53 +0000 @@ -40,7 +40,7 @@ ;; ;; New versions of IDLWAVE, documentation, and more information ;; available from: -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;; INSTALLATION: ;; ============= @@ -58,7 +58,7 @@ ;; The newest version of this file can be found on the maintainers ;; web site. ;; -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;; DOCUMENTATION ;; ============= @@ -923,7 +923,7 @@ Info documentation for this package is available. Use \\[idlwave-info] to display (complain to your sysadmin if that does not work). For PostScript and HTML versions of the documentation, check IDLWAVE's - homepage at URL `http://idlwave.org'. + homepage at URL `http://github.com/jdtsmith/idlwave'. IDLWAVE has customize support - see the group `idlwave'. 8. Keybindings === modified file 'lisp/progmodes/idlw-toolbar.el' --- lisp/progmodes/idlw-toolbar.el 2014-01-01 07:43:34 +0000 +++ lisp/progmodes/idlw-toolbar.el 2014-06-29 02:17:17 +0000 @@ -29,7 +29,7 @@ ;; New versions of IDLWAVE, documentation, and more information ;; available from: -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;;; Code: === modified file 'lisp/progmodes/idlwave.el' --- lisp/progmodes/idlwave.el 2014-04-23 02:22:06 +0000 +++ lisp/progmodes/idlwave.el 2014-06-29 02:17:17 +0000 @@ -44,7 +44,7 @@ ;; ;; New versions of IDLWAVE, documentation, and more information ;; available from: -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;; INSTALLATION ;; ============ @@ -64,7 +64,7 @@ ;; The newest version of this file is available from the maintainer's ;; Webpage: ;; -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;; DOCUMENTATION ;; ============= @@ -179,7 +179,7 @@ "Major mode for editing IDL .pro files." :tag "IDLWAVE" :link '(url-link :tag "Home Page" - "http://idlwave.org") + "http://github.com/jdtsmith/idlwave") :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el" "idlw-shell.el") :link '(emacs-commentary-link :tag "Commentary in idlwave.el" "idlwave.el") @@ -1878,7 +1878,8 @@ Info documentation for this package is available. Use \\[idlwave-info] to display (complain to your sysadmin if that does not work). For Postscript, PDF, and HTML versions of the - documentation, check IDLWAVE's homepage at URL `http://idlwave.org'. + documentation, check IDLWAVE's homepage at URL + `http://github.com/jdtsmith/idlwave'. IDLWAVE has customize support - see the group `idlwave'. 10.Keybindings === modified file 'lisp/progmodes/pascal.el' --- lisp/progmodes/pascal.el 2014-04-10 13:56:28 +0000 +++ lisp/progmodes/pascal.el 2014-06-29 02:33:50 +0000 @@ -26,8 +26,8 @@ ;; ===== ;; Emacs should enter Pascal mode when you find a Pascal source file. -;; When you have entered Pascal mode, you may get more info by pressing -;; C-h m. You may also get online help describing various functions by: +;; When you have entered Pascal mode, you can get more info by pressing +;; C-h m. You can also get help describing various functions by: ;; C-h f ;; If you want to customize Pascal mode to fit you better, you may add === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2014-06-21 19:45:59 +0000 +++ lisp/progmodes/python.el 2014-07-03 06:00:53 +0000 @@ -1096,16 +1096,28 @@ (when (and electric-indent-mode (eq (char-before) last-command-event)) (cond - ((and (not (bolp)) - (memq (char-after) '(?\) ?\] ?\}))) + ;; Electric indent inside parens + ((and + (not (bolp)) + (let ((paren-start (python-syntax-context 'paren))) + ;; Check that point is inside parens. + (when paren-start + (not + ;; Filter the case where input is happening in the same + ;; line where the open paren is. + (= (line-number-at-pos) + (line-number-at-pos paren-start))))) + ;; When content has been added before the closing paren or a + ;; comma has been inserted, it's ok to do the trick. + (or + (memq (char-after) '(?\) ?\] ?\})) + (eq (char-before) ?,))) (save-excursion (goto-char (line-beginning-position)) - ;; If after going to the beginning of line the point - ;; is still inside a paren it's ok to do the trick - (when (python-syntax-context 'paren) - (let ((indentation (python-indent-calculate-indentation))) - (when (< (current-indentation) indentation) - (indent-line-to indentation)))))) + (let ((indentation (python-indent-calculate-indentation))) + (when (< (current-indentation) indentation) + (indent-line-to indentation))))) + ;; Electric colon ((and (eq ?: last-command-event) (memq ?: electric-indent-chars) (not current-prefix-arg) === modified file 'lisp/ps-def.el' --- lisp/ps-def.el 2014-04-15 13:21:18 +0000 +++ lisp/ps-def.el 2014-07-01 02:25:52 +0000 @@ -325,8 +325,6 @@ ;; Emacs (property-change from) (overlay-change from) - (save-buffer-invisibility-spec buffer-invisibility-spec) - (buffer-invisibility-spec nil) before-string after-string) (while (< from to) (and (< property-change to) ; Don't search for property change === modified file 'lisp/vc/ediff-mult.el' --- lisp/vc/ediff-mult.el 2014-01-01 07:43:34 +0000 +++ lisp/vc/ediff-mult.el 2014-06-29 02:33:50 +0000 @@ -140,7 +140,7 @@ uh/um:\tunmark all sessions marked for hiding/operation n,SPC:\tnext session p,DEL:\tprevious session - E:\tbrowse Ediff on-line manual + E:\tbrowse Ediff manual T:\ttoggle truncation of long file names q:\tquit this session group ") @@ -1464,7 +1464,7 @@ R in any Ediff session: display session registry n,SPC: next session p,DEL: previous session - E: browse Ediff on-line manual + E: browse Ediff manual q: bury registry === modified file 'lisp/vc/ediff-ptch.el' --- lisp/vc/ediff-ptch.el 2014-01-01 07:43:34 +0000 +++ lisp/vc/ediff-ptch.el 2014-06-29 02:33:50 +0000 @@ -735,7 +735,7 @@ ediff-patch-program = %S ediff-patch-options = %S ediff-backup-extension = %S ediff-backup-specs = %S -See Ediff on-line manual for more details on these variables. +See Ediff manual for more details on these variables. In particular, check the documentation for `ediff-backup-specs'. In any of the above cases, Ediff doesn't compare files automatically. === modified file 'lisp/vc/ediff.el' --- lisp/vc/ediff.el 2014-04-02 07:07:11 +0000 +++ lisp/vc/ediff.el 2014-06-29 02:33:50 +0000 @@ -64,7 +64,7 @@ ;; compressed files. Details are given below. ;; Finally, Ediff supports directory-level comparison, merging and patching. -;; See the on-line manual for details. +;; See the Ediff manual for details. ;; This package builds upon the ideas borrowed from emerge.el and several ;; Ediff's functions are adaptations from emerge.el. Much of the functionality === modified file 'lisp/vc/log-edit.el' --- lisp/vc/log-edit.el 2014-02-08 23:01:45 +0000 +++ lisp/vc/log-edit.el 2014-07-01 15:15:03 +0000 @@ -132,6 +132,8 @@ log-edit-insert-changelog log-edit-show-files) "Hook run at the end of `log-edit'." + ;; Added log-edit-insert-message-template, moved log-edit-show-files. + :version "24.4" :group 'log-edit :type '(hook :options (log-edit-insert-message-template log-edit-insert-cvs-rcstemplate @@ -355,9 +357,15 @@ (set-match-data (list start (point))) (point)))) +(defun log-edit-goto-eoh () ;FIXME: Almost rfc822-goto-eoh! + (goto-char (point-min)) + (when (re-search-forward + "^\\([^[:alpha:]]\\|[[:alnum:]-]+[^[:alnum:]-:]\\)" nil 'move) + (goto-char (match-beginning 0)))) + (defun log-edit--match-first-line (limit) (let ((start (point))) - (rfc822-goto-eoh) + (log-edit-goto-eoh) (skip-chars-forward "\n") (and (< start (line-end-position)) (< (point) limit) === modified file 'lisp/vc/vc-git.el' --- lisp/vc/vc-git.el 2014-03-08 06:56:22 +0000 +++ lisp/vc/vc-git.el 2014-06-29 20:48:55 +0000 @@ -674,7 +674,7 @@ (cl-flet ((boolean-arg-fn (argument) (lambda (value) (when (equal value "yes") (list argument))))) - ;; When operating on the whole tree, better pass nil than ".", since "." + ;; When operating on the whole tree, better pass "-a" than ".", since "." ;; fails when we're committing a merge. (apply 'vc-git-command nil 0 (if only files) (nconc (list "commit" "-m") @@ -684,7 +684,7 @@ ("Amend" . ,(boolean-arg-fn "--amend")) ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) comment) - (if only (list "--only" "--"))))))) + (if only (list "--only" "--") '("-a"))))))) (defun vc-git-find-revision (file rev buffer) (let* (process-file-side-effects === modified file 'src/ChangeLog' --- src/ChangeLog 2014-07-02 15:22:49 +0000 +++ src/ChangeLog 2014-07-03 06:00:53 +0000 @@ -1,3 +1,28 @@ +2014-07-03 Eli Zaretskii + + * dispnew.c (prepare_desired_row): Accept 2 additional arguments: + the window whose glyph row is being prepared and a flag whether it + is for mode/header line. Make sure the glyph row's marginal areas + are in sync with what the window wants. + (Bug#17892) + + * xdisp.c (display_line, display_mode_line): Call + prepare_desired_row with additional arguments, as appropriate. + + * dispextern.h (prepare_desired_row): Adjust prototype. + +2014-07-03 Dmitry Antipov + + * xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889). + * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash + caused by xw_popup_dialog in daemon mode (Bug#17891). + +2014-07-03 Eli Zaretskii + + * frame.c (do_switch_frame): When switching to another TTY frame, + make sure FrameCols and FrameRows are in sync with the new frame's + data. (Bug#17875) + 2014-07-02 Dmitry Antipov Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects. === modified file 'src/dispextern.h' --- src/dispextern.h 2014-06-21 19:45:59 +0000 +++ src/dispextern.h 2014-07-03 06:00:53 +0000 @@ -3460,7 +3460,7 @@ void blank_row (struct window *, struct glyph_row *, int); void clear_glyph_matrix_rows (struct glyph_matrix *, int, int); void clear_glyph_row (struct glyph_row *); -void prepare_desired_row (struct glyph_row *); +void prepare_desired_row (struct window *, struct glyph_row *, bool); void update_single_window (struct window *, bool); void do_pending_window_change (bool); void change_frame_size (struct frame *, int, int, bool, bool, bool, bool); === modified file 'src/dispnew.c' --- src/dispnew.c 2014-06-04 09:16:46 +0000 +++ src/dispnew.c 2014-07-01 18:00:29 +0000 @@ -449,7 +449,8 @@ + x); if (w == NULL - || row == matrix->rows + dim.height - 1 + || (row == matrix->rows + dim.height - 1 + && WINDOW_WANTS_MODELINE_P (w)) || (row == matrix->rows && matrix->header_line_p)) { row->glyphs[TEXT_AREA] @@ -492,8 +493,9 @@ = xnrealloc (row->glyphs[LEFT_MARGIN_AREA], dim.width, sizeof (struct glyph)); - /* The mode line never has marginal areas. */ - if (row == matrix->rows + dim.height - 1 + /* The mode line, if displayed, never has marginal areas. */ + if ((row == matrix->rows + dim.height - 1 + && !(w && WINDOW_WANTS_MODELINE_P (w))) || (row == matrix->rows && matrix->header_line_p)) { row->glyphs[TEXT_AREA] @@ -1049,13 +1051,16 @@ #endif /* 0 */ -/* Prepare ROW for display. Desired rows are cleared lazily, - i.e. they are only marked as to be cleared by setting their +/* Prepare ROW for display in windows W. Desired rows are cleared + lazily, i.e. they are only marked as to be cleared by setting their enabled_p flag to zero. When a row is to be displayed, a prior - call to this function really clears it. */ + call to this function really clears it. In addition, this function + makes sure the marginal areas of ROW are in sync with the window's + display margins. MODE_LINE_P non-zero means we are preparing a + glyph row for header line or mode line. */ void -prepare_desired_row (struct glyph_row *row) +prepare_desired_row (struct window *w, struct glyph_row *row, bool mode_line_p) { if (!row->enabled_p) { @@ -1065,6 +1070,39 @@ row->enabled_p = true; row->reversed_p = rp; } + if (mode_line_p) + { + /* Mode and header lines, if displayed, never have marginal + areas. If we are called with MODE_LINE_P non-zero, we are + displaying the mode/header line in this window, and so the + marginal areas of this glyph row should be eliminated. This + is needed when the mode/header line is switched on in a + window that has display margins. */ + if (w->left_margin_cols > 0) + row->glyphs[TEXT_AREA] = row->glyphs[LEFT_MARGIN_AREA]; + if (w->right_margin_cols > 0) + row->glyphs[RIGHT_MARGIN_AREA] = row->glyphs[LAST_AREA]; + } + else if (row == MATRIX_MODE_LINE_ROW (w->desired_matrix) + || row == MATRIX_HEADER_LINE_ROW (w->desired_matrix)) + { + /* The real number of glyphs reserved for the margins is + recorded in the glyph matrix, and can be different from + window's left_margin_cols and right_margin_cols; see + margin_glyphs_to_reserve for when that happens. */ + int left = w->desired_matrix->left_margin_glyphs; + int right = w->desired_matrix->right_margin_glyphs; + + /* Make sure the marginal areas of this row are in sync with + what the window wants, when the 1st/last row of the matrix + actually displays text and not header/mode line. */ + if (w->left_margin_cols > 0 + && (left != row->glyphs[TEXT_AREA] - row->glyphs[LEFT_MARGIN_AREA])) + row->glyphs[TEXT_AREA] = row->glyphs[LEFT_MARGIN_AREA] + left; + if (w->right_margin_cols > 0 + && (right != row->glyphs[LAST_AREA] - row->glyphs[RIGHT_MARGIN_AREA])) + row->glyphs[RIGHT_MARGIN_AREA] = row->glyphs[LAST_AREA] - right; + } } === modified file 'src/frame.c' --- src/frame.c 2014-06-17 16:09:19 +0000 +++ src/frame.c 2014-07-03 06:00:53 +0000 @@ -46,6 +46,7 @@ #ifdef HAVE_WINDOW_SYSTEM #include "fontset.h" #endif +#include "cm.h" #ifdef MSDOS #include "msdos.h" #include "dosfns.h" @@ -854,7 +855,9 @@ if (FRAME_TERMCAP_P (XFRAME (frame)) || FRAME_MSDOS_P (XFRAME (frame))) { - Lisp_Object top_frame = FRAME_TTY (XFRAME (frame))->top_frame; + struct frame *f = XFRAME (frame); + struct tty_display_info *tty = FRAME_TTY (f); + Lisp_Object top_frame = tty->top_frame; /* Don't mark the frame garbaged and/or obscured if we are switching to the frame that is already the top frame of that @@ -864,9 +867,16 @@ if (FRAMEP (top_frame)) /* Mark previously displayed frame as now obscured. */ SET_FRAME_VISIBLE (XFRAME (top_frame), 2); - SET_FRAME_VISIBLE (XFRAME (frame), 1); + SET_FRAME_VISIBLE (f, 1); + /* If the new TTY frame changed dimensions, we need to + resync term.c's idea of the frame size with the new + frame's data. */ + if (FRAME_COLS (f) != FrameCols (tty)) + FrameCols (tty) = FRAME_COLS (f); + if (FRAME_LINES (f) != FrameRows (tty)) + FrameRows (tty) = FRAME_LINES (f); } - FRAME_TTY (XFRAME (frame))->top_frame = frame; + tty->top_frame = frame; } selected_frame = frame; === modified file 'src/menu.c' --- src/menu.c 2014-06-22 05:00:14 +0000 +++ src/menu.c 2014-07-03 06:00:53 +0000 @@ -1529,6 +1529,11 @@ but I don't want to make one now. */ CHECK_WINDOW (window); + /* Note that xw_popup_dialog can call menu code, so + Vmenu_updating_frame should be set (Bug#17891). */ + eassert (f && FRAME_LIVE_P (f)); + XSETFRAME (Vmenu_updating_frame, f); + /* Force a redisplay before showing the dialog. If a frame is created just before showing the dialog, its contents may not have been fully drawn, as this depends on timing of events from the X server. Redisplay === modified file 'src/window.h' --- src/window.h 2014-01-01 07:43:34 +0000 +++ src/window.h 2014-07-01 17:07:24 +0000 @@ -271,8 +271,10 @@ int left_fringe_width; int right_fringe_width; - /* Width of left and right marginal areas in columns. - A value of 0 means no margin. */ + /* Requested width of left and right marginal areas in columns. A + value of 0 means no margin. The actual values are recorded in + the window's glyph matrix, in the left_margin_glyphs and + right_margin_glyphs members. */ int left_margin_cols; int right_margin_cols; === modified file 'src/xdisp.c' --- src/xdisp.c 2014-06-23 04:11:29 +0000 +++ src/xdisp.c 2014-07-03 06:00:53 +0000 @@ -19878,7 +19878,7 @@ } /* Clear the result glyph row and enable it. */ - prepare_desired_row (row); + prepare_desired_row (it->w, row, false); row->y = it->current_y; row->start = it->start; @@ -21517,7 +21517,7 @@ /* Don't extend on a previously drawn mode-line. This may happen if called from pos_visible_p. */ it.glyph_row->enabled_p = false; - prepare_desired_row (it.glyph_row); + prepare_desired_row (w, it.glyph_row, true); it.glyph_row->mode_line_p = 1; === modified file 'src/xfaces.c' --- src/xfaces.c 2014-06-10 03:32:36 +0000 +++ src/xfaces.c 2014-07-03 06:00:53 +0000 @@ -676,19 +676,9 @@ } #endif /* HAVE_WINDOW_SYSTEM */ - /* Realize basic faces. Must have enough information in frame - parameters to realize basic faces at this point. */ -#ifdef HAVE_X_WINDOWS - if (!FRAME_X_P (f) || FRAME_X_WINDOW (f)) -#endif -#ifdef HAVE_NTGUI - if (!FRAME_WINDOW_P (f) || FRAME_W32_WINDOW (f)) -#endif -#ifdef HAVE_NS - if (!FRAME_NS_P (f) || FRAME_NS_WINDOW (f)) -#endif - if (!realize_basic_faces (f)) - emacs_abort (); + /* Realize faces early (Bug#17889). */ + if (!realize_basic_faces (f)) + emacs_abort (); } === modified file 'test/ChangeLog' --- test/ChangeLog 2014-06-30 19:58:56 +0000 +++ test/ChangeLog 2014-07-03 06:00:53 +0000 @@ -1,3 +1,9 @@ +2014-07-03 Fabián Ezequiel Gallina + + * automated/python-tests.el (python-tests-self-insert): New function. + (python-triple-quote-pairing): Use it. + (python-util-forward-comment-1): New test. (Bug#17658) + 2014-06-30 Fabián Ezequiel Gallina * automated/subr-x-tests.el: New file. === modified file 'test/automated/python-tests.el' --- test/automated/python-tests.el 2014-06-21 14:14:54 +0000 +++ test/automated/python-tests.el 2014-07-01 03:54:11 +0000 @@ -86,6 +86,24 @@ found-point (and restore-point (goto-char starting-point))))) +(defun python-tests-self-insert (char-or-str) + "Call `self-insert-command' for chars in CHAR-OR-STR." + (let ((chars + (cond + ((characterp char-or-str) + (list char-or-str)) + ((stringp char-or-str) + (string-to-list char-or-str)) + ((not + (cl-remove-if #'characterp char-or-str)) + char-or-str) + (t (error "CHAR-OR-STR must be a char, string, or list of char"))))) + (mapc + (lambda (char) + (let ((last-command-event char)) + (call-interactively 'self-insert-command))) + chars))) + ;;; Tests for your tests, so you can test while you test. @@ -2715,9 +2733,6 @@ (should (string= (python-util-strip-string "\n \t \n\r ") "")) (should (string= (python-util-strip-string "") ""))) - -;;; Electricity - (ert-deftest python-util-forward-comment-1 () (python-tests-with-temp-buffer (concat @@ -2730,36 +2745,85 @@ (python-util-forward-comment -1) (should (= (point) (point-min))))) + +;;; Electricity + +(ert-deftest python-parens-electric-indent-1 () + (require 'electric) + (let ((eim electric-indent-mode)) + (unwind-protect + (progn + (python-tests-with-temp-buffer + " +from django.conf.urls import patterns, include, url + +from django.contrib import admin + +from myapp import views + + +urlpatterns = patterns('', + url(r'^$', views.index +) +" + (electric-indent-mode 1) + (python-tests-look-at "views.index") + (end-of-line) + + ;; Inserting commas within the same line should leave + ;; indentation unchanged. + (python-tests-self-insert ",") + (should (= (current-indentation) 4)) + + ;; As well as any other input happening within the same + ;; set of parens. + (python-tests-self-insert " name='index')") + (should (= (current-indentation) 4)) + + ;; But a comma outside it, should trigger indentation. + (python-tests-self-insert ",") + (should (= (current-indentation) 23)) + + ;; Newline indents to the first argument column + (python-tests-self-insert "\n") + (should (= (current-indentation) 23)) + + ;; All this input must not change indentation + (indent-line-to 4) + (python-tests-self-insert "url(r'^/login$', views.login)") + (should (= (current-indentation) 4)) + + ;; But this comma does + (python-tests-self-insert ",") + (should (= (current-indentation) 23)))) + (or eim (electric-indent-mode -1))))) + (ert-deftest python-triple-quote-pairing () (require 'electric) (let ((epm electric-pair-mode)) (unwind-protect (progn (python-tests-with-temp-buffer - "\"\"\n" - (or epm (electric-pair-mode 1)) - (goto-char (1- (point-max))) - (let ((last-command-event ?\")) - (call-interactively 'self-insert-command)) - (should (string= (buffer-string) - "\"\"\"\"\"\"\n")) - (should (= (point) 4))) - (python-tests-with-temp-buffer - "\n" - (let ((last-command-event ?\")) - (dotimes (i 3) - (call-interactively 'self-insert-command))) - (should (string= (buffer-string) - "\"\"\"\"\"\"\n")) - (should (= (point) 4))) - (python-tests-with-temp-buffer - "\"\n\"\"\n" - (goto-char (1- (point-max))) - (let ((last-command-event ?\")) - (call-interactively 'self-insert-command)) - (should (= (point) (1- (point-max)))) - (should (string= (buffer-string) - "\"\n\"\"\"\n")))) + "\"\"\n" + (or epm (electric-pair-mode 1)) + (goto-char (1- (point-max))) + (python-tests-self-insert ?\") + (should (string= (buffer-string) + "\"\"\"\"\"\"\n")) + (should (= (point) 4))) + (python-tests-with-temp-buffer + "\n" + (python-tests-self-insert (list ?\" ?\" ?\")) + (should (string= (buffer-string) + "\"\"\"\"\"\"\n")) + (should (= (point) 4))) + (python-tests-with-temp-buffer + "\"\n\"\"\n" + (goto-char (1- (point-max))) + (python-tests-self-insert ?\") + (should (= (point) (1- (point-max)))) + (should (string= (buffer-string) + "\"\n\"\"\"\n")))) (or epm (electric-pair-mode -1))))) ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.