commit e53e1a0426539aa3f2902632fdd8025da8f710f2 (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Tue Oct 13 09:44:48 2015 +0200 * test/automated/file-notify-tests.el (file-notify--test-timeout): Add docstring. Increase to 10 seconds for remote directories. (Bug#21669) diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index 03946dd..c943d91 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el @@ -62,7 +62,8 @@ (defvar file-notify--test-event nil) (defvar file-notify--test-events nil) (defun file-notify--test-timeout () - (if (file-remote-p temporary-file-directory) 6 3)) + "Timeout to wait for arriving events, in seconds." + (if (file-remote-p temporary-file-directory) 10 3)) (defun file-notify--test-cleanup () "Cleanup after a test." commit 38f99a02b83e9e408970cb7abdb685725b2004f9 Author: Paul Eggert Date: Mon Oct 12 15:30:18 2015 -0700 Unmacroize ebrowse.c and etags.c a bit * lib-src/ebrowse.c (READ_CHUNK_SIZE): Now an enum constant. (streq, filename_eq, set_flag, has_flag): Now inline functions. (set_flag): First arg is now an address, not an lvalue. All callers changed. (filename_eq, set_flag, has_flag): Rename from FILENAME_EQ, SET_FLAG, HAS_FLAG. All callers changed. * lib-src/etags.c (streq, strcaseeq, strneq, strncaseeq): Now inline functions. Remove asserts that are unnecessary these days (and in some cases were too-generous anyway). diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 09edc7d..f2093ae 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -32,27 +32,32 @@ along with GNU Emacs. If not, see . */ #define SEEK_END 2 #endif -/* Conditionalize function prototypes. */ - -/* Value is non-zero if strings X and Y compare equal. */ - -#define streq(X, Y) (*(X) == *(Y) && strcmp ((X) + 1, (Y) + 1) == 0) - #include /* Files are read in chunks of this number of bytes. */ -#define READ_CHUNK_SIZE (100 * 1024) +enum { READ_CHUNK_SIZE = 100 * 1024 }; -#if defined (__MSDOS__) -#define FILENAME_EQ(X,Y) (strcasecmp (X,Y) == 0) -#else -#if defined (WINDOWSNT) -#define FILENAME_EQ(X,Y) (stricmp (X,Y) == 0) +/* Value is true if strings X and Y compare equal. */ + +static bool +streq (char const *x, char const *y) +{ + return strcmp (x, y) == 0; +} + +static bool +filename_eq (char const *x, char const *y) +{ +#ifdef __MSDOS__ + return strcasecmp (x, y) == 0; +#elif defined WINDOWSNT + return stricmp (x, y) == 0; #else -#define FILENAME_EQ(X,Y) (streq (X,Y)) -#endif + return streq (x, y); #endif +} + /* The default output file name. */ #define DEFAULT_OUTFILE "BROWSE" @@ -217,10 +222,19 @@ enum visibility #define F_EXTERNC 256 /* Is declared extern "C". */ #define F_DEFINE 512 /* Is a #define. */ -/* Two macros to set and test a bit in an int. */ +/* Set and test a bit in an int. */ -#define SET_FLAG(F, FLAG) ((F) |= (FLAG)) -#define HAS_FLAG(F, FLAG) (((F) & (FLAG)) != 0) +static void +set_flag (int *f, int flag) +{ + *f |= flag; +} + +static bool +has_flag (int f, int flag) +{ + return (f & flag) != 0; +} /* Structure describing a class member. */ @@ -682,7 +696,7 @@ add_member_decl (struct sym *cls, char *name, char *regexp, int pos, unsigned in m = add_member (cls, name, var, sc, hash); /* Have we seen a new filename? If so record that. */ - if (!cls->filename || !FILENAME_EQ (cls->filename, filename)) + if (!cls->filename || !filename_eq (cls->filename, filename)) m->filename = filename; m->regexp = regexp; @@ -745,7 +759,7 @@ add_member_defn (struct sym *cls, char *name, char *regexp, int pos, unsigned in if (!cls->sfilename) cls->sfilename = filename; - if (!FILENAME_EQ (cls->sfilename, filename)) + if (!filename_eq (cls->sfilename, filename)) m->def_filename = filename; m->def_regexp = regexp; @@ -830,7 +844,7 @@ add_global_decl (char *name, char *regexp, int pos, unsigned int hash, int var, if (!found) { if (!global_symbols->filename - || !FILENAME_EQ (global_symbols->filename, filename)) + || !filename_eq (global_symbols->filename, filename)) m->filename = filename; m->regexp = regexp; @@ -931,11 +945,11 @@ mark_virtual (struct sym *r) for (p = r->subs; p; p = p->next) { for (m = r->fns; m; m = m->next) - if (HAS_FLAG (m->flags, F_VIRTUAL)) + if (has_flag (m->flags, F_VIRTUAL)) { for (m2 = p->sym->fns; m2; m2 = m2->next) if (m->param_hash == m2->param_hash && streq (m->name, m2->name)) - SET_FLAG (m2->flags, F_VIRTUAL); + set_flag (&m2->flags, F_VIRTUAL); } mark_virtual (p->sym); @@ -1159,7 +1173,7 @@ sym_scope_1 (struct sym *p) strcpy (scope_buffer + scope_buffer_len, p->name); scope_buffer_len += len; - if (HAS_FLAG (p->flags, F_TEMPLATE)) + if (has_flag (p->flags, F_TEMPLATE)) { ensure_scope_buffer_room (3); strcpy (scope_buffer + scope_buffer_len, "<>"); @@ -2435,7 +2449,7 @@ parm_list (int *flags) { /* We can overload the same function on `const' */ hash = (hash << 1) ^ CONST; - SET_FLAG (*flags, F_CONST); + set_flag (flags, F_CONST); MATCH (); } @@ -2443,7 +2457,7 @@ parm_list (int *flags) { MATCH (); SKIP_MATCHING_IF ('('); - SET_FLAG (*flags, F_THROW); + set_flag (flags, F_THROW); } if (LOOKING_AT ('=')) @@ -2452,7 +2466,7 @@ parm_list (int *flags) if (LOOKING_AT (CINT) && yyival == 0) { MATCH (); - SET_FLAG (*flags, F_PURE); + set_flag (flags, F_PURE); } } } @@ -2505,25 +2519,25 @@ member (struct sym *cls, int vis) /* A function or class may follow. */ case TEMPLATE: MATCH (); - SET_FLAG (flags, F_TEMPLATE); + set_flag (&flags, F_TEMPLATE); /* Skip over template argument list */ SKIP_MATCHING_IF ('<'); break; case EXPLICIT: - SET_FLAG (flags, F_EXPLICIT); + set_flag (&flags, F_EXPLICIT); goto typeseen; case MUTABLE: - SET_FLAG (flags, F_MUTABLE); + set_flag (&flags, F_MUTABLE); goto typeseen; case T_INLINE: - SET_FLAG (flags, F_INLINE); + set_flag (&flags, F_INLINE); goto typeseen; case VIRTUAL: - SET_FLAG (flags, F_VIRTUAL); + set_flag (&flags, F_VIRTUAL); goto typeseen; case '[': @@ -2761,7 +2775,7 @@ parse_classname (void) if (LOOKING_AT ('<')) { skip_matching (); - SET_FLAG (last_class->flags, F_TEMPLATE); + set_flag (&last_class->flags, F_TEMPLATE); } if (!LOOKING_AT (DCOLON)) @@ -3189,7 +3203,7 @@ declaration (int flags) break; case T_INLINE: - SET_FLAG (flags, F_INLINE); + set_flag (&flags, F_INLINE); MATCH (); break; @@ -3335,14 +3349,14 @@ globals (int start_flags) MATCH_IF ('}'); } else - SET_FLAG (flags, F_EXTERNC); + set_flag (&flags, F_EXTERNC); } break; case TEMPLATE: MATCH (); SKIP_MATCHING_IF ('<'); - SET_FLAG (flags, F_TEMPLATE); + set_flag (&flags, F_TEMPLATE); break; case CLASS: case STRUCT: case UNION: diff --git a/lib-src/etags.c b/lib-src/etags.c index 791722d..8b980d3 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -150,10 +150,29 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; # define CTAGS false #endif -#define streq(s,t) (assert ((s)!=NULL || (t)!=NULL), !strcmp (s, t)) -#define strcaseeq(s,t) (assert ((s)!=NULL && (t)!=NULL), !c_strcasecmp (s, t)) -#define strneq(s,t,n) (assert ((s)!=NULL || (t)!=NULL), !strncmp (s, t, n)) -#define strncaseeq(s,t,n) (assert ((s)!=NULL && (t)!=NULL), !c_strncasecmp (s, t, n)) +static bool +streq (char const *s, char const *t) +{ + return strcmp (s, t) == 0; +} + +static bool +strcaseeq (char const *s, char const *t) +{ + return c_strcasecmp (s, t) == 0; +} + +static bool +strneq (char const *s, char const *t, size_t n) +{ + return strncmp (s, t, n) == 0; +} + +static bool +strncaseeq (char const *s, char const *t, size_t n) +{ + return c_strncasecmp (s, t, n) == 0; +} /* C is not in a name. */ static bool commit e57a0c3d38b3e2bdd408a7e02b7308fa281f3073 Author: Mark Oteiza Date: Mon Oct 12 16:46:29 2015 -0400 Use highlight for current items. * lisp/mpc.el (mpc-select-make-overlay, mpc-tagbrowser-all-select): Apply highlight face instead of region face. diff --git a/lisp/mpc.el b/lisp/mpc.el index 6e69b6f..a5fc376 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -1263,7 +1263,7 @@ If PLAYLIST is t or nil or missing, use the main playlist." (let ((ol (make-overlay (line-beginning-position) (line-beginning-position 2)))) (overlay-put ol 'mpc-select t) - (overlay-put ol 'face 'region) + (overlay-put ol 'face 'highlight) (overlay-put ol 'evaporate t) (push ol mpc-select))) @@ -1562,7 +1562,7 @@ when constructing the set of constraints." (move-overlay mpc-tagbrowser-all-ol (point) (line-beginning-position 2)) (let ((ol (make-overlay (point) (line-beginning-position 2)))) - (overlay-put ol 'face 'region) + (overlay-put ol 'face 'highlight) (overlay-put ol 'evaporate t) (setq-local mpc-tagbrowser-all-ol ol)))))) commit 0f4efd12209607b54371868141064c12b7f021e9 Author: Mark Oteiza Date: Mon Oct 12 16:28:33 2015 -0400 Search for more cover image names in MPC * lisp/mpc.el (mpc-format): Also look for .folder.jpg or folder.jpg case insensitively diff --git a/lisp/mpc.el b/lisp/mpc.el index bc7d473..6e69b6f 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -44,7 +44,6 @@ ;; - visual feedback for drag'n'drop ;; - display/set `repeat' and `random' state (and maybe also `crossfade'). ;; - allow multiple *mpc* sessions in the same Emacs to control different mpds. -;; - look for .folder.png (freedesktop) or folder.jpg (XP) as well. ;; - fetch album covers and lyrics from the web? ;; - improve MPC-Status: better volume control, add a way to show/hide the ;; rest, plus add the buttons currently in the toolbar. @@ -1009,8 +1008,12 @@ If PLAYLIST is t or nil or missing, use the main playlist." (substring time (match-end 0)) time))))) (`Cover - (let* ((dir (file-name-directory (cdr (assq 'file info)))) - (cover (concat dir "cover.jpg")) + (let* ((dir (file-name-directory + (mpc-file-local-copy (cdr (assq 'file info))))) + (covers '(".folder.png" "cover.jpg" "folder.jpg")) + (cover (cl-loop for file in (directory-files dir) + if (member (downcase file) covers) + return (concat dir file))) (file (with-demoted-errors "MPC: %s" (mpc-file-local-copy cover))) image) commit 4462823ebfaeda6540dac3cacf03592406bedc05 Author: Juanma Barranquero Date: Mon Oct 12 21:43:39 2015 +0200 Remove or comment out unused variables * src/w32fns.c (x_set_mouse_color): Comment out variables cursor, nontext_cursor, mode_cursor, hand_cursor and count. (x_change_tool_bar_height): Remove variable old_text_height. (deliver_wm_chars): Remove variable strip_Alt. (Fw32_shell_execute): Remove variable document_a. (Fw32_frame_geometry): Remove variable fullboth. * src/w32term.c (w32_setup_relief_color): Comment out variable w32_display_info. (w32_horizontal_scroll_bar_handle_click): Remove variables start, end. (w32_read_socket): Comment out variables rows, columns. * src/w32uniscribe.c (uniscribe_check_otf_1): Remove variable rest. diff --git a/src/w32fns.c b/src/w32fns.c index 9b0770a..97dd40b 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -1299,8 +1299,10 @@ x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) void x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { +#if 0 Cursor cursor, nontext_cursor, mode_cursor, hand_cursor; int count; +#endif int mask_color; if (!EQ (Qnil, arg)) @@ -1737,7 +1739,6 @@ x_change_tool_bar_height (struct frame *f, int height) int unit = FRAME_LINE_HEIGHT (f); int old_height = FRAME_TOOL_BAR_HEIGHT (f); int lines = (height + unit - 1) / unit; - int old_text_height = FRAME_TEXT_HEIGHT (f); Lisp_Object fullscreen; /* Make sure we redisplay all windows in this frame. */ @@ -3004,7 +3005,7 @@ deliver_wm_chars (int do_translate, HWND hwnd, UINT msg, UINT wParam, { W32Msg wmsg; DWORD console_modifiers = construct_console_modifiers (); - int *b = buf, strip_Alt = 1, strip_ExtraMods = 1, hairy = 0; + int *b = buf, strip_ExtraMods = 1, hairy = 0; char *type_CtrlAlt = NULL; /* XXXX In fact, there may be another case when we need to do the same: @@ -7651,7 +7652,7 @@ a ShowWindow flag: } else { - char document_a[MAX_PATH], current_dir_a[MAX_PATH]; + char current_dir_a[MAX_PATH]; SHELLEXECUTEINFOA shexinfo_a; int codepage = codepage_for_filenames (NULL); int ldoc_a = pWideCharToMultiByte (codepage, 0, doc_w, -1, NULL, 0, @@ -8010,7 +8011,6 @@ and width values are in pixels. int single_menu_bar_height, wrapped_menu_bar_height, menu_bar_height; int tool_bar_height = FRAME_TOOL_BAR_HEIGHT (f); int internal_border_width = FRAME_INTERNAL_BORDER_WIDTH (f); - bool fullboth = EQ (get_frame_param (f, Qfullscreen), Qfullboth); if (FRAME_INITIAL_P (f) || !FRAME_W32_P (f)) return Qnil; diff --git a/src/w32term.c b/src/w32term.c index 82b05bf..9dc6b17 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1596,7 +1596,9 @@ w32_setup_relief_color (struct frame *f, struct relief *relief, double factor, unsigned long mask = GCForeground; COLORREF pixel; COLORREF background = di->relief_background; +#if 0 struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); +#endif /* TODO: Free colors (if using palette)? */ @@ -4350,8 +4352,6 @@ w32_horizontal_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, if (dragging) { SCROLLINFO si; - int start = bar->start; - int end = bar->end; si.cbSize = sizeof (si); si.fMask = SIF_POS; @@ -5159,7 +5159,7 @@ w32_read_socket (struct terminal *terminal, if (f && !FRAME_ICONIFIED_P (f) && msg.msg.wParam != SIZE_MINIMIZED) { RECT rect; - int rows, columns, width, height, text_width, text_height; + int /* rows, columns, */ width, height, text_width, text_height; if (GetClientRect (msg.msg.hwnd, &rect) /* GetClientRect evidently returns (0, 0, 0, 0) if diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 8b3bf60..e5efec7 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c @@ -779,7 +779,6 @@ uniscribe_check_otf_1 (HDC context, Lisp_Object script, Lisp_Object lang, int max_tags = ARRAYELTS (tags); int ntags, i, ret = 0; HRESULT rslt; - Lisp_Object rest; *retval = 0; commit 48c38426cb8f799eb41ff6c5baa738918fe1baa6 Author: Juanma Barranquero Date: Mon Oct 12 21:05:07 2015 +0200 * src/w32proc.c (sys_select): Fix bitwise test. diff --git a/src/w32proc.c b/src/w32proc.c index 62d6531..6659ed7 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -2179,7 +2179,7 @@ sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, cp = fd_info[i].cp; if (FD_ISSET (i, &owfds) && cp - && (fd_info[i].flags && FILE_CONNECT) == 0) + && (fd_info[i].flags & FILE_CONNECT) == 0) { DebPrint (("sys_select: fd %d is in wfds, but FILE_CONNECT is reset!\n", i)); cp = NULL; commit 857f73eeaf18bde04a14e334d55307050d541147 Author: Eli Zaretskii Date: Mon Oct 12 20:49:05 2015 +0300 Minor typo corrections in doc strings * lisp/menu-bar.el (popup-menu, popup-menu-normalize-position): Doc fixes. diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 63dbe40..42f48c7 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2267,8 +2267,8 @@ See `menu-bar-mode' for more information." "Popup the given menu and call the selected option. MENU can be a keymap, an easymenu-style menu or a list of keymaps as for `x-popup-menu'. -The menu is shown at the place where POSITION specifies. About -the form of POSITION, see `popup-menu-normalize-position'. +The menu is shown at the place where POSITION specifies. +For the form of POSITION, see `popup-menu-normalize-position'. PREFIX is the prefix argument (if any) to pass to the command. FROM-MENU-BAR, if non-nil, means we are dropping one of menu-bar's menus." (let* ((map (cond @@ -2337,9 +2337,9 @@ FROM-MENU-BAR, if non-nil, means we are dropping one of menu-bar's menus." (defun popup-menu-normalize-position (position) "Convert the POSITION to the form which `popup-menu' expects internally. -POSITION can an event, a posn- value, a value having +POSITION can be an event, a posn- value, a value having the form ((XOFFSET YOFFSET) WINDOW), or nil. -If nil, the current mouse position is used." +If nil, the current mouse position is used, or nil if there is no mouse." (pcase position ;; nil -> mouse cursor position (`nil commit 402ef224dc68d1ff09ee9bd9d44ce920bfa6ce1f Author: Eli Zaretskii Date: Mon Oct 12 20:09:54 2015 +0300 * nt/INSTALL: Recommend MSYS Automake/Autoconf from ezwinports. diff --git a/nt/INSTALL b/nt/INSTALL index 3bcb496..e1d9e06 100644 --- a/nt/INSTALL +++ b/nt/INSTALL @@ -178,6 +178,10 @@ build will run on Windows 9X and newer systems). command "mingw-get remove msys-texinfo", or mark "msys-texinfo" for removal in the mingw-get GUI, then select Installation->Apply Changes.) + (Similarly, we recommend to refrain from installing the MinGW + Automake and Autoconf packages; instead, install their MSYS builds + available from the ezwinports site, see below.) + At this point, you should be ready to configure and build Emacs in its basic configuration. Skip to the "Generating the configure script" section for the build instructions. If you want to build it commit 8ba156f1e77f22b448ffca72b2ba4dd5ea42ea59 Author: Eli Zaretskii Date: Mon Oct 12 20:02:52 2015 +0300 Attempt to avoid crashes in plist-member * src/fns.c (Fplist_member): Don't call QUIT between a CONSP test and a call to XCDR. (Bug#21655) diff --git a/src/fns.c b/src/fns.c index b31bd81..dfd48a2 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2875,9 +2875,9 @@ The value is actually the tail of PLIST whose car is PROP. */) { while (CONSP (plist) && !EQ (XCAR (plist), prop)) { - QUIT; plist = XCDR (plist); plist = CDR (plist); + QUIT; } return plist; }