commit 0bba304045eec1b9e552c24fdf705646f24ec5a7 (HEAD, refs/remotes/origin/master) Author: David Reitter Date: Tue Nov 10 15:41:17 2015 -0500 Avoid creating notification objects when possible * src/nsterm.m (windowWillEnterFullScreen, windowWillExitFullScreen:, windowDidEnterFullScreen, windowDidExitFullScreen): provide convenience functions that do not require a notification object. When needed, define NSWindowDidEnterFullScreenNotification to allow for compilation on OS X 10.6.8. diff --git a/src/nsterm.m b/src/nsterm.m index 5e6c748..5c39d5c 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6866,12 +6866,26 @@ not_in_argv (NSString *arg) } #endif +#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 +#define NSWindowDidEnterFullScreenNotification "NSWindowDidEnterFullScreenNotification" +#endif + - (void)windowWillEnterFullScreen:(NSNotification *)notification { + [self windowWillEnterFullScreen]; +} +- (void)windowWillEnterFullScreen /* provided for direct calls */ +{ NSTRACE ("windowWillEnterFullScreen"); fs_before_fs = fs_state; } +- (void)windowDidEnterFullScreen /* provided for direct calls */ +{ + [self windowDidEnterFullScreen: + [NSNotification notificationWithName:NSWindowDidEnterFullScreenNotification + object:[self window]]]; +} - (void)windowDidEnterFullScreen:(NSNotification *)notification { NSTRACE ("windowDidEnterFullScreen"); @@ -6908,6 +6922,11 @@ not_in_argv (NSString *arg) - (void)windowWillExitFullScreen:(NSNotification *)notification { + [self windowWillExitFullScreen]; +} + +- (void)windowWillExitFullScreen /* provided for direct calls */ +{ NSTRACE ("windowWillExitFullScreen"); if (!FRAME_LIVE_P (emacsframe)) { @@ -6920,6 +6939,11 @@ not_in_argv (NSString *arg) - (void)windowDidExitFullScreen:(NSNotification *)notification { + [self windowDidExitFullScreen]; +} + +- (void)windowDidExitFullScreen /* provided for direct calls */ +{ NSTRACE ("windowDidExitFullScreen"); if (!FRAME_LIVE_P (emacsframe)) { @@ -7054,17 +7078,13 @@ not_in_argv (NSString *arg) nonfs_window = w; - [self windowWillEnterFullScreen: - [NSNotification notificationWithName:NSWindowWillEnterFullScreenNotification - object:[self window]]]; + [self windowWillEnterFullScreen]; [fw makeKeyAndOrderFront:NSApp]; [fw makeFirstResponder:self]; [w orderOut:self]; r = [fw frameRectForContentRect:[screen frame]]; [fw setFrame: r display:YES animate:ns_use_fullscreen_animation]; - [self windowDidEnterFullScreen: - [NSNotification notificationWithName:NSWindowDidEnterFullScreenNotification - object:[self window]]]; + [self windowDidEnterFullScreen]; [fw display]; } else @@ -7094,15 +7114,11 @@ not_in_argv (NSString *arg) // to do: consider using [NSNotificationCenter postNotificationName:] to send notifications. - [self windowWillExitFullScreen: - [NSNotification notificationWithName:NSWindowWillExitFullScreenNotification - object:[self window]]]; + [self windowWillExitFullScreen]; [fw setFrame: [w frame] display:YES animate:ns_use_fullscreen_animation]; [fw close]; [w makeKeyAndOrderFront:NSApp]; - [self windowDidExitFullScreen: - [NSNotification notificationWithName:NSWindowDidExitFullScreenNotification - object:[self window]]]; + [self windowDidExitFullScreen]; [self updateFrameSize:YES]; } } commit 0e0ea300ff926d3e2f6f4d514d9115f1eecc8ddb Author: Paul Eggert Date: Tue Nov 10 12:46:22 2015 -0800 Move INTEGER_TO_CONS body out of .h file * src/data.c (INTBIG_TO_LISP): New macro, with most of the contents of the old INTEGER_TO_CONS. (intbig_to_lisp, uintbig_to_lisp): New functions. * src/lisp.h (INTEGER_TO_CONS): Simplify by using EXPR_SIGNED and the new functions. This shrinks code size a bit, and makes it easier to put a breakpoint on handling of large integers. diff --git a/src/data.c b/src/data.c index ccec15f..5154604 100644 --- a/src/data.c +++ b/src/data.c @@ -2409,6 +2409,33 @@ DEFUN ("/=", Fneq, Sneq, 2, 2, 0, return arithcompare (num1, num2, ARITH_NOTEQUAL); } +/* Convert the integer I to a cons-of-integers, where I is not in + fixnum range. */ + +#define INTBIG_TO_LISP(i, extremum) \ + (eassert (FIXNUM_OVERFLOW_P (i)), \ + (! (FIXNUM_OVERFLOW_P ((extremum) >> 16) \ + && FIXNUM_OVERFLOW_P ((i) >> 16)) \ + ? Fcons (make_number ((i) >> 16), make_number ((i) & 0xffff)) \ + : ! (FIXNUM_OVERFLOW_P ((extremum) >> 16 >> 24) \ + && FIXNUM_OVERFLOW_P ((i) >> 16 >> 24)) \ + ? Fcons (make_number ((i) >> 16 >> 24), \ + Fcons (make_number ((i) >> 16 & 0xffffff), \ + make_number ((i) & 0xffff))) \ + : make_float (i))) + +Lisp_Object +intbig_to_lisp (intmax_t i) +{ + return INTBIG_TO_LISP (i, INTMAX_MIN); +} + +Lisp_Object +uintbig_to_lisp (uintmax_t i) +{ + return INTBIG_TO_LISP (i, UINTMAX_MAX); +} + /* Convert the cons-of-integers, integer, or float value C to an unsigned value with maximum value MAX. Signal an error if C does not have a valid format or is out of range. */ diff --git a/src/lisp.h b/src/lisp.h index 784ab18..c782f0d 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3345,17 +3345,9 @@ extern Lisp_Object arithcompare (Lisp_Object num1, Lisp_Object num2, #define INTEGER_TO_CONS(i) \ (! FIXNUM_OVERFLOW_P (i) \ ? make_number (i) \ - : ! ((FIXNUM_OVERFLOW_P (INTMAX_MIN >> 16) \ - || FIXNUM_OVERFLOW_P (UINTMAX_MAX >> 16)) \ - && FIXNUM_OVERFLOW_P ((i) >> 16)) \ - ? Fcons (make_number ((i) >> 16), make_number ((i) & 0xffff)) \ - : ! ((FIXNUM_OVERFLOW_P (INTMAX_MIN >> 16 >> 24) \ - || FIXNUM_OVERFLOW_P (UINTMAX_MAX >> 16 >> 24)) \ - && FIXNUM_OVERFLOW_P ((i) >> 16 >> 24)) \ - ? Fcons (make_number ((i) >> 16 >> 24), \ - Fcons (make_number ((i) >> 16 & 0xffffff), \ - make_number ((i) & 0xffff))) \ - : make_float (i)) + : EXPR_SIGNED (i) ? intbig_to_lisp (i) : uintbig_to_lisp (i)) +extern Lisp_Object intbig_to_lisp (intmax_t); +extern Lisp_Object uintbig_to_lisp (uintmax_t); /* Convert the Emacs representation CONS back to an integer of type TYPE, storing the result the variable VAR. Signal an error if CONS commit 6c16c9a649ab5a5ea4bec12345fd369752da5dc0 Author: Paul Eggert Date: Tue Nov 10 12:42:06 2015 -0800 Merge from gnulib This incorporates: 2015-11-10 intprops: new public macro EXPR_SIGNED 2015-11-10 intprops: fix typo in clang port * lib/intprops.h: Copy from gnulib. diff --git a/lib/intprops.h b/lib/intprops.h index c55c4db..8fff86d 100644 --- a/lib/intprops.h +++ b/lib/intprops.h @@ -22,8 +22,7 @@ #include -/* Return an integer value, converted to the same type as the integer - expression E after integer type promotion. V is the unconverted value. */ +/* Return a value with the common real type of E and V and the value of V. */ #define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see @@ -48,12 +47,12 @@ /* True if the signed integer expression E uses two's complement. */ #define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1) -/* True if the arithmetic type T is signed. */ +/* True if the real type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) -/* Return 1 if the integer expression E, after integer promotion, has - a signed type. */ -#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) +/* Return 1 if the real expression E, after promotion, has a + signed or floating type. */ +#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) /* Minimum and maximum values for integer types and expressions. These @@ -76,11 +75,11 @@ /* The maximum and minimum values for the type of the expression E, after integer promotion. E should not have side effects. */ #define _GL_INT_MINIMUM(e) \ - (_GL_INT_SIGNED (e) \ + (EXPR_SIGNED (e) \ ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \ : _GL_INT_CONVERT (e, 0)) #define _GL_INT_MAXIMUM(e) \ - (_GL_INT_SIGNED (e) \ + (EXPR_SIGNED (e) \ ? _GL_SIGNED_INT_MAXIMUM (e) \ : _GL_INT_NEGATE_CONVERT (e, 1)) #define _GL_SIGNED_INT_MAXIMUM(e) \ @@ -354,7 +353,7 @@ /* Store A B into *R, where OP specifies the operation. BUILTIN is the builtin operation, and OVERFLOW the overflow predicate. See above for restrictions. */ -#if 5 <= __GNUC__ || __has_builtin (__builtin_add_oveflow) +#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow) # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ @@ -411,7 +410,7 @@ : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax)) #define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \ ((overflow (a, b) \ - || (_GL_INT_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \ + || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \ || (tmax) < ((a) op (b))) \ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0)) commit c92dbd6d0c234ff993acb0a095c024593bc185c8 Author: Paul Eggert Date: Tue Nov 10 10:22:29 2015 -0800 Spelling fixes * lisp/net/soap-inspect.el (soap-inspect-xs-simple-type): Fix misspelling in output. diff --git a/ChangeLog.2 b/ChangeLog.2 index a915adb..3636e38 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -612,7 +612,7 @@ 2015-10-29 Stefan Monnier - * lisp/emacs-lisp/cl-generic.el: Accomodate future changes. + * lisp/emacs-lisp/cl-generic.el: Accommodate future changes. (cl--generic-generalizer): Add `name' field. (cl-generic-make-generalizer): Add corresponding `name' argument. (cl-generic-define-generalizer): New macro. @@ -4418,7 +4418,7 @@ 2015-09-20 Stefan Monnier * lisp/progmodes/prolog.el: Improve handling of if/then/else. - (prolog-smie-rules): Accomodate standard if/then/else special + (prolog-smie-rules): Accommodate standard if/then/else special indentation. (prolog-mode): Add . to electric-indent-chars. (prolog-electric--if-then-else): Re-indent the line before adding space diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index f49d506..5a2cae0 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1790,7 +1790,7 @@ specify different values for the same variable, the file sorted after will override the value of the previous file (for instance, values in @file{.dir-locals2.el} override those in @file{.dir-locals.el}). Note that, because of how lexicographic order works, values in -@file{.dir-locals10.el} are overriden by values in @file{.dir-locals2.el}. +@file{.dir-locals10.el} are overridden by values in @file{.dir-locals2.el}. This can be avoided by using @file{.dir-locals02.el} instead. @end defvr diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17 index 8a255d7..d717a4d 100644 --- a/lisp/ChangeLog.17 +++ b/lisp/ChangeLog.17 @@ -4146,7 +4146,7 @@ 2014-12-14 Steve Purcell (tiny change) * emacs-lisp/package.el (package-menu-mode): Use an extra column - for the "Version" column, to accomodate date-and-time-based versions. + for the "Version" column, to accommodate date-and-time-based versions. 2014-12-14 Cameron Desautels @@ -8700,9 +8700,9 @@ (python-shell-prompt-detect) (python-shell-prompt-validate-regexps): New functions. (python-shell-prompt-set-calculated-regexps): New function. - (inferior-python-mode): Use it. Also honor overriden + (inferior-python-mode): Use it. Also honor overridden python-shell-interpreter and python-shell-interpreter-args. - (python-shell-make-comint): Honor overriden + (python-shell-make-comint): Honor overridden python-shell-interpreter and python-shell-interpreter-args. (python-shell-get-or-create-process): Make it testable by allowing to call run-python non-interactively. @@ -10975,9 +10975,9 @@ * faces.el (face-spec-recalc): Apply X resources only after the defface spec has been applied. Thus, X resources are no longer - overriden by the defface spec which also fixes issues on win32 where + overridden by the defface spec which also fixes issues on win32 where the toolbar coloring was wrong because it is set through X resources - and was (wrongfully) overriden. (Bug#16694) + and was (wrongfully) overridden. (Bug#16694) 2014-04-30 Stefan Monnier diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index aae517e..9e6102c 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -268,7 +268,7 @@ This macro can only be used within the lexical scope of a cl-generic method." (defmacro cl-generic-define-context-rewriter (name args &rest body) "Define a special kind of context named NAME. -Whenever a context specializer of the form (NAME . ACTUALS) appears, +Whenever a context specializer of the form (NAME . ARGS) appears, the specializer used will be the one returned by BODY." (declare (debug (&define name lambda-list def-body)) (indent defun)) `(eval-and-compile diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 264a39c..8317325 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -390,7 +390,7 @@ binding) but the same name." ;; SOAP WSDL documents use XML Schema to define the types that are part of the ;; message exchange. We include here an XML schema model with a parser and -;; serializer/deserialiser. +;; serializer/deserializer. (defstruct (soap-xs-type (:include soap-element)) id @@ -710,7 +710,7 @@ This is a specialization of `soap-decode-type' for (defun soap-xs-element-type (element) "Retrieve the type of ELEMENT. This is normally stored in the TYPE^ slot, but if this element -contains a reference, we retrive the type of the reference." +contains a reference, retrieve the type of the reference." (if (soap-xs-element-reference element) (soap-xs-element-type (soap-xs-element-reference element)) (soap-xs-element-type^ element))) @@ -1989,7 +1989,7 @@ This is a specialization of `soap-decode-type' for ) (defun soap-make-wsdl (origin) - "Create a new WSDL document, loaded from ORIGIN, and intialize it." + "Create a new WSDL document, loaded from ORIGIN, and initialize it." (let ((wsdl (soap-make-wsdl^ :origin origin))) ;; Add the XSD types to the wsdl document diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el index f6c7da6..b01e2bf 100644 --- a/lisp/net/soap-inspect.el +++ b/lisp/net/soap-inspect.el @@ -334,7 +334,7 @@ soap-xs-attribute-group, in the current buffer." (insert "\t") (soap-insert-describe-button type))) (when (soap-xs-simple-type-enumeration type) - (insert "\nEnumeraton values: ") + (insert "\nEnumeration values: ") (dolist (e (soap-xs-simple-type-enumeration type)) (insert "\n\t") (pp e))) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 295e544..398339e 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -108,7 +108,7 @@ Most often it's just one directory, which contains the project file and everything else in the project. But in more advanced configurations, a project can span multiple directories. -The rule of tumb for whether to include a directory here, and not +The rule of thumb for whether to include a directory here, and not in `project-library-roots', is whether its contents are meant to be edited together with the rest of the project. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index efd816b..178b5f0 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2071,7 +2071,7 @@ changes from the current branch." ;;;###autoload (defun vc-message-unresolved-conflicts (filename) "Display a message indicating unresolved conflicts in FILENAME." - ;; This enables all VC backends to give a standard, recognizeable + ;; This enables all VC backends to give a standard, recognizable ;; conflict message that indicates which file is conflicted. (message "There are unresolved conflicts in %s" filename)) diff --git a/src/alloc.c b/src/alloc.c index 81d644a..bee7cd1 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5346,7 +5346,7 @@ compact_font_cache_entry (Lisp_Object entry) } if (CONSP (objlist)) { - /* Foiund a marked font, bail out. */ + /* Found a marked font, bail out. */ break; } } diff --git a/src/nsterm.h b/src/nsterm.h index 3fb8cfc..1b330f0 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -126,7 +126,7 @@ nsterm.m : 6718: [ 4453] | | | | +->> (X:0 Y:0)/(W:1600 H:1177) Here, "ns_fullscreen_hook" calls "handleFS", which is turn calls "performZoom". This function calls "[super performZoom]", which - isn't annoted (so it doesn't show up in the trace). However, it + isn't annotated (so it doesn't show up in the trace). However, it calls "zoom" which is annotated so it is part of the call trace. Later, the method "windowWillUseStandardFrame" and the function "setFSValue" are called. The lines with "+---" contain extra @@ -230,7 +230,7 @@ void nstrace_leave(int *); /* Function enter macros. - NSTRACE (fmt, ...) -- Enable trace output in curent block + NSTRACE (fmt, ...) -- Enable trace output in current block (typically a function). Accepts printf-style arguments. diff --git a/src/nsterm.m b/src/nsterm.m index fabfa29..5e6c748 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6353,7 +6353,7 @@ not_in_argv (NSString *arg) /* Restrict the new size to the text gird. - Don't restict the width if the user only adjusted the height, and + Don't restrict the width if the user only adjusted the height, and vice versa. (Without this, the frame would shrink, and move slightly, if the window was resized by dragging one of its borders.) */ @@ -7591,7 +7591,7 @@ not_in_argv (NSString *arg) /* Constrain size and placement of a frame. By returning the original "frameRect", the frame is not - contrained. This can lead to unwanted situations where, for + constrained. This can lead to unwanted situations where, for example, the menu bar covers the frame. The default implementation (accessed using "super") constrains the @@ -7647,7 +7647,7 @@ not_in_argv (NSString *arg) #if 0 // Native zoom done using the standard zoom animation. Size of the - // resulting frame reduced to accomodate the Dock and, if present, + // resulting frame reduced to accommodate the Dock and, if present, // the menu-bar. [super zoom:sender]; @@ -7661,8 +7661,8 @@ not_in_argv (NSString *arg) // // This works for all practical purposes. (The only minor oddity is // when transiting from full-height frame to a maximized, the - // animation reduces the height of the frame slighty (to the 4 - // pixels needed to accomodate the Doc) before it snaps back into + // animation reduces the height of the frame slightly (to the 4 + // pixels needed to accommodate the Doc) before it snaps back into // full height. The user would need a very trained eye to spot // this.) NSScreen * screen = [self screen]; @@ -7702,8 +7702,8 @@ not_in_argv (NSString *arg) } } #else - // Non-native zoom which is done instantaneous. The resulting frame - // covert the entire scrren, except the menu-bar, if present. + // Non-native zoom which is done instantaneously. The resulting frame + // covers the entire screen, except the menu-bar, if present. NSScreen * screen = [self screen]; if (screen != nil) { diff --git a/src/window.c b/src/window.c index 7c95ff9..0ac76d4 100644 --- a/src/window.c +++ b/src/window.c @@ -210,7 +210,7 @@ wset_update_mode_line (struct window *w) { /* If this window is the selected window on its frame, set the global variable update_mode_lines, so that x_consider_frame_title - will consider this frame's title for rtedisplay. */ + will consider this frame's title for redisplay. */ Lisp_Object fselected_window = XFRAME (WINDOW_FRAME (w))->selected_window; if (WINDOWP (fselected_window) && XWINDOW (fselected_window) == w) diff --git a/test/etags/cp-src/clheir.hpp b/test/etags/cp-src/clheir.hpp index a924563..55d9122 100644 --- a/test/etags/cp-src/clheir.hpp +++ b/test/etags/cp-src/clheir.hpp @@ -17,7 +17,7 @@ public: generic_object(); // enter generic_object into ObjectRegistry // We never copy generic_objects, so we don't need a copy constructor. ~generic_object(void); // delete from ObjectRegistry - // Simulation steps, accomodate different kinds of time + // Simulation steps, accommodate different kinds of time virtual void compute_next_state(void) { } virtual void step(void) { } }; commit d149ca81c33ab95900306c3c71f6eff62a3ec1a1 Author: Artur Malabarba Date: Tue Nov 10 13:47:42 2015 +0000 * doc/lispref/variables.texi (Directory Local Variables): Document dir-locals wildcards * lisp/files.el (dir-locals-file): Point to Info node. * doc/emacs/custom.texi (Directory Variables): Document dir-locals wildcards. * etc/NEWS: Document new functionality. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 76c7261..8441c88 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1290,7 +1290,11 @@ accomplished with @dfn{directory-local variables}. named @file{.dir-locals.el}@footnote{ On MS-DOS, the name of this file should be @file{_dir-locals.el}, due to limitations of the DOS filesystems. If the filesystem is limited to 8+3 file names, the name -of the file will be truncated by the OS to @file{_dir-loc.el}. } in a +of the file will be truncated by the OS to @file{_dir-loc.el}. +}@footnote{ You can also use files like @file{.dir-locals2.el}, which +are loaded in addition. This is useful when @file{.dir-locals.el} is +under version control in a shared repository and can't be used for +personal customizations. } in a directory. Whenever Emacs visits any file in that directory or any of its subdirectories, it will apply the directory-local variables specified in @file{.dir-locals.el}, as though they had been defined as diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 1d92094..f49d506 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1765,20 +1765,33 @@ variables: by putting them in a special file, or by defining a @dfn{project class} for that directory. @defvr Constant dir-locals-file -This constant is the name of the file where Emacs expects to find the -directory-local variables. The name of the file is -@file{.dir-locals.el}@footnote{ -The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to +This constant is a wildcard pattern matching the name of files where +Emacs expects to find directory-local variables. Its value is +@file{.dir-locals*.el}@footnote{ +The MS-DOS version of Emacs uses @file{_dir-locals*.el} instead, due to limitations of the DOS filesystems. -}. A file by that name in a directory causes Emacs to apply its -settings to any file in that directory or any of its subdirectories -(optionally, you can exclude subdirectories; see below). -If some of the subdirectories have their own @file{.dir-locals.el} -files, Emacs uses the settings from the deepest file it finds starting -from the file's directory and moving up the directory tree. The file -specifies local variables as a specially formatted list; see -@ref{Directory Variables, , Per-directory Local Variables, emacs, The -GNU Emacs Manual}, for more details. +}, and the most common file name to use is @file{.dir-locals.el}. + +Any file matching this name pattern in a directory causes Emacs to +apply its settings when visiting files in that directory or any of its +subdirectories (optionally, you can exclude subdirectories; see +below). +If some of the subdirectories have their own file matching +@file{.dir-locals*.el}, Emacs uses the settings from the deepest file +it finds starting from the file's directory and moving up the +directory tree. The file specifies local variables as a specially +formatted list; see @ref{Directory Variables, , Per-directory Local +Variables, emacs, The GNU Emacs Manual}, for more details. + +If the same directory contains multiple such files (for instance, +@file{.dir-locals.el} and @file{.dir-locals2.el}), then all of them +are used in @code{string<} order. This means that, if two files +specify different values for the same variable, the file sorted after +will override the value of the previous file (for instance, values in +@file{.dir-locals2.el} override those in @file{.dir-locals.el}). Note +that, because of how lexicographic order works, values in +@file{.dir-locals10.el} are overriden by values in @file{.dir-locals2.el}. +This can be avoided by using @file{.dir-locals02.el} instead. @end defvr @defun hack-dir-local-variables diff --git a/etc/NEWS b/etc/NEWS index 4c5639f..f3df92e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -103,6 +103,9 @@ and can contain escape sequences for command keys, quotes, and the like. * Changes in Emacs 25.1 +** Any file of the form .dir-locals*.el is now considered a dir-local + file, and multiple can be used in the same directory. See the + variable `dir-locals-file' for more information. ** `xref-find-definitions' and `describe-function' now display information about mode local overrides (defined by cedet/mode-local.el `define-overloadable-function' and diff --git a/lisp/files.el b/lisp/files.el index b4ede78..fdda9b2 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3701,7 +3701,11 @@ VARIABLES list of the class. The list is processed in order. (defconst dir-locals-file ".dir-locals*.el" "Pattern for files that contain directory-local variables. It has to be constant to enforce uniform values across different -environments and users.") +environments and users. + +Multiple dir-locals files in the same directory are loaded in +`string<' order. +See Info node `(elisp)Directory Local Variables' for details.") (defun dir-locals--all-files (file-or-dir) "Return a list of all readable dir-locals files matching FILE-OR-DIR. commit 9145e79dc2042fb477959ddda59c3e2ff5fa3914 Author: Artur Malabarba Date: Tue Nov 10 13:26:00 2015 +0000 * lisp/files.el: Don't allow customization of dir-locals sorting In retrospect, this is not a good idea for the same reason that `dir-locals-file' is a defconst, because it is important that this behaviour be "uniform across different environments and users". Sure, the user can still change the sorting with a hack, but we shouldn't encourage them to change it. (dir-locals--all-files): Return list in the order returned by `file-expand-wildcards'. (file-expand-wildcards): Document the sorting predicate used. (dir-locals-sort-predicate): Delete variable. diff --git a/lisp/files.el b/lisp/files.el index efba15e..b4ede78 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3699,36 +3699,28 @@ VARIABLES list of the class. The list is processed in order. (setf (alist-get class dir-locals-class-alist) variables)) (defconst dir-locals-file ".dir-locals*.el" - "File that contains directory-local variables. -It has to be constant to enforce uniform values -across different environments and users.") - -(defcustom dir-locals-sort-predicate #'string< - "Predicate used to sort dir-locals files before loading them. -The function should take two arguments (file names) and return -non-nil if the first argument should be loaded first (which means -the values in the second file will override those in the first)." - :group 'files - :type 'function) + "Pattern for files that contain directory-local variables. +It has to be constant to enforce uniform values across different +environments and users.") (defun dir-locals--all-files (file-or-dir) "Return a list of all readable dir-locals files matching FILE-OR-DIR. If FILE-OR-DIR is a file pattern, expand wildcards in it and return a sorted list of the results. If it is a directory name, return a sorted list of all files matching `dir-locals-file' in -this directory." +this directory. +The returned list is sorted by `string<' order." (require 'seq) (let ((default-directory (if (file-directory-p file-or-dir) file-or-dir default-directory))) - (sort (seq-filter (lambda (f) (and (file-readable-p f) - (file-regular-p f))) - (file-expand-wildcards - (cond ((not (file-directory-p file-or-dir)) file-or-dir) - ((eq system-type 'ms-dos) (dosified-file-name dir-locals-file)) - (t dir-locals-file)) - 'full)) - dir-locals-sort-predicate))) + (seq-filter (lambda (f) (and (file-readable-p f) + (file-regular-p f))) + (file-expand-wildcards + (cond ((not (file-directory-p file-or-dir)) file-or-dir) + ((eq system-type 'ms-dos) (dosified-file-name dir-locals-file)) + (t dir-locals-file)) + 'full)))) (defun dir-locals-find-file (file) "Find the directory-local variables for FILE. @@ -6087,6 +6079,7 @@ by `sh' are supported." (defun file-expand-wildcards (pattern &optional full) "Expand wildcard pattern PATTERN. This returns a list of file names which match the pattern. +Files are sorted in `string<' order. If PATTERN is written as an absolute file name, the values are absolute also. commit 77cebbc1e77edf23bc2c23a218b56d9d6ad68e74 Author: Artur Malabarba Date: Tue Nov 10 13:14:49 2015 +0000 * lisp/files.el (dir-locals-read-from-file): Better handle errors diff --git a/lisp/files.el b/lisp/files.el index 58ed357..efba15e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3808,6 +3808,7 @@ is found. Returns the new class name." (class-name (intern dir-name)) (files (dir-locals--all-files file)) (read-circle nil) + (success nil) (variables)) (with-demoted-errors "Error reading dir-locals: %S" (dolist (file files) @@ -3818,13 +3819,19 @@ is found. Returns the new class name." (map-merge-with 'list (lambda (a b) (map-merge 'list a b)) variables (read (current-buffer)))) - (end-of-file nil))))) + (end-of-file nil)))) + (setq success t)) (dir-locals-set-class-variables class-name variables) (dir-locals-set-directory-class dir-name class-name - (seconds-to-time (apply #'max (mapcar (lambda (file) - (time-to-seconds (nth 5 (file-attributes file)))) - files)))) + (seconds-to-time + (if success + (apply #'max (mapcar (lambda (file) + (time-to-seconds (nth 5 (file-attributes file)))) + files)) + ;; If there was a problem, use the values we could get but + ;; don't let the cache prevent future reads. + 0))) class-name)) (defcustom enable-remote-dir-locals nil commit 4d82aa3abdad1871b99f0a9e56fe54ec497bd290 Author: Artur Malabarba Date: Tue Nov 10 13:04:02 2015 +0000 * lisp/isearch.el (search-default-regexp-mode): change default value diff --git a/lisp/isearch.el b/lisp/isearch.el index b762884..9f8ba8d 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -218,7 +218,7 @@ Default value, nil, means edit the string instead." (autoload 'character-fold-to-regexp "character-fold") -(defcustom search-default-regexp-mode nil +(defcustom search-default-regexp-mode #'character-fold-to-regexp "Default mode to use when starting isearch. Value is nil, t, or a function. commit 1e98f041acae7cee012b1b157d4aa3f80b226123 Author: Artur Malabarba Date: Tue Nov 10 04:13:25 2015 +0000 * lisp/files.el (dir-locals-find-file): Don't stop at unreadable files `locate-dominating-file' will now keep looking if the files it finds in a given directory are unreadable (or not files). diff --git a/lisp/files.el b/lisp/files.el index e8ee949..58ed357 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3751,26 +3751,16 @@ wildcards, then the return value is not a proper filename, it is an absolute version of `dir-locals-file' which is guaranteed to expand to at least one file." (setq file (expand-file-name file)) - (let* ((dir-locals-file-name (if (eq system-type 'ms-dos) - (dosified-file-name dir-locals-file) - dir-locals-file)) - (locals-dir (locate-dominating-file - (file-name-directory file) - (lambda (dir) - (let ((default-directory dir)) - (file-expand-wildcards dir-locals-file-name 'full))))) + (let* ((locals-dir (locate-dominating-file (file-name-directory file) + #'dir-locals--all-files)) locals-file dir-elt) ;; `locate-dominating-file' may have abbreviated the name. (when locals-dir (setq locals-dir (expand-file-name locals-dir)) - (setq locals-file (expand-file-name dir-locals-file-name locals-dir))) - ;; Let dir-locals-read-from-file inform us via demoted-errors - ;; about unreadable files, etc. - ;; Maybe we'd want to keep searching though - that is - ;; a locate-dominating-file issue. -;;; (or (not (file-readable-p locals-file)) -;;; (not (file-regular-p locals-file))) -;;; (setq locals-file nil)) + (setq locals-file (expand-file-name (if (eq system-type 'ms-dos) + (dosified-file-name dir-locals-file) + dir-locals-file) + locals-dir))) ;; Find the best cached value in `dir-locals-directory-cache'. (dolist (elt dir-locals-directory-cache) (when (and (string-prefix-p (car elt) file commit 2e8488858c7b8df40610c1cd3038348fdc9bf3ed Author: Artur Malabarba Date: Sat Nov 7 13:54:56 2015 +0000 * lisp/files.el (dir-locals-file): Allow wildcards (dir-locals-find-file, dir-locals-collect-variables) (dir-locals-read-from-file): Update accordingly. (hack-dir-local-variables): Rename a local variable. * lisp/files-x.el (modify-dir-local-variable): Update accordingly * lisp/help-fns.el (describe-variable): Update accordingly * .gitignore: Add .dir-locals?.el diff --git a/.gitignore b/.gitignore index 7f023b7..fda50e9 100644 --- a/.gitignore +++ b/.gitignore @@ -255,6 +255,7 @@ gnustmp* ChangeLog [0-9]*.patch [0-9]*.txt +.dir-locals?.el /vc-dwim-log-* # Built by 'make install'. diff --git a/lisp/files-x.el b/lisp/files-x.el index a130ffc..cf9fe91 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -429,18 +429,25 @@ from the MODE alist ignoring the input argument VALUE." (catch 'exit (unless enable-local-variables (throw 'exit (message "Directory-local variables are disabled"))) - (let ((variables-file (or (and (buffer-file-name) - (not (file-remote-p (buffer-file-name))) - (dir-locals-find-file (buffer-file-name))) - dir-locals-file)) + (let ((variables-file (and (buffer-file-name) + (not (file-remote-p (buffer-file-name))) + (dir-locals-find-file (buffer-file-name)))) variables) - (if (consp variables-file) ; result from cache - ;; If cache element has an mtime, assume it came from a file. - ;; Otherwise, assume it was set directly. - (setq variables-file (if (nth 2 variables-file) - (expand-file-name dir-locals-file - (car variables-file)) - (cadr variables-file)))) + (setq variables-file + ;; If there are several .dir-locals, the user probably + ;; wants to edit the last one (the highest priority). + (cond ((stringp variables-file) + (car (last (dir-locals--all-files variables-file)))) + ((consp variables-file) ; result from cache + ;; If cache element has an mtime, assume it came from a file. + ;; Otherwise, assume it was set directly. + (if (nth 2 variables-file) + (car (last (dir-locals--all-files (car variables-file)))) + (cadr variables-file))) + ;; Try to make a proper file-name. This doesn't cover all + ;; wildcards, but it covers the default value of `dir-locals-file'. + (t (replace-regexp-in-string + "\\*" "" (replace-regexp-in-string "\\?" "-" dir-locals-file))))) ;; I can't be bothered to handle this case right now. ;; Dir locals were set directly from a class. You need to ;; directly modify the class in dir-locals-class-alist. diff --git a/lisp/files.el b/lisp/files.el index 9de9ac0..e8ee949 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3648,7 +3648,7 @@ Return the new variables list." (error ;; The file's content might be invalid (e.g. have a merge conflict), but ;; that shouldn't prevent the user from opening the file. - (message ".dir-locals error: %s" (error-message-string err)) + (message "%s error: %s" dir-locals-file (error-message-string err)) nil)))) (defun dir-locals-set-directory-class (directory class &optional mtime) @@ -3698,11 +3698,38 @@ VARIABLES list of the class. The list is processed in order. applied by recursively following these rules." (setf (alist-get class dir-locals-class-alist) variables)) -(defconst dir-locals-file ".dir-locals.el" +(defconst dir-locals-file ".dir-locals*.el" "File that contains directory-local variables. It has to be constant to enforce uniform values across different environments and users.") +(defcustom dir-locals-sort-predicate #'string< + "Predicate used to sort dir-locals files before loading them. +The function should take two arguments (file names) and return +non-nil if the first argument should be loaded first (which means +the values in the second file will override those in the first)." + :group 'files + :type 'function) + +(defun dir-locals--all-files (file-or-dir) + "Return a list of all readable dir-locals files matching FILE-OR-DIR. +If FILE-OR-DIR is a file pattern, expand wildcards in it and +return a sorted list of the results. If it is a directory name, +return a sorted list of all files matching `dir-locals-file' in +this directory." + (require 'seq) + (let ((default-directory (if (file-directory-p file-or-dir) + file-or-dir + default-directory))) + (sort (seq-filter (lambda (f) (and (file-readable-p f) + (file-regular-p f))) + (file-expand-wildcards + (cond ((not (file-directory-p file-or-dir)) file-or-dir) + ((eq system-type 'ms-dos) (dosified-file-name dir-locals-file)) + (t dir-locals-file)) + 'full)) + dir-locals-sort-predicate))) + (defun dir-locals-find-file (file) "Find the directory-local variables for FILE. This searches upward in the directory tree from FILE. @@ -3719,75 +3746,96 @@ If not, the cache entry is cleared so that the file will be re-read. This function returns either nil (no directory local variables found), or the matching entry from `dir-locals-directory-cache' (a list), or the full path to the `dir-locals-file' (a string) in the case -of no valid cache entry." +of no valid cache entry. If `dir-locals-file' contains +wildcards, then the return value is not a proper filename, it is +an absolute version of `dir-locals-file' which is guaranteed to +expand to at least one file." (setq file (expand-file-name file)) - (let* ((dir-locals-file-name - (if (eq system-type 'ms-dos) - (dosified-file-name dir-locals-file) - dir-locals-file)) - (locals-file (locate-dominating-file file dir-locals-file-name)) - (dir-elt nil)) + (let* ((dir-locals-file-name (if (eq system-type 'ms-dos) + (dosified-file-name dir-locals-file) + dir-locals-file)) + (locals-dir (locate-dominating-file + (file-name-directory file) + (lambda (dir) + (let ((default-directory dir)) + (file-expand-wildcards dir-locals-file-name 'full))))) + locals-file dir-elt) ;; `locate-dominating-file' may have abbreviated the name. - (and locals-file - (setq locals-file (expand-file-name dir-locals-file-name locals-file))) - ;; Let dir-locals-read-from-file inform us via demoted-errors - ;; about unreadable files, etc. - ;; Maybe we'd want to keep searching though - that is - ;; a locate-dominating-file issue. + (when locals-dir + (setq locals-dir (expand-file-name locals-dir)) + (setq locals-file (expand-file-name dir-locals-file-name locals-dir))) + ;; Let dir-locals-read-from-file inform us via demoted-errors + ;; about unreadable files, etc. + ;; Maybe we'd want to keep searching though - that is + ;; a locate-dominating-file issue. ;;; (or (not (file-readable-p locals-file)) ;;; (not (file-regular-p locals-file))) ;;; (setq locals-file nil)) ;; Find the best cached value in `dir-locals-directory-cache'. (dolist (elt dir-locals-directory-cache) (when (and (string-prefix-p (car elt) file - (memq system-type - '(windows-nt cygwin ms-dos))) - (> (length (car elt)) (length (car dir-elt)))) - (setq dir-elt elt))) + (memq system-type + '(windows-nt cygwin ms-dos))) + (> (length (car elt)) (length (car dir-elt)))) + (setq dir-elt elt))) (if (and dir-elt - (or (null locals-file) - (<= (length (file-name-directory locals-file)) - (length (car dir-elt))))) - ;; Found a potential cache entry. Check validity. - ;; A cache entry with no MTIME is assumed to always be valid - ;; (ie, set directly, not from a dir-locals file). - ;; Note, we don't bother to check that there is a matching class - ;; element in dir-locals-class-alist, since that's done by - ;; dir-locals-set-directory-class. - (if (or (null (nth 2 dir-elt)) - (let ((cached-file (expand-file-name dir-locals-file-name - (car dir-elt)))) - (and (file-readable-p cached-file) - (equal (nth 2 dir-elt) - (nth 5 (file-attributes cached-file)))))) - ;; This cache entry is OK. - dir-elt - ;; This cache entry is invalid; clear it. - (setq dir-locals-directory-cache - (delq dir-elt dir-locals-directory-cache)) - ;; Return the first existing dir-locals file. Might be the same - ;; as dir-elt's, might not (eg latter might have been deleted). - locals-file) + (or (null locals-dir) + (<= (length locals-dir) + (length (car dir-elt))))) + ;; Found a potential cache entry. Check validity. + ;; A cache entry with no MTIME is assumed to always be valid + ;; (ie, set directly, not from a dir-locals file). + ;; Note, we don't bother to check that there is a matching class + ;; element in dir-locals-class-alist, since that's done by + ;; dir-locals-set-directory-class. + (if (or (null (nth 2 dir-elt)) + (let ((cached-files (dir-locals--all-files (car dir-elt)))) + ;; The entry MTIME should match the most recent + ;; MTIME among matching files. + (and cached-files + (= (time-to-seconds (nth 2 dir-elt)) + (apply #'max (mapcar (lambda (f) (time-to-seconds (nth 5 (file-attributes f)))) + cached-files)))))) + ;; This cache entry is OK. + dir-elt + ;; This cache entry is invalid; clear it. + (setq dir-locals-directory-cache + (delq dir-elt dir-locals-directory-cache)) + ;; Return the first existing dir-locals file. Might be the same + ;; as dir-elt's, might not (eg latter might have been deleted). + locals-file) ;; No cache entry. locals-file))) (defun dir-locals-read-from-file (file) "Load a variables FILE and register a new class and instance. -FILE is the name of the file holding the variables to apply. +FILE is the absolute name of the file holding the variables to +apply. It may contain wildcards. The new class name is the same as the directory in which FILE is found. Returns the new class name." - (with-temp-buffer + (require 'map) + (let* ((dir-name (file-name-directory file)) + (class-name (intern dir-name)) + (files (dir-locals--all-files file)) + (read-circle nil) + (variables)) (with-demoted-errors "Error reading dir-locals: %S" - (insert-file-contents file) - (unless (zerop (buffer-size)) - (let* ((dir-name (file-name-directory file)) - (class-name (intern dir-name)) - (variables (let ((read-circle nil)) - (read (current-buffer))))) - (dir-locals-set-class-variables class-name variables) - (dir-locals-set-directory-class dir-name class-name - (nth 5 (file-attributes file))) - class-name))))) + (dolist (file files) + (with-temp-buffer + (insert-file-contents file) + (condition-case-unless-debug nil + (setq variables + (map-merge-with 'list (lambda (a b) (map-merge 'list a b)) + variables + (read (current-buffer)))) + (end-of-file nil))))) + (dir-locals-set-class-variables class-name variables) + (dir-locals-set-directory-class + dir-name class-name + (seconds-to-time (apply #'max (mapcar (lambda (file) + (time-to-seconds (nth 5 (file-attributes file)))) + files)))) + class-name)) (defcustom enable-remote-dir-locals nil "Non-nil means dir-local variables will be applied to remote files." @@ -3810,17 +3858,17 @@ This does nothing if either `enable-local-variables' or (not (file-remote-p (or (buffer-file-name) default-directory))))) ;; Find the variables file. - (let ((variables-file (dir-locals-find-file - (or (buffer-file-name) default-directory))) + (let ((file-pattern-or-cache (dir-locals-find-file + (or (buffer-file-name) default-directory))) (class nil) (dir-name nil)) (cond - ((stringp variables-file) - (setq dir-name (file-name-directory variables-file) - class (dir-locals-read-from-file variables-file))) - ((consp variables-file) - (setq dir-name (nth 0 variables-file)) - (setq class (nth 1 variables-file)))) + ((stringp file-pattern-or-cache) + (setq dir-name (file-name-directory file-pattern-or-cache) + class (dir-locals-read-from-file file-pattern-or-cache))) + ((consp file-pattern-or-cache) + (setq dir-name (nth 0 file-pattern-or-cache)) + (setq class (nth 1 file-pattern-or-cache)))) (when class (let ((variables (dir-locals-collect-variables diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 958a075..4e0bfee 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -907,29 +907,36 @@ if it is given a local binding.\n")))) (buffer-file-name buffer))) (dir-locals-find-file (buffer-file-name buffer)))) - (dir-file t)) + (is-directory nil)) (princ (substitute-command-keys " This variable's value is directory-local")) - (if (null file) - (princ ".\n") - (princ ", set ") - (if (consp file) ; result from cache - ;; If the cache element has an mtime, we - ;; assume it came from a file. - (if (nth 2 file) - (setq file (expand-file-name - dir-locals-file (car file))) - ;; Otherwise, assume it was set directly. - (setq file (car file) - dir-file nil))) - (princ (substitute-command-keys - (if dir-file - "by the file\n `" - "for the directory\n `"))) + (when (consp file) ; result from cache + ;; If the cache element has an mtime, we + ;; assume it came from a file. + (if (nth 2 file) + (setq file (expand-file-name + dir-locals-file (car file))) + ;; Otherwise, assume it was set directly. + (setq file (car file) + is-directory t))) + (if (null file) + (princ ".\n") + (princ ", set ") + (let ((files (file-expand-wildcards file))) + (princ (substitute-command-keys + (cond + (is-directory "for the directory\n `") + ;; Many files matched. + ((cdr files) + (setq file (file-name-directory (car files))) + (format "by a file\n matching `%s' in the directory\n `" + dir-locals-file)) + (t (setq file (car files)) + "by the file\n `")))) (with-current-buffer standard-output (insert-text-button file 'type 'help-dir-local-var-def - 'help-args (list variable file))) + 'help-args (list variable file)))) (princ (substitute-command-keys "'.\n")))) (princ (substitute-command-keys " This variable's value is file-local.\n")))) commit cbaa04014e0c9efdfc6393bccde0e6579b5d7051 Author: Artur Malabarba Date: Sat Nov 7 12:45:18 2015 +0000 * lisp/emacs-lisp/map.el (map-merge-with): New function * test/automated/map-tests.el (test-map-merge-with): New test diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index 5ef51f1..7ff9031 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -279,9 +279,9 @@ MAP can be a list, hash-table or array." MAP can be a list, hash-table or array." (catch 'map--break (map-apply (lambda (key value) - (or (funcall pred key value) - (throw 'map--break nil))) - map) + (or (funcall pred key value) + (throw 'map--break nil))) + map) t)) (defun map-merge (type &rest maps) @@ -291,8 +291,23 @@ MAP can be a list, hash-table or array." (let (result) (while maps (map-apply (lambda (key value) - (setf (map-elt result key) value)) - (pop maps))) + (setf (map-elt result key) value)) + (pop maps))) + (map-into result type))) + +(defun map-merge-with (type function &rest maps) + "Merge into a map of type TYPE all the key/value pairs in MAPS. +When two maps contain the same key, call FUNCTION on the two +values and use the value returned by it. +MAP can be a list, hash-table or array." + (let (result) + (while maps + (map-apply (lambda (key value) + (setf (map-elt result key) + (if (map-contains-key result key) + (funcall function (map-elt result key) value) + value))) + (pop maps))) (map-into result type))) (defun map-into (map type) diff --git a/test/automated/map-tests.el b/test/automated/map-tests.el index 8693415..1a759b5 100644 --- a/test/automated/map-tests.el +++ b/test/automated/map-tests.el @@ -320,5 +320,12 @@ Evaluate BODY for each created map. (should (= b 2)) (should (null c)))) +(ert-deftest test-map-merge-with () + (should (equal (map-merge-with 'list #'+ + '((1 . 2)) + '((1 . 3) (2 . 4)) + '((1 . 1) (2 . 5) (3 . 0))) + '((3 . 0) (2 . 9) (1 . 6))))) + (provide 'map-tests) ;;; map-tests.el ends here commit cbc51211f9e4f8f3d4b8a1feaa6cbfd2fd4ac1ca Author: Dmitry Gutov Date: Tue Nov 10 04:39:32 2015 +0200 ; project-library-roots-function: Update the FIXME diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 58d5335..295e544 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -38,8 +38,9 @@ Each functions on this hook is called in turn with one argument (the directory) and should return either nil to mean that it is not applicable, or a project instance.") -;; FIXME: Using the current approach, we don't have access to the -;; "library roots" of language A from buffers of language B, which +;; FIXME: Using the current approach, major modes are supposed to set +;; this variable to a buffer-local value. So we don't have access to +;; the "library roots" of language A from buffers of language B, which ;; seems desirable in multi-language projects, at least for some ;; potential uses, like "jump to a file in project or library". ;; commit 0f50e5163cf747fcf18124039a82b5156a48316b Author: Karl Fogel Date: Mon Nov 9 22:14:49 2015 -0600 Fix some recently-perturbed bookmark autoloads * lisp/bookmark.el (bookmark-set-internal): Remove unnecessary autoload. (bookmark-set): Restore autoload. (bookmark-set-no-overwrite): Add autoload. Thanks to Juanma Barranquero for noticing the autoload problems introduced by my recent commit adding/changing the above functions (Sun Nov 8 14:16:43 2015 -0500, git commit 3812e17978). diff --git a/lisp/bookmark.el b/lisp/bookmark.el index e3b1dc4..0729bdd 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -756,7 +756,6 @@ This expects to be called from `point-min' in a bookmark file." (define-key map "\C-w" 'bookmark-yank-word) map)) -;;;###autoload (defun bookmark-set-internal (prompt name overwrite-or-push) "Interactively set a bookmark named NAME at the current location. @@ -824,6 +823,7 @@ is ever deleted." (setq bookmark-current-buffer nil))) +;;;###autoload (defun bookmark-set (&optional name no-overwrite) "Set a bookmark named NAME at the current location. If NAME is nil, then prompt the user. @@ -853,6 +853,7 @@ the list of bookmarks.)" (if no-overwrite "Set bookmark" "Set bookmark unconditionally"))) (bookmark-set-internal prompt name (if no-overwrite 'push 'overwrite)))) +;;;###autoload (defun bookmark-set-no-overwrite (&optional name push-bookmark) "Set a bookmark named NAME at the current location. If NAME is nil, then prompt the user. commit f5eac7baefacd8944a1851596a944fd29dec98fa Author: Noah Friedman Date: Mon Nov 9 17:34:40 2015 -0800 (ydump-buffer): Handle case where gap is at the start of buffer. I don't recall if older versions of gdb were less strict but you cannot dump a 0-length range in gdb 7.9.1. diff --git a/etc/emacs-buffer.gdb b/etc/emacs-buffer.gdb index cdcb666..8f6c321 100644 --- a/etc/emacs-buffer.gdb +++ b/etc/emacs-buffer.gdb @@ -33,7 +33,7 @@ # 'ysave-buffer', and 'ybuffer-contents'. The 'y' prefix avoids any # namespace collisions with emacs/src/.gdbinit. -# Since the internal data structures in Emacs occasionally from time to +# Since the internal data structures in Emacs change from time to # time, you should use the version of this file that came with your # particular Emacs version; older versions might not work anymore. @@ -213,8 +213,12 @@ define ydump-buffer set $endptr = $beg + $buf->gpt_byte - 1 dump binary memory $arg1 $beg $endptr else - dump binary memory $arg1 $beg $gap-1 - append binary memory $arg1 $gap_end $end + if $gap - $beg > 1 + dump binary memory $arg1 $beg $gap-1 + append binary memory $arg1 $gap_end $end + else + dump binary memory $arg1 $gap_end $end + end set $endptr = $end end end commit 82d59f1b3ba6d7ad9d9cd0af15e237f97bb5906b Author: Dmitry Gutov Date: Tue Nov 10 02:56:55 2015 +0200 * lisp/progmodes/project.el: Update Commentary. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 0da6084..58d5335 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -21,7 +21,8 @@ ;; This file contains generic infrastructure for dealing with ;; projects, and a number of public functions: finding the current -;; root, related project directories, search path, etc. +;; root, related project directories, and library directories. This +;; list is to be extended in future versions. ;; ;; The goal is to make it easier for Lisp programs to operate on the ;; current project, without having to know which package handles commit 0be6fb8e17f708fe03430d0b1e701810ae51b5e3 Merge: 3c3aad7 1c72afb Author: Dmitry Gutov Date: Tue Nov 10 02:47:46 2015 +0200 Merge branch 'project-next' commit 1c72afb7aa48c2ea06103113ef70ccea0c1c961d Author: Dmitry Gutov Date: Tue Nov 10 02:41:06 2015 +0200 Fold `project-ask-user' into `project-current' * lisp/progmodes/project.el (project-find-functions): Remove `project-ask-user'. (project-ask-user): Remove function and the corresponding `project-roots' implementation. (project-current): Add a new argument, MAYBE-PROMPT. Prompt the user in case there's no project in the current directory. Update all callers. diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 298c7a7..29257cd 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -809,7 +809,7 @@ non-nil result supercedes the xrefs produced by (cl-mapcan (lambda (dir) (xref-collect-references symbol dir)) - (let ((pr (project-current))) + (let ((pr (project-current t))) (append (project-roots pr) (project-library-roots pr))))) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 2d7537a..38c5cc2 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -2098,7 +2098,7 @@ for \\[find-tag] (which see)." (cl-mapcan (lambda (dir) (xref-collect-references symbol dir)) - (let ((pr (project-current))) + (let ((pr (project-current t))) (append (project-roots pr) (project-library-roots pr))))) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 9cdeb39..0da6084 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -31,8 +31,7 @@ (require 'cl-generic) -(defvar project-find-functions (list #'project-try-vc - #'project-ask-user) +(defvar project-find-functions (list #'project-try-vc) "Special hook to find the project containing a given directory. Each functions on this hook is called in turn with one argument (the directory) and should return either nil to mean @@ -67,9 +66,22 @@ The directory names should be absolute. Used in the default implementation of `project-library-roots'.") ;;;###autoload -(defun project-current (&optional dir) - "Return the project instance in DIR or `default-directory'." +(defun project-current (&optional maybe-prompt dir) + "Return the project instance in DIR or `default-directory'. +When no project found in DIR, and MAYBE-PROMPT is non-nil, ask +the user for a different directory to look in." (unless dir (setq dir default-directory)) + (let ((pr (project--find-in-directory dir))) + (cond + (pr) + (maybe-prompt + (setq dir (read-directory-name "Choose the project directory: " dir nil t) + pr (project--find-in-directory dir)) + (unless pr + (user-error "No project found in `%s'" dir)))) + pr)) + +(defun project--find-in-directory (dir) (run-hook-with-args-until-success 'project-find-functions dir)) ;; FIXME: Add MODE argument, like in `ede-source-paths'? @@ -165,12 +177,6 @@ The file names can be absolute, or relative to the project root." (project--value-in-dir 'project-vc-ignores root) (cl-call-next-method)))) -(defun project-ask-user (dir) - (cons 'user (read-directory-name "Project root: " dir nil t))) - -(cl-defmethod project-roots ((project (head user))) - (list (cdr project))) - (defun project-combine-directories (&rest lists-of-dirs) "Return a sorted and culled list of directory names. Appends the elements of LISTS-OF-DIRS together, removes @@ -193,8 +199,8 @@ whose is already in the list." (defun project-subtract-directories (files dirs) "Return a list of elements from FILES that are outside of DIRS. DIRS must contain directory names." - (cl-set-difference files dirs - :test (lambda (file dir) (string-prefix-p dir file)))) + ;; Sidestep the issue of expanded/abbreviated file names here. + (cl-set-difference files dirs :test #'file-in-directory-p)) (defun project--value-in-dir (var dir) (with-temp-buffer @@ -212,7 +218,7 @@ DIRS must contain directory names." With \\[universal-argument] prefix, you can specify the directory to search in, and the file name pattern to search for." (interactive (list (project--read-regexp))) - (let* ((pr (project-current)) + (let* ((pr (project-current t)) (dirs (if current-prefix-arg (list (read-directory-name "Base directory: " nil default-directory t)) @@ -225,7 +231,7 @@ to search in, and the file name pattern to search for." With \\[universal-argument] prefix, you can specify the file name pattern to search for." (interactive (list (project--read-regexp))) - (let* ((pr (project-current)) + (let* ((pr (project-current t)) (dirs (append (project-roots pr) (project-library-roots pr)))) commit 3c3aad733522365a8fe729d7c92e64e98bc4ce92 Author: Karl Fogel Date: Mon Nov 9 15:57:23 2015 -0600 When VC detects a conflict, specify which file * lisp/vc/vc.el (vc-message-unresolved-conflicts): New function. * lisp/vc/vc-svn.el (vc-svn-find-file-hook): * lisp/vc/vc-hg.el (vc-hg-find-file-hook): * lisp/vc/vc-bzr.el (vc-bzr-find-file-hook): * lisp/vc/vc-git.el (vc-git-find-file-hook): Use above new function to display a standard message that specifies the conflicted file. Before this change, the message VC used for indicating a conflicted file was just "There are unresolved conflicts in this file" without naming the file (and this language was duplicated in several places). After this change, it's "There are unresolved conflicts in file FOO" (and this language is now centralized in one function in vc.el). Justification: It's important for the message to name the conflicted file because the moment when VC realizes a file is conflicted does not always come interactively. For example, some people automatically find a set of Org Mode files on startup, and may keep those .org files under version control. If any of the files are conflicted, the user just sees some messages fly by, and might later check the "*Messages*" buffer to find out what files were conflicted. I'm not saying this happened to me or anything; it's a purely hypothetical example. diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 9b2711d..caedbd9 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -517,7 +517,7 @@ in the branch repository (or whose status not be determined)." ;; elisp function to remerge from the .BASE/OTHER/THIS files. (smerge-start-session) (add-hook 'after-save-hook 'vc-bzr-resolve-when-done nil t) - (message "There are unresolved conflicts in this file"))) + (vc-message-unresolved-conflicts buffer-file-name))) (defun vc-bzr-version-dirstate (dir) "Try to return as a string the bzr revision ID of directory DIR. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 27898a9..8bf37f0 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -841,7 +841,7 @@ This prompts for a branch to merge from." (smerge-start-session) (when vc-git-resolve-conflicts (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local)) - (message "There are unresolved conflicts in this file"))) + (vc-message-unresolved-conflicts buffer-file-name))) ;;; HISTORY FUNCTIONS diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index f9957c1..92b0c31 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -535,7 +535,7 @@ REV is the revision to check out into WORKFILE." (vc-file-setprop buffer-file-name 'vc-state 'conflict) (smerge-start-session) (add-hook 'after-save-hook 'vc-hg-resolve-when-done nil t) - (message "There are unresolved conflicts in this file"))) + (vc-message-unresolved-conflicts buffer-file-name))) ;; Modeled after the similar function in vc-bzr.el diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 4ef63a2..de58fb9 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -686,7 +686,7 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." ;; use conflict markers in which case we don't really know what to do. ;; So let's just punt for now. nil) - (message "There are unresolved conflicts in this file"))) + (vc-message-unresolved-conflicts buffer-file-name))) (defun vc-svn-parse-status (&optional filename) "Parse output of \"svn status\" command in the current buffer. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index f08e562..28ddeb3 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2068,6 +2068,13 @@ changes from the current branch." (message "File contains conflicts."))) ;;;###autoload +(defun vc-message-unresolved-conflicts (filename) + "Display a message indicating unresolved conflicts in FILENAME." + ;; This enables all VC backends to give a standard, recognizeable + ;; conflict message that indicates which file is conflicted. + (message "There are unresolved conflicts in %s" filename)) + +;;;###autoload (defalias 'vc-resolve-conflicts 'smerge-ediff) ;; TODO: This is OK but maybe we could integrate it better. commit 86c19714b097aa477d339ed99ffb5136c755a046 Author: Eli Zaretskii Date: Mon Nov 9 20:31:45 2015 +0200 Fix assertion violation in define-key * src/keymap.c (store_in_keymap): Don't use XFASTINT on non-character objects. Reported by Drew Adams and Juanma Barranquero . diff --git a/src/keymap.c b/src/keymap.c index c28885ab..67a4a10 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -853,7 +853,9 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def) XSETCDR (elt, def); return def; } - else if (CONSP (idx) && CHARACTERP (XCAR (idx))) + else if (CONSP (idx) + && CHARACTERP (XCAR (idx)) + && CHARACTERP (XCAR (elt))) { int from = XFASTINT (XCAR (idx)); int to = XFASTINT (XCDR (idx)); commit c6c16fb3f8fe5909baafd53c6b26153dec021064 Author: Dima Kogan Date: Mon Nov 9 18:36:05 2015 +0200 Fix a memory leak in GC of font cache * src/alloc.c (compact_font_cache_entry): Don't GC unmarked font entities if some of the fonts it references are marked. This plugs a memory leak. (Bug#21556) diff --git a/src/alloc.c b/src/alloc.c index 60751bc..81d644a 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5328,11 +5328,35 @@ compact_font_cache_entry (Lisp_Object entry) are not marked too. But we must be sure that nothing is marked within OBJ before we really drop it. */ for (i = 0; i < size; i++) - if (VECTOR_MARKED_P (XFONT_ENTITY (AREF (XCDR (obj), i)))) - break; + { + Lisp_Object objlist; + + if (VECTOR_MARKED_P (XFONT_ENTITY (AREF (XCDR (obj), i)))) + break; + + objlist = AREF (AREF (XCDR (obj), i), FONT_OBJLIST_INDEX); + for (; CONSP (objlist); objlist = XCDR (objlist)) + { + Lisp_Object val = XCAR (objlist); + struct font *font = XFONT_OBJECT (val); + + if (!NILP (AREF (val, FONT_TYPE_INDEX)) + && VECTOR_MARKED_P(font)) + break; + } + if (CONSP (objlist)) + { + /* Foiund a marked font, bail out. */ + break; + } + } if (i == size) - drop = 1; + { + /* No marked fonts were found, so this entire font + entity can be dropped. */ + drop = 1; + } } if (drop) *prev = XCDR (tail); commit 1087305574fd61256d66eb0c995f8bb74bd91afe Author: Paul Eggert Date: Sun Nov 8 22:47:01 2015 -0800 Use INT_ADD_WRAPV etc. to check integer overflow * src/alloc.c (xnmalloc, xnrealloc, xpalloc, Fmake_string): * src/buffer.c (record_overlay_string, overlay_strings): * src/casefiddle.c (casify_object): * src/ccl.c (Fccl_execute_on_string): * src/character.c (char_width, c_string_width, lisp_string_width) (count_size_as_multibyte, string_escape_byte8): * src/coding.c (coding_alloc_by_realloc, produce_chars): * src/data.c (arith_driver): * src/dispnew.c (realloc_glyph_pool, init_display): * src/editfns.c (styled_format): * src/fns.c (Ffillarray): * src/ftfont.c (ftfont_shape_by_flt): * src/gnutls.c (gnutls_hex_string): * src/gtkutil.c (get_utf8_string): * src/image.c (x_to_xcolors, x_detect_edges, png_load_body): * src/keymap.c (Fkey_description): * src/lisp.h (SAFE_ALLOCA_LISP): * src/term.c (encode_terminal_code): * src/tparam.c (tparam1): * src/xselect.c (x_property_data_to_lisp): * src/xsmfns.c (smc_save_yourself_CB): * src/xterm.c (x_term_init): When checking for integer overflow, prefer INT_MULTIPLY_WRAPV to more-complicated code involving division and/or INT_MULTIPLY_OVERFLOW, and similarly for INT_ADD_WRAPV and subtraction and/or INT_ADD_OVERFLOW. * src/casefiddle.c (casify_object): Simplify multibyte size check. * src/character.c: Remove some obsolete ‘#ifdef emacs’s. * src/data.c (arith_driver): Also check for division overflow, as that’s now possible given that the accumulator can now contain any Emacs integer. * src/lisp.h (lisp_word_count): Remove; no longer used. diff --git a/src/alloc.c b/src/alloc.c index 8f94d2b..60751bc 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -802,9 +802,10 @@ void * xnmalloc (ptrdiff_t nitems, ptrdiff_t item_size) { eassert (0 <= nitems && 0 < item_size); - if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems) + ptrdiff_t nbytes; + if (INT_MULTIPLY_WRAPV (nitems, item_size, &nbytes) || SIZE_MAX < nbytes) memory_full (SIZE_MAX); - return xmalloc (nitems * item_size); + return xmalloc (nbytes); } @@ -815,9 +816,10 @@ void * xnrealloc (void *pa, ptrdiff_t nitems, ptrdiff_t item_size) { eassert (0 <= nitems && 0 < item_size); - if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems) + ptrdiff_t nbytes; + if (INT_MULTIPLY_WRAPV (nitems, item_size, &nbytes) || SIZE_MAX < nbytes) memory_full (SIZE_MAX); - return xrealloc (pa, nitems * item_size); + return xrealloc (pa, nbytes); } @@ -848,33 +850,43 @@ void * xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min, ptrdiff_t nitems_max, ptrdiff_t item_size) { + ptrdiff_t n0 = *nitems; + eassume (0 < item_size && 0 < nitems_incr_min && 0 <= n0 && -1 <= nitems_max); + /* The approximate size to use for initial small allocation requests. This is the largest "small" request for the GNU C library malloc. */ enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; /* If the array is tiny, grow it to about (but no greater than) - DEFAULT_MXFAST bytes. Otherwise, grow it by about 50%. */ - ptrdiff_t n = *nitems; - ptrdiff_t tiny_max = DEFAULT_MXFAST / item_size - n; - ptrdiff_t half_again = n >> 1; - ptrdiff_t incr_estimate = max (tiny_max, half_again); - - /* Adjust the increment according to three constraints: NITEMS_INCR_MIN, + DEFAULT_MXFAST bytes. Otherwise, grow it by about 50%. + Adjust the growth according to three constraints: NITEMS_INCR_MIN, NITEMS_MAX, and what the C language can represent safely. */ - ptrdiff_t C_language_max = min (PTRDIFF_MAX, SIZE_MAX) / item_size; - ptrdiff_t n_max = (0 <= nitems_max && nitems_max < C_language_max - ? nitems_max : C_language_max); - ptrdiff_t nitems_incr_max = n_max - n; - ptrdiff_t incr = max (nitems_incr_min, min (incr_estimate, nitems_incr_max)); - eassert (0 < item_size && 0 < nitems_incr_min && 0 <= n && -1 <= nitems_max); + ptrdiff_t n, nbytes; + if (INT_ADD_WRAPV (n0, n0 >> 1, &n)) + n = PTRDIFF_MAX; + if (0 <= nitems_max && nitems_max < n) + n = nitems_max; + + ptrdiff_t adjusted_nbytes + = ((INT_MULTIPLY_WRAPV (n, item_size, &nbytes) || SIZE_MAX < nbytes) + ? min (PTRDIFF_MAX, SIZE_MAX) + : nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0); + if (adjusted_nbytes) + { + n = adjusted_nbytes / item_size; + nbytes = adjusted_nbytes - adjusted_nbytes % item_size; + } + if (! pa) *nitems = 0; - if (nitems_incr_max < incr) + if (n - n0 < nitems_incr_min + && (INT_ADD_WRAPV (n0, nitems_incr_min, &n) + || (0 <= nitems_max && nitems_max < n) + || INT_MULTIPLY_WRAPV (n, item_size, &nbytes))) memory_full (SIZE_MAX); - n += incr; - pa = xrealloc (pa, n * item_size); + pa = xrealloc (pa, nbytes); *nitems = n; return pa; } @@ -2104,9 +2116,8 @@ INIT must be an integer that represents a character. */) EMACS_INT string_len = XINT (length); unsigned char *p, *beg, *end; - if (string_len > STRING_BYTES_MAX / len) + if (INT_MULTIPLY_WRAPV (len, string_len, &nbytes)) string_overflow (); - nbytes = len * string_len; val = make_uninit_multibyte_string (string_len, nbytes); for (beg = SDATA (val), p = beg, end = beg + nbytes; p < end; p += len) { diff --git a/src/buffer.c b/src/buffer.c index c0179c7..ab91aaa 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3245,9 +3245,9 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, else nbytes = SBYTES (str); - if (INT_ADD_OVERFLOW (ssl->bytes, nbytes)) + if (INT_ADD_WRAPV (ssl->bytes, nbytes, &nbytes)) memory_full (SIZE_MAX); - ssl->bytes += nbytes; + ssl->bytes = nbytes; if (STRINGP (str2)) { @@ -3259,9 +3259,9 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, else nbytes = SBYTES (str2); - if (INT_ADD_OVERFLOW (ssl->bytes, nbytes)) + if (INT_ADD_WRAPV (ssl->bytes, nbytes, &nbytes)) memory_full (SIZE_MAX); - ssl->bytes += nbytes; + ssl->bytes = nbytes; } } @@ -3357,9 +3357,8 @@ overlay_strings (ptrdiff_t pos, struct window *w, unsigned char **pstr) unsigned char *p; ptrdiff_t total; - if (INT_ADD_OVERFLOW (overlay_heads.bytes, overlay_tails.bytes)) + if (INT_ADD_WRAPV (overlay_heads.bytes, overlay_tails.bytes, &total)) memory_full (SIZE_MAX); - total = overlay_heads.bytes + overlay_tails.bytes; if (total > overlay_str_len) overlay_str_buf = xpalloc (overlay_str_buf, &overlay_str_len, total - overlay_str_len, -1, 1); diff --git a/src/casefiddle.c b/src/casefiddle.c index 8755353..b94ea8e 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -114,15 +114,15 @@ casify_object (enum case_action flag, Lisp_Object obj) ptrdiff_t i, i_byte, size = SCHARS (obj); int len; USE_SAFE_ALLOCA; - ptrdiff_t o_size = (size < STRING_BYTES_BOUND / MAX_MULTIBYTE_LENGTH - ? size * MAX_MULTIBYTE_LENGTH - : STRING_BYTES_BOUND); + ptrdiff_t o_size; + if (INT_MULTIPLY_WRAPV (size, MAX_MULTIBYTE_LENGTH, &o_size)) + o_size = PTRDIFF_MAX; unsigned char *dst = SAFE_ALLOCA (o_size); unsigned char *o = dst; for (i = i_byte = 0; i < size; i++, i_byte += len) { - if (o_size - (o - dst) < MAX_MULTIBYTE_LENGTH) + if (o_size - MAX_MULTIBYTE_LENGTH < o - dst) string_overflow (); c = STRING_CHAR_AND_LENGTH (SDATA (obj) + i_byte, len); if (inword && flag != CASE_CAPITALIZE_UP) diff --git a/src/ccl.c b/src/ccl.c index bf2aa12..9792717 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -2071,12 +2071,10 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY } buf_magnification = ccl.buf_magnification ? ccl.buf_magnification : 1; - - if ((min (PTRDIFF_MAX, SIZE_MAX) - 256) / buf_magnification < str_bytes) + outbufsize = str_bytes; + if (INT_MULTIPLY_WRAPV (buf_magnification, outbufsize, &outbufsize) + || INT_ADD_WRAPV (256, outbufsize, &outbufsize)) memory_full (SIZE_MAX); - outbufsize = (ccl.buf_magnification - ? str_bytes * ccl.buf_magnification + 256 - : str_bytes + 256); outp = outbuf = xmalloc (outbufsize); consumed_chars = consumed_bytes = 0; diff --git a/src/character.c b/src/character.c index 3e2bf1e..bc2fa4a 100644 --- a/src/character.c +++ b/src/character.c @@ -25,14 +25,10 @@ along with GNU Emacs. If not, see . */ /* At first, see the document in `character.h' to understand the code in this file. */ -#ifdef emacs #include -#endif #include -#ifdef emacs - #include #include #include "lisp.h" @@ -41,12 +37,6 @@ along with GNU Emacs. If not, see . */ #include "composite.h" #include "disptab.h" -#else /* not emacs */ - -#include "mulelib.h" - -#endif /* emacs */ - /* Char-table of information about which character to unify to which Unicode character. Mainly used by the macro MAYBE_UNIFY_CHAR. */ Lisp_Object Vchar_unify_table; @@ -302,9 +292,8 @@ char_width (int c, struct Lisp_Char_Table *dp) if (CHARACTERP (ch)) { int w = CHAR_WIDTH (XFASTINT (ch)); - if (INT_ADD_OVERFLOW (width, w)) + if (INT_ADD_WRAPV (width, w, &width)) string_overflow (); - width += w; } } } @@ -349,20 +338,16 @@ c_string_width (const unsigned char *str, ptrdiff_t len, int precision, int c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes); ptrdiff_t thiswidth = char_width (c, dp); - if (precision <= 0) - { - if (INT_ADD_OVERFLOW (width, thiswidth)) - string_overflow (); - } - else if (precision - width < thiswidth) + if (0 < precision && precision - width < thiswidth) { *nchars = i; *nbytes = i_byte; return width; } + if (INT_ADD_WRAPV (thiswidth, width, &width)) + string_overflow (); i++; i_byte += bytes; - width += thiswidth; } if (precision > 0) @@ -436,22 +421,16 @@ lisp_string_width (Lisp_Object string, ptrdiff_t precision, thiswidth = char_width (c, dp); } - if (precision <= 0) - { -#ifdef emacs - if (INT_ADD_OVERFLOW (width, thiswidth)) - string_overflow (); -#endif - } - else if (precision - width < thiswidth) + if (0 < precision && precision - width < thiswidth) { *nchars = i; *nbytes = i_byte; return width; } + if (INT_ADD_WRAPV (thiswidth, width, &width)) + string_overflow (); i += chars; i_byte += bytes; - width += thiswidth; } if (precision > 0) @@ -657,9 +636,8 @@ count_size_as_multibyte (const unsigned char *str, ptrdiff_t len) for (bytes = 0; str < endp; str++) { int n = *str < 0x80 ? 1 : 2; - if (INT_ADD_OVERFLOW (bytes, n)) + if (INT_ADD_WRAPV (bytes, n, &bytes)) string_overflow (); - bytes += n; } return bytes; } @@ -795,6 +773,7 @@ string_escape_byte8 (Lisp_Object string) ptrdiff_t nbytes = SBYTES (string); bool multibyte = STRING_MULTIBYTE (string); ptrdiff_t byte8_count; + ptrdiff_t thrice_byte8_count, uninit_nchars, uninit_nbytes; const unsigned char *src, *src_end; unsigned char *dst; Lisp_Object val; @@ -808,23 +787,23 @@ string_escape_byte8 (Lisp_Object string) if (byte8_count == 0) return string; + if (INT_MULTIPLY_WRAPV (byte8_count, 3, &thrice_byte8_count)) + string_overflow (); + if (multibyte) { - if ((MOST_POSITIVE_FIXNUM - nchars) / 3 < byte8_count - || (STRING_BYTES_BOUND - nbytes) / 2 < byte8_count) - string_overflow (); - /* Convert 2-byte sequence of byte8 chars to 4-byte octal. */ - val = make_uninit_multibyte_string (nchars + byte8_count * 3, - nbytes + byte8_count * 2); + if (INT_ADD_WRAPV (nchars, thrice_byte8_count, &uninit_nchars) + || INT_ADD_WRAPV (nbytes, 2 * byte8_count, &uninit_nbytes)) + string_overflow (); + val = make_uninit_multibyte_string (uninit_nchars, uninit_nbytes); } else { - if ((STRING_BYTES_BOUND - nbytes) / 3 < byte8_count) - string_overflow (); - /* Convert 1-byte sequence of byte8 chars to 4-byte octal. */ - val = make_uninit_string (nbytes + byte8_count * 3); + if (INT_ADD_WRAPV (thrice_byte8_count, nbytes, &uninit_nbytes)) + string_overflow (); + val = make_uninit_string (uninit_nbytes); } src = SDATA (string); @@ -981,8 +960,6 @@ character is not ASCII nor 8-bit character, an error is signaled. */) return make_number (c); } -#ifdef emacs - /* Return true if C is an alphabetic character. */ bool alphabeticp (int c) @@ -1131,5 +1108,3 @@ See The Unicode Standard for the meaning of those values. */); /* The correct char-table is setup in characters.el. */ Vunicode_category_table = Qnil; } - -#endif /* emacs */ diff --git a/src/coding.c b/src/coding.c index 0b42a36..85b97ce 100644 --- a/src/coding.c +++ b/src/coding.c @@ -1008,11 +1008,12 @@ coding_change_destination (struct coding_system *coding) static void coding_alloc_by_realloc (struct coding_system *coding, ptrdiff_t bytes) { - if (STRING_BYTES_BOUND - coding->dst_bytes < bytes) + ptrdiff_t newbytes; + if (INT_ADD_WRAPV (coding->dst_bytes, bytes, &newbytes) + || SIZE_MAX < newbytes) string_overflow (); - coding->destination = xrealloc (coding->destination, - coding->dst_bytes + bytes); - coding->dst_bytes += bytes; + coding->destination = xrealloc (coding->destination, newbytes); + coding->dst_bytes = newbytes; } static void @@ -7048,14 +7049,12 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, if ((dst_end - dst) / MAX_MULTIBYTE_LENGTH < to_nchars) { eassert (growable_destination (coding)); - if (((min (PTRDIFF_MAX, SIZE_MAX) - (buf_end - buf)) - / MAX_MULTIBYTE_LENGTH) - < to_nchars) + ptrdiff_t dst_size; + if (INT_MULTIPLY_WRAPV (to_nchars, MAX_MULTIBYTE_LENGTH, + &dst_size) + || INT_ADD_WRAPV (buf_end - buf, dst_size, &dst_size)) memory_full (SIZE_MAX); - dst = alloc_destination (coding, - buf_end - buf - + MAX_MULTIBYTE_LENGTH * to_nchars, - dst); + dst = alloc_destination (coding, dst_size, dst); if (EQ (coding->src_object, coding->dst_object)) { coding_set_source (coding); diff --git a/src/data.c b/src/data.c index 4db93f5..ccec15f 100644 --- a/src/data.c +++ b/src/data.c @@ -2631,30 +2631,16 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) switch (code) { case Aadd: - if (INT_ADD_OVERFLOW (accum, next)) - { - overflow = 1; - accum &= INTMASK; - } - accum += next; + overflow |= INT_ADD_WRAPV (accum, next, &accum); break; case Asub: - if (INT_SUBTRACT_OVERFLOW (accum, next)) - { - overflow = 1; - accum &= INTMASK; - } - accum = argnum ? accum - next : nargs == 1 ? - next : next; + if (! argnum) + accum = nargs == 1 ? - next : next; + else + overflow |= INT_SUBTRACT_WRAPV (accum, next, &accum); break; case Amult: - if (INT_MULTIPLY_OVERFLOW (accum, next)) - { - EMACS_UINT a = accum, b = next, ab = a * b; - overflow = 1; - accum = ab & INTMASK; - } - else - accum *= next; + overflow |= INT_MULTIPLY_WRAPV (accum, next, &accum); break; case Adiv: if (! (argnum || nargs == 1)) @@ -2663,7 +2649,10 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) { if (next == 0) xsignal0 (Qarith_error); - accum /= next; + if (INT_DIVIDE_OVERFLOW (accum, next)) + overflow = true; + else + accum /= next; } break; case Alogand: diff --git a/src/dispnew.c b/src/dispnew.c index 1a822f0..64c84ae 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1331,10 +1331,8 @@ realloc_glyph_pool (struct glyph_pool *pool, struct dim matrix_dim) || matrix_dim.width != pool->ncolumns); /* Enlarge the glyph pool. */ - needed = matrix_dim.width; - if (INT_MULTIPLY_OVERFLOW (needed, matrix_dim.height)) + if (INT_MULTIPLY_WRAPV (matrix_dim.height, matrix_dim.width, &needed)) memory_full (SIZE_MAX); - needed *= matrix_dim.height; if (needed > pool->nglyphs) { ptrdiff_t old_nglyphs = pool->nglyphs; @@ -6094,15 +6092,15 @@ init_display (void) struct frame *sf = SELECTED_FRAME (); int width = FRAME_TOTAL_COLS (sf); int height = FRAME_TOTAL_LINES (sf); + int area; /* If these sizes are so big they cause overflow, just ignore the change. It's not clear what better we could do. The rest of the code assumes that (width + 2) * height * sizeof (struct glyph) does not overflow and does not exceed PTRDIFF_MAX or SIZE_MAX. */ - if (INT_ADD_OVERFLOW (width, 2) - || INT_MULTIPLY_OVERFLOW (width + 2, height) - || (min (PTRDIFF_MAX, SIZE_MAX) / sizeof (struct glyph) - < (width + 2) * height)) + if (INT_ADD_WRAPV (width, 2, &area) + || INT_MULTIPLY_WRAPV (height, area, &area) + || min (PTRDIFF_MAX, SIZE_MAX) / sizeof (struct glyph) < area) fatal ("screen size %dx%d too big", width, height); } diff --git a/src/editfns.c b/src/editfns.c index 050eb2a..316d940 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3887,9 +3887,12 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) ptrdiff_t formatlen = SBYTES (args[0]); /* Allocate the info and discarded tables. */ - if ((SIZE_MAX - formatlen) / sizeof (struct info) <= nargs) + ptrdiff_t alloca_size; + if (INT_MULTIPLY_WRAPV (nargs, sizeof *info, &alloca_size) + || INT_ADD_WRAPV (sizeof *info, alloca_size, &alloca_size) + || INT_ADD_WRAPV (formatlen, alloca_size, &alloca_size) + || SIZE_MAX < alloca_size) memory_full (SIZE_MAX); - size_t alloca_size = (nargs + 1) * sizeof *info + formatlen; /* info[0] is unused. Unused elements have -1 for start. */ info = SAFE_ALLOCA (alloca_size); memset (info, 0, alloca_size); diff --git a/src/fns.c b/src/fns.c index f545066..4695666 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2389,9 +2389,9 @@ ARRAY is a vector, string, char-table, or bool-vector. */) unsigned char str[MAX_MULTIBYTE_LENGTH]; int len = CHAR_STRING (charval, str); ptrdiff_t size_byte = SBYTES (array); + ptrdiff_t product; - if (INT_MULTIPLY_OVERFLOW (SCHARS (array), len) - || SCHARS (array) * len != size_byte) + if (INT_MULTIPLY_WRAPV (size, len, &product) || product != size_byte) error ("Attempt to change byte length of a string"); for (idx = 0; idx < size_byte; idx++) *p++ = str[idx % len]; diff --git a/src/ftfont.c b/src/ftfont.c index fb1addb..57ded17 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -2561,20 +2561,21 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, } } - if (INT_MAX / 2 < len) + int len2; + if (INT_MULTIPLY_WRAPV (len, 2, &len2)) memory_full (SIZE_MAX); if (gstring.allocated == 0) { gstring.glyph_size = sizeof (MFLTGlyphFT); - gstring.glyphs = xnmalloc (len * 2, sizeof (MFLTGlyphFT)); - gstring.allocated = len * 2; + gstring.glyphs = xnmalloc (len2, sizeof (MFLTGlyphFT)); + gstring.allocated = len2; } - else if (gstring.allocated < len * 2) + else if (gstring.allocated < len2) { - gstring.glyphs = xnrealloc (gstring.glyphs, len * 2, + gstring.glyphs = xnrealloc (gstring.glyphs, len2, sizeof (MFLTGlyphFT)); - gstring.allocated = len * 2; + gstring.allocated = len2; } glyphs = (MFLTGlyphFT *) (gstring.glyphs); memset (glyphs, 0, len * sizeof (MFLTGlyphFT)); @@ -2624,11 +2625,12 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, int result = mflt_run (&gstring, 0, len, &flt_font_ft.flt_font, flt); if (result != -2) break; - if (INT_MAX / 2 < gstring.allocated) + int len2; + if (INT_MULTIPLY_WRAPV (gstring.allocated, 2, &len2)) memory_full (SIZE_MAX); gstring.glyphs = xnrealloc (gstring.glyphs, gstring.allocated, 2 * sizeof (MFLTGlyphFT)); - gstring.allocated *= 2; + gstring.allocated = len2; } if (gstring.used > LGSTRING_GLYPH_LEN (lgstring)) return Qnil; diff --git a/src/gnutls.c b/src/gnutls.c index 864cac5..0c69b00 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -781,10 +781,11 @@ static Lisp_Object gnutls_hex_string (unsigned char *buf, ptrdiff_t buf_size, const char *prefix) { ptrdiff_t prefix_length = strlen (prefix); - if ((STRING_BYTES_BOUND - prefix_length) / 3 < buf_size) + ptrdiff_t retlen; + if (INT_MULTIPLY_WRAPV (buf_size, 3, &retlen) + || INT_ADD_WRAPV (prefix_length - (buf_size != 0), retlen, &retlen)) string_overflow (); - Lisp_Object ret = make_uninit_string (prefix_length + 3 * buf_size - - (buf_size != 0)); + Lisp_Object ret = make_uninit_string (retlen); char *string = SSDATA (ret); strcpy (string, prefix); diff --git a/src/gtkutil.c b/src/gtkutil.c index 701bcab..90683eb 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -517,9 +517,12 @@ get_utf8_string (const char *str) if (cp) g_free (cp); len = strlen (str); - if ((min (PTRDIFF_MAX, SIZE_MAX) - len - 1) / 4 < nr_bad) + ptrdiff_t alloc; + if (INT_MULTIPLY_WRAPV (nr_bad, 4, &alloc) + || INT_ADD_WRAPV (len + 1, alloc, &alloc) + || SIZE_MAX < alloc) memory_full (SIZE_MAX); - up = utf8_str = xmalloc (len + nr_bad * 4 + 1); + up = utf8_str = xmalloc (alloc); p = (unsigned char *)str; while (! (cp = g_locale_to_utf8 ((char *)p, -1, &bytes_read, diff --git a/src/image.c b/src/image.c index 928eb5c..41687eb 100644 --- a/src/image.c +++ b/src/image.c @@ -4662,13 +4662,16 @@ x_to_xcolors (struct frame *f, struct image *img, bool rgb_p) int x, y; XColor *colors, *p; XImagePtr_or_DC ximg; + ptrdiff_t nbytes; #ifdef HAVE_NTGUI HGDIOBJ prev; #endif /* HAVE_NTGUI */ - if (img->height > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *colors / img->width) + if (INT_MULTIPLY_WRAPV (sizeof *colors, img->width, &nbytes) + || INT_MULTIPLY_WRAPV (img->height, nbytes, &nbytes) + || SIZE_MAX < nbytes) memory_full (SIZE_MAX); - colors = xmalloc (sizeof *colors * img->width * img->height); + colors = xmalloc (nbytes); /* Get the X image or create a memory device context for IMG. */ ximg = image_get_x_image_or_dc (f, img, 0, &prev); @@ -4801,15 +4804,17 @@ x_detect_edges (struct frame *f, struct image *img, int *matrix, int color_adjus XColor *colors = x_to_xcolors (f, img, 1); XColor *new, *p; int x, y, i, sum; + ptrdiff_t nbytes; for (i = sum = 0; i < 9; ++i) sum += eabs (matrix[i]); #define COLOR(A, X, Y) ((A) + (Y) * img->width + (X)) - if (img->height > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *new / img->width) + if (INT_MULTIPLY_WRAPV (sizeof *new, img->width, &nbytes) + || INT_MULTIPLY_WRAPV (img->height, nbytes, &nbytes)) memory_full (SIZE_MAX); - new = xmalloc (sizeof *new * img->width * img->height); + new = xmalloc (nbytes); for (y = 0; y < img->height; ++y) { @@ -5898,6 +5903,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) png_uint_32 row_bytes; bool transparent_p; struct png_memory_storage tbr; /* Data to be read */ + ptrdiff_t nbytes; #ifdef USE_CAIRO unsigned char *data = 0; @@ -6102,10 +6108,10 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) row_bytes = png_get_rowbytes (png_ptr, info_ptr); /* Allocate memory for the image. */ - if (height > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *rows - || row_bytes > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *pixels / height) + if (INT_MULTIPLY_WRAPV (row_bytes, sizeof *pixels, &nbytes) + || INT_MULTIPLY_WRAPV (nbytes, height, &nbytes)) memory_full (SIZE_MAX); - c->pixels = pixels = xmalloc (sizeof *pixels * row_bytes * height); + c->pixels = pixels = xmalloc (nbytes); c->rows = rows = xmalloc (height * sizeof *rows); for (i = 0; i < height; ++i) rows[i] = pixels + i * row_bytes; diff --git a/src/keymap.c b/src/keymap.c index c988d12..c28885ab 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1984,9 +1984,10 @@ For an approximate inverse of this, see `kbd'. */) size += XINT (Flength (prefix)); /* This has one extra element at the end that we don't pass to Fconcat. */ - if (min (PTRDIFF_MAX, SIZE_MAX) / word_size / 4 < size) + EMACS_INT size4; + if (INT_MULTIPLY_WRAPV (size, 4, &size4)) memory_full (SIZE_MAX); - SAFE_ALLOCA_LISP (args, size * 4); + SAFE_ALLOCA_LISP (args, size4); /* In effect, this computes (mapconcat 'single-key-description keys " ") diff --git a/src/lisp.h b/src/lisp.h index a1409d1..784ab18 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4447,40 +4447,24 @@ extern void *record_xmalloc (size_t) ATTRIBUTE_ALLOC_SIZE ((1)); } \ } while (false) - -/* Return floor (NBYTES / WORD_SIZE). */ - -INLINE ptrdiff_t -lisp_word_count (ptrdiff_t nbytes) -{ - if (-1 >> 1 == -1) - switch (word_size + 0) - { - case 2: return nbytes >> 1; - case 4: return nbytes >> 2; - case 8: return nbytes >> 3; - case 16: return nbytes >> 4; - default: break; - } - return nbytes / word_size - (nbytes % word_size < 0); -} - /* SAFE_ALLOCA_LISP allocates an array of Lisp_Objects. */ #define SAFE_ALLOCA_LISP(buf, nelt) \ do { \ - if ((nelt) <= lisp_word_count (sa_avail)) \ - (buf) = AVAIL_ALLOCA ((nelt) * word_size); \ - else if ((nelt) <= min (PTRDIFF_MAX, SIZE_MAX) / word_size) \ + ptrdiff_t alloca_nbytes; \ + if (INT_MULTIPLY_WRAPV (nelt, word_size, &alloca_nbytes) \ + || SIZE_MAX < alloca_nbytes) \ + memory_full (SIZE_MAX); \ + else if (alloca_nbytes <= sa_avail) \ + (buf) = AVAIL_ALLOCA (alloca_nbytes); \ + else \ { \ Lisp_Object arg_; \ - (buf) = xmalloc ((nelt) * word_size); \ + (buf) = xmalloc (alloca_nbytes); \ arg_ = make_save_memory (buf, nelt); \ sa_must_free = true; \ record_unwind_protect (free_save_value, arg_); \ } \ - else \ - memory_full (SIZE_MAX); \ } while (false) diff --git a/src/term.c b/src/term.c index 245712e..6ab611d 100644 --- a/src/term.c +++ b/src/term.c @@ -532,10 +532,8 @@ encode_terminal_code (struct glyph *src, int src_len, multibyte-form. But, it may be enlarged on demand if Vglyph_table contains a string or a composite glyph is encountered. */ - if (min (PTRDIFF_MAX, SIZE_MAX) / MAX_MULTIBYTE_LENGTH < src_len) + if (INT_MULTIPLY_WRAPV (src_len, MAX_MULTIBYTE_LENGTH, &required)) memory_full (SIZE_MAX); - required = src_len; - required *= MAX_MULTIBYTE_LENGTH; if (encode_terminal_src_size < required) encode_terminal_src = xpalloc (encode_terminal_src, &encode_terminal_src_size, diff --git a/src/tparam.c b/src/tparam.c index 02047db..3a64059 100644 --- a/src/tparam.c +++ b/src/tparam.c @@ -167,9 +167,9 @@ tparam1 (const char *string, char *outstring, int len, doup++, append_len_incr = strlen (up); else doleft++, append_len_incr = strlen (left); - if (INT_ADD_OVERFLOW (append_len, append_len_incr)) + if (INT_ADD_WRAPV (append_len_incr, + append_len, &append_len)) memory_full (SIZE_MAX); - append_len += append_len_incr; } } *op++ = tem ? tem : 0200; diff --git a/src/xselect.c b/src/xselect.c index 9d178a5..41bd2bc 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2330,10 +2330,11 @@ x_property_data_to_lisp (struct frame *f, const unsigned char *data, Atom type, int format, unsigned long size) { ptrdiff_t format_bytes = format >> 3; - if (PTRDIFF_MAX / format_bytes < size) + ptrdiff_t data_bytes; + if (INT_MULTIPLY_WRAPV (size, format_bytes, &data_bytes)) memory_full (SIZE_MAX); return selection_data_to_lisp_data (FRAME_DISPLAY_INFO (f), data, - size * format_bytes, type, format); + data_bytes, type, format); } DEFUN ("x-get-atom-name", Fx_get_atom_name, diff --git a/src/xsmfns.c b/src/xsmfns.c index b84f2ac..8c4a6d3 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -223,9 +223,8 @@ smc_save_yourself_CB (SmcConn smcConn, props[props_idx]->name = xstrdup (SmRestartCommand); props[props_idx]->type = xstrdup (SmLISTofARRAY8); /* /path/to/emacs, --smid=xxx --no-splash --chdir=dir ... */ - if (INT_MAX - 3 < initial_argc) + if (INT_ADD_WRAPV (initial_argc, 3, &i)) memory_full (SIZE_MAX); - i = 3 + initial_argc; props[props_idx]->num_vals = i; vp = xnmalloc (i, sizeof *vp); props[props_idx]->vals = vp; diff --git a/src/xterm.c b/src/xterm.c index 5e9c16b..5756378 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11773,7 +11773,6 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) struct terminal *terminal; struct x_display_info *dpyinfo; XrmDatabase xrdb; - ptrdiff_t lim; block_input (); @@ -11974,13 +11973,13 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) XSetAfterFunction (x_current_display, x_trace_wire); #endif - lim = min (PTRDIFF_MAX, SIZE_MAX) - sizeof "@"; Lisp_Object system_name = Fsystem_name (); - if (lim - SBYTES (Vinvocation_name) < SBYTES (system_name)) + ptrdiff_t nbytes; + if (INT_ADD_WRAPV (SBYTES (Vinvocation_name), SBYTES (system_name) + 2, + &nbytes)) memory_full (SIZE_MAX); dpyinfo->x_id = ++x_display_id; - dpyinfo->x_id_name = xmalloc (SBYTES (Vinvocation_name) - + SBYTES (system_name) + 2); + dpyinfo->x_id_name = xmalloc (nbytes); char *nametail = lispstpcpy (dpyinfo->x_id_name, Vinvocation_name); *nametail++ = '@'; lispstpcpy (nametail, system_name); commit e4c190b28d658d92f8c19799b19f8263650687e0 (refs/remotes/origin/project-next) Author: Dmitry Gutov Date: Mon Nov 9 04:32:36 2015 +0200 Make sure that the ignore file exists * lisp/vc/vc.el (vc-default-ignore-completion-table): Make sure that the ignore file exists. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index f08e562..0a21695 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1433,8 +1433,9 @@ Argument BACKEND is the backend you are using." (lambda (str) ;; Commented or empty lines. (string-match-p "\\`\\(?:#\\|[ \t\r\n]*\\'\\)" str)) - (vc--read-lines - (vc-call-backend backend 'find-ignore-file file)))) + (let ((file (vc-call-backend backend 'find-ignore-file file))) + (and (file-exists-p file) + (vc--read-lines file))))) (defun vc--read-lines (file) "Return a list of lines of FILE." commit bcca6a2a028d05af3cb5b31a5a2c997f3f1f1d31 Author: Michael Sperber Date: Mon Nov 9 01:59:24 2015 +0000 * gnus-sum.el (gnus-summary-backend-map): Bind B-backspace to `gnus-summary-delete-article` in a way that also works on XEmacs. diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index d4ca655..be0554f 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -2220,6 +2220,7 @@ increase the score of each group you read." "\M-\C-e" gnus-summary-expire-articles-now "\177" gnus-summary-delete-article [delete] gnus-summary-delete-article + [backspace] gnus-summary-delete-article "m" gnus-summary-move-article "r" gnus-summary-respool-article "w" gnus-summary-edit-article commit e133eeaa9797dfb01880529d5ac68f9086ae7054 Author: Juanma Barranquero Date: Sun Nov 8 23:15:07 2015 +0100 ; ChangeLog.2 fixes diff --git a/ChangeLog.2 b/ChangeLog.2 index 3668959..a915adb 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -22,10 +22,6 @@ * lib/intprops.h, lib/timespec-add.c, lib/timespec-sub.c: Copy from gnulib. -2015-11-07 Eli Zaretskii - - ;* test/automated/abbrev-tests.el: Fix a typo in a comment - 2015-11-07 David Reitter Provide NS notification objects where required to eliminate warnings @@ -43,20 +39,16 @@ 2015-11-07 Kelvin White - erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771 - -2015-11-07 l3thal - - erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771 + * lisp/erc/erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771. 2015-11-07 David Reitter Ignore fullscreen exit notifications on NS when frame is dead - * nsterm.m (windowDidResize:,windowWillExitFullScreen:) - (windowDidExitFullScreen:): Return if frame is dead. - These functions may be called when a fullscreen frame - is closed; they are called before, not after. + * nsterm.m (windowDidResize:, windowWillExitFullScreen:) + (windowDidExitFullScreen:): Return if frame is dead. + These functions may be called when a fullscreen frame + is closed; they are called before, not after. May address Bug#21428. @@ -75,12 +67,13 @@ 2015-11-07 Artur Malabarba - * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix a bug + * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix a bug. The defsubst was being created as: (cl-defsubst name (args) ("DOC") ...) - * test/automated/cl-lib-tests.el (cl-lib-struct-constructors): Add test + * test/automated/cl-lib-tests.el (cl-lib-struct-constructors): + Add test. 2015-11-07 Mihai Olteanu (tiny change) @@ -121,15 +114,15 @@ Fixed NextStep fullscreen problem (bug#21770). - * nsterm.m (ns_constrain_all_frames): Don't constrain fullscreen - frames. + * src/nsterm.m (ns_constrain_all_frames): Don't constrain + fullscreen frames. 2015-11-06 Eli Zaretskii Ensure redisplay after evaluation - * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Revert - last change. + * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): + Revert last change. * lisp/frame.el (redisplay--variables): Populate the redisplay--variables list. * src/xdisp.c (maybe_set_redisplay): New function. @@ -139,7 +132,7 @@ 2015-11-06 Artur Malabarba - * test/automated/subr-tests.el (subr-test-when): Fix again + * test/automated/subr-tests.el (subr-test-when): Fix again. 2015-11-06 Eli Zaretskii @@ -152,15 +145,15 @@ 2015-11-06 Juanma Barranquero - * admin/notes/repo: Fix a few obsolete references to Bazaar + * admin/notes/repo: Fix a few obsolete references to Bazaar. 2015-11-06 Artur Malabarba - * test/automated/subr-tests.el (subr-test-when): Fix test + * test/automated/subr-tests.el (subr-test-when): Fix test. 2015-11-06 Martin Rudalics - Avoid division by zero crash observed by Yuan MEI. + Avoid division by zero crash observed by Yuan MEI See http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html. @@ -188,14 +181,13 @@ 2015-11-05 Stephen Leake - * lisp/progmodes/xref.el: require semantic/symref during compilation. + * lisp/progmodes/xref.el: Require semantic/symref during compilation. 2015-11-05 Daiki Ueno Suppress redundant Pinentry startup messages - * lisp/net/pinentry.el (pinentry-start): Add optional QUIET - argument. + * lisp/net/pinentry.el (pinentry-start): Add optional QUIET argument. * lisp/epg.el: Declare `pinentry-start'. (epg--start): Call `pinentry-start' with QUIET argument set. @@ -205,21 +197,17 @@ 2015-11-05 Juanma Barranquero - * test/automated/elisp-mode-test.el: Silence some run-time warnings - + * test/automated/elisp-mode-test.el: Silence some run-time warnings. (xref-elisp-deftest): Bind `find-file-suppress-same-file-warnings' to t. 2015-11-05 Tassilo Horn - Add prettify symbol for \times - - * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add - prettification support for \times. + * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): + Add prettification support for \times. 2015-11-05 Juanma Barranquero - * test/automated/process-tests.el: Skip tests when bash is not available - + * test/automated/process-tests.el: Skip tests when bash is unavailable. (process-test-sentinel-accept-process-output) (process-test-sentinel-sit-for): skip-unless bash executable found. @@ -233,11 +221,11 @@ 2015-11-04 Stefan Monnier - * lisp/emacs-lisp/eieio-compat.el: Typo caught by tests + * lisp/emacs-lisp/eieio-compat.el: Typo caught by tests. (eieio--generic-static-object-generalizer): Fix typo. - * test/automated/eieio-tests.el: Byte-compile it again. - It looks like the underlying cause of bug#17852 was fixed in the mean time. + * test/automated/eieio-tests.el: Byte-compile it again. It looks + like the underlying cause of bug#17852 was fixed in the mean time. 2015-11-04 Artur Malabarba @@ -248,40 +236,39 @@ 2015-11-04 Artur Malabarba - * lisp/files.el (report-errors): Obsolete + * lisp/files.el (report-errors): Obsolete. - (normal-mode, hack-local-variables, dir-locals-find-file): Use - `with-demoted-errors' instead. + (normal-mode, hack-local-variables, dir-locals-find-file): + Use `with-demoted-errors' instead. 2015-11-04 Artur Malabarba - * lisp/subr.el (when): Use `macroexp-progn' + * lisp/subr.el (when): Use `macroexp-progn'. - * test/automated/subr-tests.el (subr-test-when): New test + * test/automated/subr-tests.el (subr-test-when): New test. 2015-11-04 Juanma Barranquero - * lisp/progmodes/xref.el: Doc fixes - + * lisp/progmodes/xref.el: Doc fixes. (xref-make-file-location, xref-make-buffer-location, xref-make) (xref-make-bogus-location, xref-make-match): Add cross-references. (xref--insert-xrefs): Fix typo in docstring. 2015-11-04 Anders Lindgren - Render fringe bitmaps correctly on NextStep (bug#21301). + Render fringe bitmaps correctly on NextStep (bug#21301) The fringe bitmaps were inverted, the background was not transparent, the image data was horizontally mirrored, and periodic fringe bitmaps were not supported. - * nsimage.m ([EmacsImage initFromXBM:width:height:fg:bg:]): When - both background and foreground colors are 0, set the background + * src/nsimage.m ([EmacsImage initFromXBM:width:height:fg:bg:]): + When both background and foreground colors are 0, set the background alpha channel to 0 (making the background transparent). When copying the image data, do this from the most significant bit (leftmost) to the least (rightmost), to avoid mirroring. - * nsterm.m (ns_draw_fringe_bitmap): Don't invert the image bits. Add - support for periodic images (e.g. the empty line indicator). + * src/nsterm.m (ns_draw_fringe_bitmap): Don't invert the image bits. + Add support for periodic images (e.g. the empty line indicator). 2015-11-03 Michael Heerdegen @@ -295,13 +282,11 @@ 2015-11-03 Jay Belanger - Change maintainer address. - - * lisp/calc/calc (calc-bug-address): Change address. + * lisp/calc/calc (calc-bug-address): Change maintainer address. 2015-11-03 Michael Albinus - Fix a stupid error in gfilenotify.c. + Fix a stupid error in gfilenotify.c * src/gfilenotify.c (dir_monitor_callback): Cancel monitor only, if we've got a `deleted' signal AND the file name is the watched one. @@ -310,18 +295,14 @@ Fix Bug#21816; case insensitive file system in elisp-mode-tests.el - * test/automated/elisp-mode-tests.el (xref-elisp-test-run): Use - case-insensitive string compare for file names. - (emacs-test-dir): Add 'downcase' to cause case differences (at least on - my system). - -2015-11-03 Jackson Ray Hamilton - - Fix ChangeLog.2 entry for js-jsx-mode + * test/automated/elisp-mode-tests.el (xref-elisp-test-run): + Use case-insensitive string compare for file names. + (emacs-test-dir): Add 'downcase' to cause case differences (at + least on my system). 2015-11-02 Juanma Barranquero - flymake-tests.el (warning-predicate-rx-gcc): Fix check. + flymake-tests.el (warning-predicate-rx-gcc): Fix check * test/automated/flymake-tests.el (warning-predicate-rx-gcc): Also check that "make" is available, not just "gcc". @@ -341,9 +322,8 @@ 2015-11-01 Glenn Morris - * lisp/progmodes/f90.el (f90-no-block-limit): - - Add associate. (Bug#21794) + * lisp/progmodes/f90.el (f90-no-block-limit): Add associate. + (Bug#21794) * test/automated/f90.el (f90-test-bug21794): New test. 2015-11-01 Juanma Barranquero @@ -358,8 +338,8 @@ Improve completion in tramp-gvfs.el * lisp/net/tramp-gvfs.el (tramp-zeroconf-parse-device-names): - Renamed from `tramp-zeroconf-parse-service-device-names'. - (tramp-zeroconf-parse-webdav-device-names): Removed. Code merged + Rename from `tramp-zeroconf-parse-service-device-names'. + (tramp-zeroconf-parse-webdav-device-names): Remove. Code merged with `tramp-zeroconf-parse-device-names'. (tramp-gvfs-parse-device-names): New defun. (top): Use it when `tramp-zeroconf-parse-device-names' is not @@ -370,7 +350,6 @@ 2015-10-31 Thomas Fitzsimmons - Change version of ntlm.el to 2.0.0 * lisp/net/ntlm.el: Change version to 2.0.0. 2015-10-31 Juanma Barranquero commit 29d740aac9773334d8189a1cc989634a48a70061 Author: Simen Heggestøyl Date: Sun Nov 8 21:44:21 2015 +0100 Add support for retrieving paths to JSON elements Add support for retrieving the path to a JSON element. This can for instance be useful to retrieve paths in deeply nested JSON structures. * lisp/json.el (json-pre-element-read-function) (json-post-element-read-function): New variables to hold pre- and post read callback functions for `json-read-array' and `json-read-object'. (json--path): New variable used internally by `json-path-to-position'. (json--record-path, json--check-position): New functions used internally by `json-path-to-position'. (json-path-to-position): New function for retrieving the path to a JSON element at a given position. (json-read-object, json-read-array): Call `json-pre-element-read-function' and `json-post-element-read-function' when set. * test/automated/json-tests.el (test-json-path-to-position-with-objects) (test-json-path-to-position-with-arrays) (test-json-path-to-position-no-match): New tests for `json-path-to-position'. diff --git a/lisp/json.el b/lisp/json.el index b23d12a..97cf993 100644 --- a/lisp/json.el +++ b/lisp/json.el @@ -111,6 +111,17 @@ Used only when `json-encoding-pretty-print' is non-nil.") "If non-nil, ] and } closings will be formatted lisp-style, without indentation.") +(defvar json-pre-element-read-function nil + "Function called (if non-nil) by `json-read-array' and +`json-read-object' right before reading a JSON array or object, +respectively. The function is called with one argument, which is +the current JSON key.") + +(defvar json-post-element-read-function nil + "Function called (if non-nil) by `json-read-array' and +`json-read-object' right after reading a JSON array or object, +respectively.") + ;;; Utilities @@ -196,6 +207,61 @@ Unlike `reverse', this keeps the property-value pairs intact." +;;; Paths + +(defvar json--path '() + "Used internally by `json-path-to-position' to keep track of +the path during recursive calls to `json-read'.") + +(defun json--record-path (key) + "Record the KEY to the current JSON path. +Used internally by `json-path-to-position'." + (push (cons (point) key) json--path)) + +(defun json--check-position (position) + "Check if the last parsed JSON structure passed POSITION. +Used internally by `json-path-to-position'." + (let ((start (caar json--path))) + (when (< start position (+ (point) 1)) + (throw :json-path (list :path (nreverse (mapcar #'cdr json--path)) + :match-start start + :match-end (point))))) + (pop json--path)) + +(defun json-path-to-position (position &optional string) + "Return the path to the JSON element at POSITION. + +When STRING is provided, return the path to the position in the +string, else to the position in the current buffer. + +The return value is a property list with the following +properties: + +:path -- A list of strings and numbers forming the path to + the JSON element at the given position. Strings + denote object names, while numbers denote array + indexes. + +:match-start -- Position where the matched JSON element begins. + +:match-end -- Position where the matched JSON element ends. + +This can for instance be useful to determine the path to a JSON +element in a deeply nested structure." + (save-excursion + (unless string + (goto-char (point-min))) + (let* ((json--path '()) + (json-pre-element-read-function #'json--record-path) + (json-post-element-read-function + (apply-partially #'json--check-position position)) + (path (catch :json-path + (if string + (json-read-from-string string) + (json-read))))) + (when (plist-get path :path) + path)))) + ;;; Keywords (defvar json-keywords '("true" "false" "null") @@ -403,7 +469,12 @@ Please see the documentation of `json-object-type' and `json-key-type'." (if (char-equal (json-peek) ?:) (json-advance) (signal 'json-object-format (list ":" (json-peek)))) + (json-skip-whitespace) + (when json-pre-element-read-function + (funcall json-pre-element-read-function key)) (setq value (json-read)) + (when json-post-element-read-function + (funcall json-post-element-read-function)) (setq elements (json-add-to-object elements key value)) (json-skip-whitespace) (unless (char-equal (json-peek) ?}) @@ -509,7 +580,12 @@ become JSON objects." ;; read values until "]" (let (elements) (while (not (char-equal (json-peek) ?\])) + (json-skip-whitespace) + (when json-pre-element-read-function + (funcall json-pre-element-read-function (length elements))) (push (json-read) elements) + (when json-post-element-read-function + (funcall json-post-element-read-function)) (json-skip-whitespace) (unless (char-equal (json-peek) ?\]) (if (char-equal (json-peek) ?,) diff --git a/test/automated/json-tests.el b/test/automated/json-tests.el index d1b7a2f..fa1f548 100644 --- a/test/automated/json-tests.el +++ b/test/automated/json-tests.el @@ -49,5 +49,24 @@ (should (equal (json-read-from-string "\"\\nasd\\u0444\\u044b\\u0432fgh\\t\"") "\nasdфывfgh\t"))) +(ert-deftest test-json-path-to-position-with-objects () + (let* ((json-string "{\"foo\": {\"bar\": {\"baz\": \"value\"}}}") + (matched-path (json-path-to-position 32 json-string))) + (should (equal (plist-get matched-path :path) '("foo" "bar" "baz"))) + (should (equal (plist-get matched-path :match-start) 25)) + (should (equal (plist-get matched-path :match-end) 32)))) + +(ert-deftest test-json-path-to-position-with-arrays () + (let* ((json-string "{\"foo\": [\"bar\", [\"baz\"]]}") + (matched-path (json-path-to-position 20 json-string))) + (should (equal (plist-get matched-path :path) '("foo" 1 0))) + (should (equal (plist-get matched-path :match-start) 18)) + (should (equal (plist-get matched-path :match-end) 23)))) + +(ert-deftest test-json-path-to-position-no-match () + (let* ((json-string "{\"foo\": {\"bar\": \"baz\"}}") + (matched-path (json-path-to-position 5 json-string))) + (should (null matched-path)))) + (provide 'json-tests) ;;; json-tests.el ends here commit 5193ad1bcbb4ec80f25cfbfae8e168360fc00534 Author: Karl Fogel Date: Sun Nov 8 14:40:35 2015 -0500 * etc/NEWS: Mention new `bookmark-set-no-overwrite'. This really should been part of my previous commit (Sun Nov 8 14:16:43 2015 -0500, git commit 3812e17978). diff --git a/etc/NEWS b/etc/NEWS index 57cc408..4c5639f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -321,6 +321,10 @@ standards. * Changes in Specialized Modes and Packages in Emacs 25.1 +** New function `bookmark-set-no-overwrite' bound to C-x r M. +It raises an error if a bookmark of that name already exists, +unlike `bookmark-set' which silently updates an existing bookmark. + ** JSON --- *** `json-pretty-print' and `json-pretty-print-buffer' now maintain commit 3812e17978547bd659b92da817f9ddd557bd511c Author: Karl Fogel Date: Sun Nov 8 14:16:43 2015 -0500 Offer non-overwrite bookmark setter (Bug#15746) * lisp/bookmark.el (bookmark-set-internal): New helper function to do what `bookmark-set' used to do, but with more choices for overwrite vs push, and with minor changes to the interactive prompt format. (bookmark-set): Rewrite as wrapper around above. If overwriting, inform the user of that in the prompt. (bookmark-set-no-overwrite): New function, also done as wrapper. Bind to "M" in `ctl-x-r-map' autoloads. (bookmark-map): Similarly bind "M" here. diff --git a/lisp/bookmark.el b/lisp/bookmark.el index e931025..e3b1dc4 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -196,6 +196,7 @@ A non-nil value may result in truncated bookmark names." ;;;###autoload (define-key ctl-x-r-map "b" 'bookmark-jump) ;;;###autoload (define-key ctl-x-r-map "m" 'bookmark-set) +;;;###autoload (define-key ctl-x-r-map "M" 'bookmark-set-no-overwrite) ;;;###autoload (define-key ctl-x-r-map "l" 'bookmark-bmenu-list) ;;;###autoload @@ -204,6 +205,7 @@ A non-nil value may result in truncated bookmark names." ;; Read the help on all of these functions for details... (define-key map "x" 'bookmark-set) (define-key map "m" 'bookmark-set) ;"m"ark + (define-key map "M" 'bookmark-set-no-overwrite) ;"M"aybe mark (define-key map "j" 'bookmark-jump) (define-key map "g" 'bookmark-jump) ;"g"o (define-key map "o" 'bookmark-jump-other-window) @@ -755,30 +757,19 @@ This expects to be called from `point-min' in a bookmark file." map)) ;;;###autoload -(defun bookmark-set (&optional name no-overwrite) - "Set a bookmark named NAME at the current location. -If name is nil, then prompt the user. - -With a prefix arg (non-nil NO-OVERWRITE), do not overwrite any -existing bookmark that has the same name as NAME, but instead push the -new bookmark onto the bookmark alist. The most recently set bookmark -with name NAME is thus the one in effect at any given time, but the -others are still there, should the user decide to delete the most -recent one. - -To yank words from the text of the buffer and use them as part of the -bookmark name, type C-w while setting a bookmark. Successive C-w's -yank successive words. - -Typing C-u inserts (at the bookmark name prompt) the name of the last -bookmark used in the document where the new bookmark is being set; -this helps you use a single bookmark name to track progress through a -large document. If there is no prior bookmark for this document, then -C-u inserts an appropriate name based on the buffer or file. - -Use \\[bookmark-delete] to remove bookmarks (you give it a name and -it removes only the first instance of a bookmark with that name from -the list of bookmarks.)" +(defun bookmark-set-internal (prompt name overwrite-or-push) + "Interactively set a bookmark named NAME at the current location. + +Begin the interactive prompt with PROMPT, followed by a space, a +generated default name in parentheses, a colon and a space. + +If OVERWRITE-OR-PUSH is nil, then error if there is already a +bookmark named NAME; if `overwrite', then replace any existing +bookmark if there is one; if `push' then push the new bookmark +onto the bookmark alist. The `push' behavior means that among +bookmarks named NAME, this most recently set one becomes the one in +effect, but the others are still there, in order, if the topmost one +is ever deleted." (interactive (list nil current-prefix-arg)) (unwind-protect (let* ((record (bookmark-make-record)) @@ -807,12 +798,24 @@ the list of bookmarks.)" (let ((str (or name (read-from-minibuffer - (format "Set bookmark (%s): " default) + (format "%s (default: \"%s\"): " prompt default) nil bookmark-minibuffer-read-name-map nil nil defaults)))) (and (string-equal str "") (setq str default)) - (bookmark-store str (cdr record) no-overwrite) + + (cond + ((eq overwrite-or-push nil) + (if (bookmark-get-bookmark str t) + (error "A bookmark named \"%s\" already exists." str) + (bookmark-store str (cdr record) nil))) + ((eq overwrite-or-push 'overwrite) + (bookmark-store str (cdr record) nil)) + ((eq overwrite-or-push 'push) + (bookmark-store str (cdr record) t)) + (t + (error "Unrecognized value for `overwrite-or-push': %S" + overwrite-or-push))) ;; Ask for an annotation buffer for this bookmark (when bookmark-use-annotations @@ -821,6 +824,66 @@ the list of bookmarks.)" (setq bookmark-current-buffer nil))) +(defun bookmark-set (&optional name no-overwrite) + "Set a bookmark named NAME at the current location. +If NAME is nil, then prompt the user. + +With a prefix arg (non-nil NO-OVERWRITE), do not overwrite any +existing bookmark that has the same name as NAME, but instead push the +new bookmark onto the bookmark alist. The most recently set bookmark +with name NAME is thus the one in effect at any given time, but the +others are still there, should the user decide to delete the most +recent one. + +To yank words from the text of the buffer and use them as part of the +bookmark name, type C-w while setting a bookmark. Successive C-w's +yank successive words. + +Typing C-u inserts (at the bookmark name prompt) the name of the last +bookmark used in the document where the new bookmark is being set; +this helps you use a single bookmark name to track progress through a +large document. If there is no prior bookmark for this document, then +C-u inserts an appropriate name based on the buffer or file. + +Use \\[bookmark-delete] to remove bookmarks (you give it a name and +it removes only the first instance of a bookmark with that name from +the list of bookmarks.)" + (interactive (list nil current-prefix-arg)) + (let ((prompt + (if no-overwrite "Set bookmark" "Set bookmark unconditionally"))) + (bookmark-set-internal prompt name (if no-overwrite 'push 'overwrite)))) + +(defun bookmark-set-no-overwrite (&optional name push-bookmark) + "Set a bookmark named NAME at the current location. +If NAME is nil, then prompt the user. + +If a bookmark named NAME already exists and prefix argument +PUSH-BOOKMARK is non-nil, then push the new bookmark onto the +bookmark alist. Pushing it means that among bookmarks named +NAME, this one becomes the one in effect, but the others are +still there, in order, and become effective again if the user +ever deletes the most recent one. + +Otherwise, if a bookmark named NAME already exists but PUSH-BOOKMARK +is nil, raise an error. + +To yank words from the text of the buffer and use them as part of the +bookmark name, type C-w while setting a bookmark. Successive C-w's +yank successive words. + +Typing C-u inserts (at the bookmark name prompt) the name of the last +bookmark used in the document where the new bookmark is being set; +this helps you use a single bookmark name to track progress through a +large document. If there is no prior bookmark for this document, then +C-u inserts an appropriate name based on the buffer or file. + +Use \\[bookmark-delete] to remove bookmarks (you give it a name and +it removes only the first instance of a bookmark with that name from +the list of bookmarks.)" + (interactive (list nil current-prefix-arg)) + (bookmark-set-internal "Set bookmark" name (if push-bookmark 'push nil))) + + (defun bookmark-kill-line (&optional newline-too) "Kill from point to end of line. If optional arg NEWLINE-TOO is non-nil, delete the newline too. commit 2ce0c0674eba9179ba57c537e387bc3f7b0e5b63 Author: Paul Eggert Date: Sun Nov 8 09:36:14 2015 -0800 * src/unexelf.c (NEW_PROGRAM_H): Remove unused macro (Bug#20614). diff --git a/src/unexelf.c b/src/unexelf.c index 85ed934..c10c7f2 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -208,8 +208,6 @@ entry_address (void *section_h, ptrdiff_t idx, ptrdiff_t entsize) (*(ElfW (Shdr) *) entry_address (new_section_h, n, new_file_h->e_shentsize)) #define OLD_PROGRAM_H(n) \ (*(ElfW (Phdr) *) entry_address (old_program_h, n, old_file_h->e_phentsize)) -#define NEW_PROGRAM_H(n) \ - (*(ElfW (Phdr) *) entry_address (new_program_h, n, new_file_h->e_phentsize)) typedef unsigned char byte; @@ -250,7 +248,7 @@ unexec (const char *new_name, const char *old_name) ElfW (Phdr) *old_bss_seg, *new_bss_seg; ElfW (Addr) old_bss_addr, new_bss_addr; ElfW (Word) old_bss_size, new_data2_size; - ElfW (Off) old_bss_offset, new_data2_offset; + ElfW (Off) old_bss_offset, new_data2_offset; ptrdiff_t n; ptrdiff_t old_bss_index; commit 3008c521740c5ad46a4eaf343b438b02c25e4de5 Author: Alan Modra Date: Sun Nov 8 09:29:00 2015 -0800 ELF unexec: Don't insert a new section Reuse the .bss section instead, making it SHT_PROGBITS. This way we don't need to mess with symbol st_shndx, or section sh_link and sh_info. This does lead to eu-elflint complaints about symbols defined in .bss with a needed version, because normally it is undefined symbols that have needed versions; Defined symbols have version definitions. The exception is symbols defined by the linker in .dynbss for variables copied from a shared library in order to avoid text relocations, with copy relocs to copy their initial values from the shared library. These symbols are both defined and have needed versions, and eu-elflink only expects to see them in SHT_NOBITS sections. Of course there is no real problem with having such symbols in SHT_PROGBITS sections. glibc ld.so handles them fine. * unexelf.c: Delete outdated comments. (PATCH_INDEX): Delete. (find_section): Delete. (unexec): Don't add a new section. Instead reuse the last bss section, extending it to cover dumped data. Make bss sections SHT_PROGBITS. Remove all patching of sh_link, sh_info and st_shndx. Rename bss sections. diff --git a/src/unexelf.c b/src/unexelf.c index 4e9c50d..85ed934 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -40,347 +40,6 @@ what you give them. Help stamp out software-hoarding! */ * On some machines, an existing old_name file is required. * */ - -/* Even more heavily modified by james@bigtex.cactus.org of Dell Computer Co. - * ELF support added. - * - * Basic theory: the data space of the running process needs to be - * dumped to the output file. Normally we would just enlarge the size - * of .data, scooting everything down. But we can't do that in ELF, - * because there is often something between the .data space and the - * .bss space. - * - * In the temacs dump below, notice that the Global Offset Table - * (.got) and the Dynamic link data (.dynamic) come between .data1 and - * .bss. It does not work to overlap .data with these fields. - * - * The solution is to create a new .data segment. This segment is - * filled with data from the current process. Since the contents of - * various sections refer to sections by index, the new .data segment - * is made the last in the table to avoid changing any existing index. - - * This is an example of how the section headers are changed. "Addr" - * is a process virtual address. "Offset" is a file offset. - -raid:/nfs/raid/src/dist-18.56/src> dump -h temacs - -temacs: - - **** SECTION HEADER TABLE **** - [No] Type Flags Addr Offset Size Name - Link Info Adralgn Entsize - - [1] 1 2 0x80480d4 0xd4 0x13 .interp - 0 0 0x1 0 - - [2] 5 2 0x80480e8 0xe8 0x388 .hash - 3 0 0x4 0x4 - - [3] 11 2 0x8048470 0x470 0x7f0 .dynsym - 4 1 0x4 0x10 - - [4] 3 2 0x8048c60 0xc60 0x3ad .dynstr - 0 0 0x1 0 - - [5] 9 2 0x8049010 0x1010 0x338 .rel.plt - 3 7 0x4 0x8 - - [6] 1 6 0x8049348 0x1348 0x3 .init - 0 0 0x4 0 - - [7] 1 6 0x804934c 0x134c 0x680 .plt - 0 0 0x4 0x4 - - [8] 1 6 0x80499cc 0x19cc 0x3c56f .text - 0 0 0x4 0 - - [9] 1 6 0x8085f3c 0x3df3c 0x3 .fini - 0 0 0x4 0 - - [10] 1 2 0x8085f40 0x3df40 0x69c .rodata - 0 0 0x4 0 - - [11] 1 2 0x80865dc 0x3e5dc 0xd51 .rodata1 - 0 0 0x4 0 - - [12] 1 3 0x8088330 0x3f330 0x20afc .data - 0 0 0x4 0 - - [13] 1 3 0x80a8e2c 0x5fe2c 0x89d .data1 - 0 0 0x4 0 - - [14] 1 3 0x80a96cc 0x606cc 0x1a8 .got - 0 0 0x4 0x4 - - [15] 6 3 0x80a9874 0x60874 0x80 .dynamic - 4 0 0x4 0x8 - - [16] 8 3 0x80a98f4 0x608f4 0x449c .bss - 0 0 0x4 0 - - [17] 2 0 0 0x608f4 0x9b90 .symtab - 18 371 0x4 0x10 - - [18] 3 0 0 0x6a484 0x8526 .strtab - 0 0 0x1 0 - - [19] 3 0 0 0x729aa 0x93 .shstrtab - 0 0 0x1 0 - - [20] 1 0 0 0x72a3d 0x68b7 .comment - 0 0 0x1 0 - - raid:/nfs/raid/src/dist-18.56/src> dump -h xemacs - - xemacs: - - **** SECTION HEADER TABLE **** - [No] Type Flags Addr Offset Size Name - Link Info Adralgn Entsize - - [1] 1 2 0x80480d4 0xd4 0x13 .interp - 0 0 0x1 0 - - [2] 5 2 0x80480e8 0xe8 0x388 .hash - 3 0 0x4 0x4 - - [3] 11 2 0x8048470 0x470 0x7f0 .dynsym - 4 1 0x4 0x10 - - [4] 3 2 0x8048c60 0xc60 0x3ad .dynstr - 0 0 0x1 0 - - [5] 9 2 0x8049010 0x1010 0x338 .rel.plt - 3 7 0x4 0x8 - - [6] 1 6 0x8049348 0x1348 0x3 .init - 0 0 0x4 0 - - [7] 1 6 0x804934c 0x134c 0x680 .plt - 0 0 0x4 0x4 - - [8] 1 6 0x80499cc 0x19cc 0x3c56f .text - 0 0 0x4 0 - - [9] 1 6 0x8085f3c 0x3df3c 0x3 .fini - 0 0 0x4 0 - - [10] 1 2 0x8085f40 0x3df40 0x69c .rodata - 0 0 0x4 0 - - [11] 1 2 0x80865dc 0x3e5dc 0xd51 .rodata1 - 0 0 0x4 0 - - [12] 1 3 0x8088330 0x3f330 0x20afc .data - 0 0 0x4 0 - - [13] 1 3 0x80a8e2c 0x5fe2c 0x89d .data1 - 0 0 0x4 0 - - [14] 1 3 0x80a96cc 0x606cc 0x1a8 .got - 0 0 0x4 0x4 - - [15] 6 3 0x80a9874 0x60874 0x80 .dynamic - 4 0 0x4 0x8 - - [16] 8 3 0x80c6800 0x7d800 0 .bss - 0 0 0x4 0 - - [17] 2 0 0 0x7d800 0x9b90 .symtab - 18 371 0x4 0x10 - - [18] 3 0 0 0x87390 0x8526 .strtab - 0 0 0x1 0 - - [19] 3 0 0 0x8f8b6 0x93 .shstrtab - 0 0 0x1 0 - - [20] 1 0 0 0x8f949 0x68b7 .comment - 0 0 0x1 0 - - [21] 1 3 0x80a98f4 0x608f4 0x1cf0c .data - 0 0 0x4 0 - - * This is an example of how the file header is changed. "Shoff" is - * the section header offset within the file. Since that table is - * after the new .data section, it is moved. "Shnum" is the number of - * sections, which we increment. - * - * "Phoff" is the file offset to the program header. "Phentsize" and - * "Shentsz" are the program and section header entries sizes respectively. - * These can be larger than the apparent struct sizes. - - raid:/nfs/raid/src/dist-18.56/src> dump -f temacs - - temacs: - - **** ELF HEADER **** - Class Data Type Machine Version - Entry Phoff Shoff Flags Ehsize - Phentsize Phnum Shentsz Shnum Shstrndx - - 1 1 2 3 1 - 0x80499cc 0x34 0x792f4 0 0x34 - 0x20 5 0x28 21 19 - - raid:/nfs/raid/src/dist-18.56/src> dump -f xemacs - - xemacs: - - **** ELF HEADER **** - Class Data Type Machine Version - Entry Phoff Shoff Flags Ehsize - Phentsize Phnum Shentsz Shnum Shstrndx - - 1 1 2 3 1 - 0x80499cc 0x34 0x96200 0 0x34 - 0x20 5 0x28 22 19 - - * These are the program headers. "Offset" is the file offset to the - * segment. "Vaddr" is the memory load address. "Filesz" is the - * segment size as it appears in the file, and "Memsz" is the size in - * memory. Below, the third segment is the code and the fourth is the - * data: the difference between Filesz and Memsz is .bss - - raid:/nfs/raid/src/dist-18.56/src> dump -o temacs - - temacs: - ***** PROGRAM EXECUTION HEADER ***** - Type Offset Vaddr Paddr - Filesz Memsz Flags Align - - 6 0x34 0x8048034 0 - 0xa0 0xa0 5 0 - - 3 0xd4 0 0 - 0x13 0 4 0 - - 1 0x34 0x8048034 0 - 0x3f2f9 0x3f2f9 5 0x1000 - - 1 0x3f330 0x8088330 0 - 0x215c4 0x25a60 7 0x1000 - - 2 0x60874 0x80a9874 0 - 0x80 0 7 0 - - raid:/nfs/raid/src/dist-18.56/src> dump -o xemacs - - xemacs: - ***** PROGRAM EXECUTION HEADER ***** - Type Offset Vaddr Paddr - Filesz Memsz Flags Align - - 6 0x34 0x8048034 0 - 0xa0 0xa0 5 0 - - 3 0xd4 0 0 - 0x13 0 4 0 - - 1 0x34 0x8048034 0 - 0x3f2f9 0x3f2f9 5 0x1000 - - 1 0x3f330 0x8088330 0 - 0x3e4d0 0x3e4d0 7 0x1000 - - 2 0x60874 0x80a9874 0 - 0x80 0 7 0 - - - */ - -/* Modified by wtien@urbana.mcd.mot.com of Motorola Inc. - * - * The above mechanism does not work if the unexeced ELF file is being - * re-layout by other applications (such as `strip'). All the applications - * that re-layout the internal of ELF will layout all sections in ascending - * order of their file offsets. After the re-layout, the data2 section will - * still be the LAST section in the section header vector, but its file offset - * is now being pushed far away down, and causes part of it not to be mapped - * in (ie. not covered by the load segment entry in PHDR vector), therefore - * causes the new binary to fail. - * - * The solution is to modify the unexec algorithm to insert the new data2 - * section header right before the new bss section header, so their file - * offsets will be in the ascending order. Since some of the section's (all - * sections AFTER the bss section) indexes are now changed, we also need to - * modify some fields to make them point to the right sections. This is done - * by macro PATCH_INDEX. All the fields that need to be patched are: - * - * 1. ELF header e_shstrndx field. - * 2. section header sh_link and sh_info field. - * 3. symbol table entry st_shndx field. - * - * The above example now should look like: - - **** SECTION HEADER TABLE **** - [No] Type Flags Addr Offset Size Name - Link Info Adralgn Entsize - - [1] 1 2 0x80480d4 0xd4 0x13 .interp - 0 0 0x1 0 - - [2] 5 2 0x80480e8 0xe8 0x388 .hash - 3 0 0x4 0x4 - - [3] 11 2 0x8048470 0x470 0x7f0 .dynsym - 4 1 0x4 0x10 - - [4] 3 2 0x8048c60 0xc60 0x3ad .dynstr - 0 0 0x1 0 - - [5] 9 2 0x8049010 0x1010 0x338 .rel.plt - 3 7 0x4 0x8 - - [6] 1 6 0x8049348 0x1348 0x3 .init - 0 0 0x4 0 - - [7] 1 6 0x804934c 0x134c 0x680 .plt - 0 0 0x4 0x4 - - [8] 1 6 0x80499cc 0x19cc 0x3c56f .text - 0 0 0x4 0 - - [9] 1 6 0x8085f3c 0x3df3c 0x3 .fini - 0 0 0x4 0 - - [10] 1 2 0x8085f40 0x3df40 0x69c .rodata - 0 0 0x4 0 - - [11] 1 2 0x80865dc 0x3e5dc 0xd51 .rodata1 - 0 0 0x4 0 - - [12] 1 3 0x8088330 0x3f330 0x20afc .data - 0 0 0x4 0 - - [13] 1 3 0x80a8e2c 0x5fe2c 0x89d .data1 - 0 0 0x4 0 - - [14] 1 3 0x80a96cc 0x606cc 0x1a8 .got - 0 0 0x4 0x4 - - [15] 6 3 0x80a9874 0x60874 0x80 .dynamic - 4 0 0x4 0x8 - - [16] 1 3 0x80a98f4 0x608f4 0x1cf0c .data - 0 0 0x4 0 - - [17] 8 3 0x80c6800 0x7d800 0 .bss - 0 0 0x4 0 - - [18] 2 0 0 0x7d800 0x9b90 .symtab - 19 371 0x4 0x10 - - [19] 3 0 0 0x87390 0x8526 .strtab - 0 0 0x1 0 - - [20] 3 0 0 0x8f8b6 0x93 .shstrtab - 0 0 0x1 0 - - [21] 1 0 0 0x8f949 0x68b7 .comment - 0 0 0x1 0 - - */ /* We do not use mmap because that fails with NFS. Instead we read the whole file, modify it, and write it out. */ @@ -552,45 +211,15 @@ entry_address (void *section_h, ptrdiff_t idx, ptrdiff_t entsize) #define NEW_PROGRAM_H(n) \ (*(ElfW (Phdr) *) entry_address (new_program_h, n, new_file_h->e_phentsize)) -#define PATCH_INDEX(n) ((n) += old_bss_index <= (n)) typedef unsigned char byte; -/* Return the index of the section named NAME. - SECTION_NAMES, FILE_NAME and FILE_H give information - about the file we are looking in. - - If we don't find the section NAME, that is a fatal error - if NOERROR is false; return -1 if NOERROR is true. */ - -static ptrdiff_t -find_section (const char *name, const char *section_names, const char *file_name, - ElfW (Ehdr) *old_file_h, ElfW (Shdr) *old_section_h, - bool noerror) -{ - ptrdiff_t idx; - - for (idx = 1; idx < old_file_h->e_shnum; idx++) - { - char const *found_name = section_names + OLD_SECTION_H (idx).sh_name; -#ifdef UNEXELF_DEBUG - fprintf (stderr, "Looking for %s - found %s\n", name, found_name); -#endif - if (strcmp (name, found_name) == 0) - return idx; - } - - if (! noerror) - fatal ("Can't find %s in %s", name, file_name); - return -1; -} - /* **************************************************************** * unexec * * driving logic. * - * In ELF, this works by replacing the old .bss section with a new - * .data section, and inserting an empty .bss immediately afterwards. + * In ELF, this works by replacing the old bss SHT_NOBITS section with + * a new, larger, SHT_PROGBITS section. * */ void @@ -615,18 +244,16 @@ unexec (const char *new_name, const char *old_name) ElfW (Phdr) *old_program_h, *new_program_h; ElfW (Shdr) *old_section_h, *new_section_h; - /* Point to the section name table in the old file. */ - char *old_section_names; + /* Point to the section name table. */ + char *old_section_names, *new_section_names; ElfW (Phdr) *old_bss_seg, *new_bss_seg; ElfW (Addr) old_bss_addr, new_bss_addr; ElfW (Word) old_bss_size, new_data2_size; - ElfW (Off) new_data2_offset; - ElfW (Addr) new_data2_addr; - ElfW (Off) old_bss_offset; + ElfW (Off) old_bss_offset, new_data2_offset; - ptrdiff_t n, nn; - ptrdiff_t old_bss_index, old_data_index; + ptrdiff_t n; + ptrdiff_t old_bss_index; struct stat stat_buf; off_t old_file_size; @@ -688,7 +315,7 @@ unexec (const char *new_name, const char *old_name) old_bss_offset = old_bss_seg->p_offset + old_bss_seg->p_filesz; old_bss_size = old_bss_seg->p_memsz - old_bss_seg->p_filesz; - /* Find the first bss style section in the bss segment range. */ + /* Find the last bss style section in the bss segment range. */ old_bss_index = -1; for (n = old_file_h->e_shnum; --n > 0; ) { @@ -697,22 +324,15 @@ unexec (const char *new_name, const char *old_name) && shdr->sh_addr >= old_bss_addr && shdr->sh_addr + shdr->sh_size <= old_bss_addr + old_bss_size && (old_bss_index == -1 - || OLD_SECTION_H (old_bss_index).sh_addr > shdr->sh_addr)) + || OLD_SECTION_H (old_bss_index).sh_addr < shdr->sh_addr)) old_bss_index = n; } if (old_bss_index == -1) fatal ("no bss section found"); - /* Find the old .data section. Figure out parameters of - the new data2 and bss sections. */ - - old_data_index = find_section (".data", old_section_names, - old_name, old_file_h, old_section_h, 0); - new_break = sbrk (0); new_bss_addr = (ElfW (Addr)) new_break; - new_data2_addr = old_bss_addr; new_data2_size = new_bss_addr - old_bss_addr; new_data2_offset = old_bss_offset; @@ -722,7 +342,6 @@ unexec (const char *new_name, const char *old_name) DEBUG_LOG (old_bss_size); DEBUG_LOG (old_bss_offset); DEBUG_LOG (new_bss_addr); - DEBUG_LOG (new_data2_addr); DEBUG_LOG (new_data2_size); DEBUG_LOG (new_data2_offset); #endif @@ -738,7 +357,7 @@ unexec (const char *new_name, const char *old_name) if (new_file < 0) fatal ("Can't creat (%s): %s", new_name, strerror (errno)); - new_file_size = old_file_size + old_file_h->e_shentsize + new_data2_size; + new_file_size = old_file_size + new_data2_size; if (ftruncate (new_file, new_file_size)) fatal ("Can't ftruncate (%s): %s", new_name, strerror (errno)); @@ -754,21 +373,18 @@ unexec (const char *new_name, const char *old_name) new_file_h = (ElfW (Ehdr) *) new_base; memcpy (new_file_h, old_file_h, old_file_h->e_ehsize); - /* Fix up file header. We'll add one section. Section header is - further away now. */ + /* Fix up file header. Section header is further away now. */ if (new_file_h->e_shoff >= old_bss_offset) new_file_h->e_shoff += new_data2_size; - new_file_h->e_shnum += 1; - - /* Modify the e_shstrndx if necessary. */ - PATCH_INDEX (new_file_h->e_shstrndx); new_program_h = (ElfW (Phdr) *) ((byte *) new_base + new_file_h->e_phoff); new_section_h = (ElfW (Shdr) *) ((byte *) new_base + new_file_h->e_shoff); memcpy (new_program_h, old_program_h, old_file_h->e_phnum * old_file_h->e_phentsize); + memcpy (new_section_h, old_section_h, + old_file_h->e_shnum * old_file_h->e_shentsize); #ifdef UNEXELF_DEBUG DEBUG_LOG (old_file_h->e_shoff); @@ -787,42 +403,21 @@ unexec (const char *new_name, const char *old_name) /* Copy over what we have in memory now for the bss area. */ memcpy (new_base + new_data2_offset, (caddr_t) old_bss_addr, new_data2_size); - /* Fix up section headers based on new .data2 section. Any section - whose offset or virtual address is after the new .data2 section - gets its value adjusted. .bss size becomes zero. data2 section - header gets added by copying the existing .data header and - modifying the offset, address and size. */ - - /* Walk through all section headers, insert the new data2 section right - before the new bss section. */ - for (n = 1, nn = 1; n < old_file_h->e_shnum; n++, nn++) + /* Walk through all section headers, copying data and updating. */ + for (n = 1; n < old_file_h->e_shnum; n++) { caddr_t src; ElfW (Shdr) *old_shdr = &OLD_SECTION_H (n); - ElfW (Shdr) *new_shdr = &NEW_SECTION_H (nn); - - /* If it is (s)bss section, insert the new data2 section before it. */ - if (n == old_bss_index) - { - /* Steal the data section header for this data2 section. */ - memcpy (new_shdr, &OLD_SECTION_H (old_data_index), - new_file_h->e_shentsize); - - new_shdr->sh_addr = new_data2_addr; - new_shdr->sh_offset = new_data2_offset; - new_shdr->sh_size = new_data2_size; - new_shdr->sh_addralign = 1; - nn++; - new_shdr++; - } - - memcpy (new_shdr, old_shdr, old_file_h->e_shentsize); + ElfW (Shdr) *new_shdr = &NEW_SECTION_H (n); if (new_shdr->sh_type == SHT_NOBITS && new_shdr->sh_addr >= old_bss_addr && (new_shdr->sh_addr + new_shdr->sh_size <= old_bss_addr + old_bss_size)) { + /* This section now has file backing. */ + new_shdr->sh_type = SHT_PROGBITS; + /* SHT_NOBITS sections do not need a valid sh_offset, so it might be incorrect. Write the correct value. */ new_shdr->sh_offset = (new_shdr->sh_addr - new_bss_seg->p_vaddr @@ -837,35 +432,20 @@ unexec (const char *new_name, const char *old_name) if (strcmp (old_section_names + new_shdr->sh_name, ".plt") == 0) memset (new_shdr->sh_offset + new_base, 0, new_shdr->sh_size); - /* Set the new bss and sbss section's size to zero, because - we've already covered this address range by .data2. */ - new_shdr->sh_size = 0; - } - else - { - /* Any section that was originally placed after the .bss - section should now be off by NEW_DATA2_SIZE. */ + /* Extend the size of the last bss section to cover dumped + data. */ + if (n == old_bss_index) + new_shdr->sh_size = new_bss_addr - new_shdr->sh_addr; - if (new_shdr->sh_offset >= old_bss_offset) - new_shdr->sh_offset += new_data2_size; - - /* Any section that was originally placed after the section - header table should now be off by the size of one section - header table entry. */ - if (new_shdr->sh_offset > new_file_h->e_shoff) - new_shdr->sh_offset += new_file_h->e_shentsize; + /* We have already copied this section from the current + process. */ + continue; } - /* If any section hdr refers to the section after the new .data - section, make it refer to next one because we have inserted - a new section in between. */ - - PATCH_INDEX (new_shdr->sh_link); - /* For symbol tables, info is a symbol table index, - so don't change it. */ - if (new_shdr->sh_type != SHT_SYMTAB - && new_shdr->sh_type != SHT_DYNSYM) - PATCH_INDEX (new_shdr->sh_info); + /* Any section that was originally placed after the .bss + section should now be offset by NEW_DATA2_SIZE. */ + if (new_shdr->sh_offset >= old_bss_offset) + new_shdr->sh_offset += new_data2_size; /* Now, start to copy the content of sections. */ if (new_shdr->sh_type == SHT_NULL @@ -981,24 +561,6 @@ unexec (const char *new_name, const char *old_name) } } #endif /* __sgi */ - - /* Patch st_shndx field of symbol table. */ - if (new_shdr->sh_type == SHT_SYMTAB - || new_shdr->sh_type == SHT_DYNSYM) - { - ptrdiff_t num = new_shdr->sh_size / new_shdr->sh_entsize; - ElfW (Sym) *sym = (ElfW (Sym) *) (new_shdr->sh_offset + new_base); - for (; num--; sym++) - { - if (sym->st_shndx == SHN_XINDEX) - fatal ("SHT_SYMTAB_SHNDX unsupported"); - if (sym->st_shndx == SHN_UNDEF - || sym->st_shndx >= SHN_LORESERVE) - continue; - - PATCH_INDEX (sym->st_shndx); - } - } } /* Update the symbol values of _edata and _end. */ @@ -1042,15 +604,10 @@ unexec (const char *new_name, const char *old_name) ElfW (Shdr) *new_shdr = &NEW_SECTION_H (symp->st_shndx); if (new_shdr->sh_type != SHT_NOBITS) { - ElfW (Shdr) *old_shdr; + ElfW (Shdr) *old_shdr = &OLD_SECTION_H (symp->st_shndx); ptrdiff_t reladdr = symp->st_value - new_shdr->sh_addr; ptrdiff_t newoff = reladdr + new_shdr->sh_offset; - /* "Unpatch" index. */ - nn = symp->st_shndx; - if (nn > old_bss_index) - nn--; - old_shdr = &OLD_SECTION_H (nn); if (old_shdr->sh_type == SHT_NOBITS) memset (new_base + newoff, 0, symp->st_size); else @@ -1065,6 +622,25 @@ unexec (const char *new_name, const char *old_name) } } + /* Modify the names of sections we changed from SHT_NOBITS to + SHT_PROGBITS. This is really just cosmetic, but some tools that + (wrongly) operate on section names rather than types might be + confused by a SHT_PROGBITS .bss section. */ + new_section_names = ((char *) new_base + + NEW_SECTION_H (new_file_h->e_shstrndx).sh_offset); + for (n = new_file_h->e_shnum; 0 < --n; ) + { + ElfW (Shdr) *old_shdr = &OLD_SECTION_H (n); + ElfW (Shdr) *new_shdr = &NEW_SECTION_H (n); + + /* Replace the leading '.' with ','. When .shstrtab is string + merged this will rename both .bss and .rela.bss to ,bss and + .rela,bss. */ + if (old_shdr->sh_type == SHT_NOBITS + && new_shdr->sh_type == SHT_PROGBITS) + *(new_section_names + new_shdr->sh_name) = ','; + } + /* This loop seeks out relocation sections for the data section, so that it can undo relocations performed by the runtime loader. */ for (n = new_file_h->e_shnum; 0 < --n; ) commit 0d6442265e5b709af5eebedf8f0d6b82974f4c31 Author: Alan Modra Date: Sun Nov 8 09:29:00 2015 -0800 ELF unexec: Drive from PT_LOAD header rather than sections This rewrites bss handling in the ELF unexec code. Finding bss sections by name results in complicated code that - does not account for all names of possible bss sections, - assumes specific ordering of bss sections, - can wrongly choose a SHT_NOBITS section not in the bss segment, - incorrectly calculates bss size (no accounting for alignment gaps), - assumes .data and .bss are in the same segment. All of these problems and more are solved by finding the bss segment in PT_LOAD headers, ie. the address range included in p_memsz but not p_filesz of the last PT_LOAD header, then matching SHT_NOBITS sections in that address range. * unexelf.c: Delete old ppc comment. (OLD_PROGRAM_H): Define. (round_up): Delete. (unexec): Don't search for bss style sections by name. Instead, use the last PT_LOAD header address range covered by p_memsz but not p_filesz and match any SHT_NOBITS section in that address range. Simplify initialisation of section header vars. Don't assume that section headers are above bss segment. Move copying of bss area out of section loop. Align .data2 section to 1, since it now covers the entire bss area. For SHT_NOBITS sections in the bss segment, leave sh_addr and sh_addralign unchanged, but correct sh_offset. Clear memory corresponding to SHT_NOBITS .plt section. Delete comment and hacks for sections partly overlapping bss range now that the full range is properly calculated. Delete now dead .sbss code. (Bug#20614) diff --git a/src/unexelf.c b/src/unexelf.c index 15a4cde..4e9c50d 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -535,29 +535,6 @@ verify ((! TYPE_SIGNED (ElfW (Half)) /* Get the address of a particular section or program header entry, * accounting for the size of the entries. */ -/* - On PPC Reference Platform running Solaris 2.5.1 - the plt section is also of type NOBI like the bss section. - (not really stored) and therefore sections after the bss - section start at the plt offset. The plt section is always - the one just before the bss section. - Thus, we modify the test from - if (NEW_SECTION_H (nn).sh_offset >= new_data2_offset) - to - if (NEW_SECTION_H (nn).sh_offset >= - OLD_SECTION_H (old_bss_index-1).sh_offset) - This is just a hack. We should put the new data section - before the .plt section. - And we should not have this routine at all but use - the libelf library to read the old file and create the new - file. - The changed code is minimal and depends on prep set in m/prep.h - Erik Deumens - Quantum Theory Project - University of Florida - deumens@qtp.ufl.edu - Apr 23, 1996 - */ static void * entry_address (void *section_h, ptrdiff_t idx, ptrdiff_t entsize) @@ -570,23 +547,14 @@ entry_address (void *section_h, ptrdiff_t idx, ptrdiff_t entsize) (*(ElfW (Shdr) *) entry_address (old_section_h, n, old_file_h->e_shentsize)) #define NEW_SECTION_H(n) \ (*(ElfW (Shdr) *) entry_address (new_section_h, n, new_file_h->e_shentsize)) +#define OLD_PROGRAM_H(n) \ + (*(ElfW (Phdr) *) entry_address (old_program_h, n, old_file_h->e_phentsize)) #define NEW_PROGRAM_H(n) \ (*(ElfW (Phdr) *) entry_address (new_program_h, n, new_file_h->e_phentsize)) #define PATCH_INDEX(n) ((n) += old_bss_index <= (n)) typedef unsigned char byte; -/* Round X up to a multiple of Y. */ - -static ElfW (Addr) -round_up (ElfW (Addr) x, ElfW (Addr) y) -{ - ElfW (Addr) rem = x % y; - if (rem == 0) - return x; - return x - rem + y; -} - /* Return the index of the section named NAME. SECTION_NAMES, FILE_NAME and FILE_H give information about the file we are looking in. @@ -650,16 +618,15 @@ unexec (const char *new_name, const char *old_name) /* Point to the section name table in the old file. */ char *old_section_names; + ElfW (Phdr) *old_bss_seg, *new_bss_seg; ElfW (Addr) old_bss_addr, new_bss_addr; ElfW (Word) old_bss_size, new_data2_size; ElfW (Off) new_data2_offset; ElfW (Addr) new_data2_addr; ElfW (Off) old_bss_offset; - ElfW (Word) new_data2_incr; ptrdiff_t n, nn; - ptrdiff_t old_bss_index, old_sbss_index, old_plt_index; - ptrdiff_t old_data_index, new_data2_index; + ptrdiff_t old_bss_index, old_data_index; struct stat stat_buf; off_t old_file_size; @@ -703,54 +670,40 @@ unexec (const char *new_name, const char *old_name) old_section_names = (char *) old_base + OLD_SECTION_H (old_file_h->e_shstrndx).sh_offset; - /* Find the old .bss section. Figure out parameters of the new - data2 and bss sections. */ - - old_bss_index = find_section (".bss", old_section_names, - old_name, old_file_h, old_section_h, 0); - - old_sbss_index = find_section (".sbss", old_section_names, - old_name, old_file_h, old_section_h, 1); - if (old_sbss_index != -1) - if (OLD_SECTION_H (old_sbss_index).sh_type != SHT_NOBITS) - old_sbss_index = -1; - - /* PowerPC64 has .plt in the BSS section. */ - old_plt_index = find_section (".plt", old_section_names, - old_name, old_file_h, old_section_h, 1); - if (old_plt_index != -1) - if (OLD_SECTION_H (old_plt_index).sh_type != SHT_NOBITS) - old_plt_index = -1; - - if (old_sbss_index == -1 && old_plt_index == -1) - { - old_bss_addr = OLD_SECTION_H (old_bss_index).sh_addr; - old_bss_size = OLD_SECTION_H (old_bss_index).sh_size; - old_bss_offset = OLD_SECTION_H (old_bss_index).sh_offset; - new_data2_index = old_bss_index; - } - else if (old_plt_index != -1 - && (old_sbss_index == -1 - || (OLD_SECTION_H (old_sbss_index).sh_addr - > OLD_SECTION_H (old_plt_index).sh_addr))) + /* Find the PT_LOAD header covering the highest address. This + segment will be where bss sections are located, past p_filesz. */ + old_bss_seg = 0; + for (n = old_file_h->e_phnum; --n >= 0; ) { - old_bss_addr = OLD_SECTION_H (old_plt_index).sh_addr; - old_bss_size = OLD_SECTION_H (old_bss_index).sh_size - + OLD_SECTION_H (old_plt_index).sh_size; - if (old_sbss_index != -1) - old_bss_size += OLD_SECTION_H (old_sbss_index).sh_size; - old_bss_offset = OLD_SECTION_H (old_plt_index).sh_offset; - new_data2_index = old_plt_index; + ElfW (Phdr) *seg = &OLD_PROGRAM_H (n); + if (seg->p_type == PT_LOAD + && (old_bss_seg == 0 + || seg->p_vaddr > old_bss_seg->p_vaddr)) + old_bss_seg = seg; } - else + + /* Note that old_bss_addr may be lower than the first bss section + address, since the section may need aligning. */ + old_bss_addr = old_bss_seg->p_vaddr + old_bss_seg->p_filesz; + old_bss_offset = old_bss_seg->p_offset + old_bss_seg->p_filesz; + old_bss_size = old_bss_seg->p_memsz - old_bss_seg->p_filesz; + + /* Find the first bss style section in the bss segment range. */ + old_bss_index = -1; + for (n = old_file_h->e_shnum; --n > 0; ) { - old_bss_addr = OLD_SECTION_H (old_sbss_index).sh_addr; - old_bss_size = OLD_SECTION_H (old_bss_index).sh_size - + OLD_SECTION_H (old_sbss_index).sh_size; - old_bss_offset = OLD_SECTION_H (old_sbss_index).sh_offset; - new_data2_index = old_sbss_index; + ElfW (Shdr) *shdr = &OLD_SECTION_H (n); + if (shdr->sh_type == SHT_NOBITS + && shdr->sh_addr >= old_bss_addr + && shdr->sh_addr + shdr->sh_size <= old_bss_addr + old_bss_size + && (old_bss_index == -1 + || OLD_SECTION_H (old_bss_index).sh_addr > shdr->sh_addr)) + old_bss_index = n; } + if (old_bss_index == -1) + fatal ("no bss section found"); + /* Find the old .data section. Figure out parameters of the new data2 and bss sections. */ @@ -761,13 +714,7 @@ unexec (const char *new_name, const char *old_name) new_bss_addr = (ElfW (Addr)) new_break; new_data2_addr = old_bss_addr; new_data2_size = new_bss_addr - old_bss_addr; - new_data2_offset = OLD_SECTION_H (old_data_index).sh_offset - + (new_data2_addr - OLD_SECTION_H (old_data_index).sh_addr); - /* This is the amount by which the sections following the bss sections - must be shifted in the image. It can differ from new_data2_size if - the end of the old .data section (and thus the offset of the .bss - section) was unaligned. */ - new_data2_incr = new_data2_size + (new_data2_offset - old_bss_offset); + new_data2_offset = old_bss_offset; #ifdef UNEXELF_DEBUG fprintf (stderr, "old_bss_index %td\n", old_bss_index); @@ -778,7 +725,6 @@ unexec (const char *new_name, const char *old_name) DEBUG_LOG (new_data2_addr); DEBUG_LOG (new_data2_size); DEBUG_LOG (new_data2_offset); - DEBUG_LOG (new_data2_incr); #endif if (new_bss_addr < old_bss_addr + old_bss_size) @@ -792,7 +738,7 @@ unexec (const char *new_name, const char *old_name) if (new_file < 0) fatal ("Can't creat (%s): %s", new_name, strerror (errno)); - new_file_size = old_file_size + old_file_h->e_shentsize + new_data2_incr; + new_file_size = old_file_size + old_file_h->e_shentsize + new_data2_size; if (ftruncate (new_file, new_file_size)) fatal ("Can't ftruncate (%s): %s", new_name, strerror (errno)); @@ -811,15 +757,15 @@ unexec (const char *new_name, const char *old_name) /* Fix up file header. We'll add one section. Section header is further away now. */ - new_file_h->e_shoff += new_data2_incr; + if (new_file_h->e_shoff >= old_bss_offset) + new_file_h->e_shoff += new_data2_size; new_file_h->e_shnum += 1; /* Modify the e_shstrndx if necessary. */ PATCH_INDEX (new_file_h->e_shstrndx); - new_program_h = (ElfW (Phdr) *) ((byte *) new_base + old_file_h->e_phoff); - new_section_h = (ElfW (Shdr) *) - ((byte *) new_base + old_file_h->e_shoff + new_data2_incr); + new_program_h = (ElfW (Phdr) *) ((byte *) new_base + new_file_h->e_phoff); + new_section_h = (ElfW (Shdr) *) ((byte *) new_base + new_file_h->e_shoff); memcpy (new_program_h, old_program_h, old_file_h->e_phnum * old_file_h->e_phentsize); @@ -831,65 +777,21 @@ unexec (const char *new_name, const char *old_name) fprintf (stderr, "New section count %td\n", (ptrdiff_t) new_file_h->e_shnum); #endif - /* Fix up a new program header. Extend the writable data segment so - that the bss area is covered too. Find that segment by looking - for a segment that ends just before the .bss area. Make sure - that no segments are above the new .data2. Put a loop at the end - to adjust the offset and address of any segment that is above - data2, just in case we decide to allow this later. */ + /* Fix up program header. Extend the writable data segment so + that the bss area is covered too. */ - for (n = new_file_h->e_phnum; --n >= 0; ) - { - /* Compute maximum of all requirements for alignment of section. */ - ElfW (Word) alignment = (NEW_PROGRAM_H (n)).p_align; - if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment) - alignment = OLD_SECTION_H (old_bss_index).sh_addralign; - -#ifdef __sgi - /* According to r02kar@x4u2.desy.de (Karsten Kuenne) - and oliva@gnu.org (Alexandre Oliva), on IRIX 5.2, we - always get "Program segment above .bss" when dumping - when the executable doesn't have an sbss section. */ - if (old_sbss_index != -1) -#endif /* __sgi */ - if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz - > (old_sbss_index == -1 - ? old_bss_addr - : round_up (old_bss_addr, alignment))) - fatal ("Program segment above .bss in %s", old_name); - - if (NEW_PROGRAM_H (n).p_type == PT_LOAD - && (round_up ((NEW_PROGRAM_H (n)).p_vaddr - + (NEW_PROGRAM_H (n)).p_filesz, - alignment) - == round_up (old_bss_addr, alignment))) - break; - } - if (n < 0) - fatal ("Couldn't find segment next to .bss in %s", old_name); - - /* Make sure that the size includes any padding before the old .bss - section. */ - NEW_PROGRAM_H (n).p_filesz = new_bss_addr - NEW_PROGRAM_H (n).p_vaddr; - NEW_PROGRAM_H (n).p_memsz = NEW_PROGRAM_H (n).p_filesz; - -#if 0 /* Maybe allow section after data2 - does this ever happen? */ - for (n = new_file_h->e_phnum; --n >= 0; ) - { - if (NEW_PROGRAM_H (n).p_vaddr - && NEW_PROGRAM_H (n).p_vaddr >= new_data2_addr) - NEW_PROGRAM_H (n).p_vaddr += new_data2_size - old_bss_size; + new_bss_seg = new_program_h + (old_bss_seg - old_program_h); + new_bss_seg->p_filesz = new_bss_addr - new_bss_seg->p_vaddr; + new_bss_seg->p_memsz = new_bss_seg->p_filesz; - if (NEW_PROGRAM_H (n).p_offset >= new_data2_offset) - NEW_PROGRAM_H (n).p_offset += new_data2_incr; - } -#endif + /* Copy over what we have in memory now for the bss area. */ + memcpy (new_base + new_data2_offset, (caddr_t) old_bss_addr, new_data2_size); /* Fix up section headers based on new .data2 section. Any section whose offset or virtual address is after the new .data2 section - gets its value adjusted. .bss size becomes zero and new address - is set. data2 section header gets added by copying the existing - .data header and modifying the offset, address and size. */ + gets its value adjusted. .bss size becomes zero. data2 section + header gets added by copying the existing .data header and + modifying the offset, address and size. */ /* Walk through all section headers, insert the new data2 section right before the new bss section. */ @@ -900,9 +802,7 @@ unexec (const char *new_name, const char *old_name) ElfW (Shdr) *new_shdr = &NEW_SECTION_H (nn); /* If it is (s)bss section, insert the new data2 section before it. */ - /* new_data2_index is the index of either old_sbss or old_bss, that was - chosen as a section for new_data2. */ - if (n == new_data2_index) + if (n == old_bss_index) { /* Steal the data section header for this data2 section. */ memcpy (new_shdr, &OLD_SECTION_H (old_data_index), @@ -911,68 +811,43 @@ unexec (const char *new_name, const char *old_name) new_shdr->sh_addr = new_data2_addr; new_shdr->sh_offset = new_data2_offset; new_shdr->sh_size = new_data2_size; - /* Use the bss section's alignment. This will assure that the - new data2 section always be placed in the same spot as the old - bss section by any other application. */ - new_shdr->sh_addralign = old_shdr->sh_addralign; - - /* Now copy over what we have in the memory now. */ - memcpy (new_shdr->sh_offset + new_base, - (caddr_t) old_shdr->sh_addr, - new_data2_size); + new_shdr->sh_addralign = 1; nn++; new_shdr++; } memcpy (new_shdr, old_shdr, old_file_h->e_shentsize); - if (n == old_bss_index - /* The new bss and sbss section's size is zero, and its file offset - and virtual address should be off by NEW_DATA2_SIZE. */ - || n == old_sbss_index || n == old_plt_index - ) + if (new_shdr->sh_type == SHT_NOBITS + && new_shdr->sh_addr >= old_bss_addr + && (new_shdr->sh_addr + new_shdr->sh_size + <= old_bss_addr + old_bss_size)) { - /* NN should be `old_s?bss_index + 1' at this point. */ - new_shdr->sh_offset = new_data2_offset + new_data2_size; - new_shdr->sh_addr = new_data2_addr + new_data2_size; - /* Let the new bss section address alignment be the same as the - section address alignment followed the old bss section, so - this section will be placed in exactly the same place. */ - new_shdr->sh_addralign = OLD_SECTION_H (nn).sh_addralign; + /* SHT_NOBITS sections do not need a valid sh_offset, so it + might be incorrect. Write the correct value. */ + new_shdr->sh_offset = (new_shdr->sh_addr - new_bss_seg->p_vaddr + + new_bss_seg->p_offset); + + /* If this is was a SHT_NOBITS .plt section, then it is + probably a PowerPC PLT. If it is PowerPC64 ELFv1 then + glibc ld.so doesn't initialize the toc pointer word. A + non-zero toc pointer word can defeat Power7 thread safety + during lazy update of a PLT entry. This only matters if + emacs becomes multi-threaded. */ + if (strcmp (old_section_names + new_shdr->sh_name, ".plt") == 0) + memset (new_shdr->sh_offset + new_base, 0, new_shdr->sh_size); + + /* Set the new bss and sbss section's size to zero, because + we've already covered this address range by .data2. */ new_shdr->sh_size = 0; } else { /* Any section that was originally placed after the .bss - section should now be off by NEW_DATA2_INCR. If a - section overlaps the .bss section, consider it to be - placed after the .bss section. Overlap can occur if the - section just before .bss has less-strict alignment; this - was observed between .symtab and .bss on Solaris 2.5.1 - (sparc) with GCC snapshot 960602. + section should now be off by NEW_DATA2_SIZE. */ -> dump -h temacs - -temacs: - - **** SECTION HEADER TABLE **** -[No] Type Flags Addr Offset Size Name - Link Info Adralgn Entsize - -[22] 1 3 0x335150 0x315150 0x4 .data.rel.local - 0 0 0x4 0 - -[23] 8 3 0x335158 0x315158 0x42720 .bss - 0 0 0x8 0 - -[24] 2 0 0 0x315154 0x1c9d0 .symtab - 25 1709 0x4 0x10 - */ - - if (new_shdr->sh_offset >= old_bss_offset - || (new_shdr->sh_offset + new_shdr->sh_size - > new_data2_offset)) - new_shdr->sh_offset += new_data2_incr; + if (new_shdr->sh_offset >= old_bss_offset) + new_shdr->sh_offset += new_data2_size; /* Any section that was originally placed after the section header table should now be off by the size of one section @@ -992,23 +867,13 @@ temacs: && new_shdr->sh_type != SHT_DYNSYM) PATCH_INDEX (new_shdr->sh_info); - if (old_sbss_index != -1) - if (!strcmp (old_section_names + new_shdr->sh_name, ".sbss")) - { - new_shdr->sh_offset = - round_up (new_shdr->sh_offset, - new_shdr->sh_addralign); - new_shdr->sh_type = SHT_PROGBITS; - } - /* Now, start to copy the content of sections. */ if (new_shdr->sh_type == SHT_NULL || new_shdr->sh_type == SHT_NOBITS) continue; - /* Write out the sections. .data and .data1 (and data2, called - ".data" in the strings table) get copied from the current process - instead of the old file. */ + /* Some sections are copied from the current process instead of + the old file. */ if (!strcmp (old_section_names + new_shdr->sh_name, ".data") || !strcmp (old_section_names + new_shdr->sh_name, ".sdata") || !strcmp (old_section_names + new_shdr->sh_name, ".lit4") @@ -1037,8 +902,7 @@ temacs: || !strcmp (old_section_names + new_shdr->sh_name, ".got") #endif || !strcmp (old_section_names + new_shdr->sh_name, ".sdata1") - || !strcmp (old_section_names + new_shdr->sh_name, ".data1") - || !strcmp (old_section_names + new_shdr->sh_name, ".sbss")) + || !strcmp (old_section_names + new_shdr->sh_name, ".data1")) src = (caddr_t) old_shdr->sh_addr; else src = old_base + old_shdr->sh_offset; commit 8285c2ab8050de218c0c06182659ee0a7b23a0f6 Author: Alan Modra Date: Sun Nov 8 09:29:00 2015 -0800 ELF unexec: R_*_NONE relocs These should be ignored on all targets. * unexelf.c (unexec): Ignore R_*_NONE relocs for any target, not just Alpha. Comment on reloc size assumption. diff --git a/src/unexelf.c b/src/unexelf.c index df99f92..15a4cde 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -1202,7 +1202,7 @@ temacs: } /* This loop seeks out relocation sections for the data section, so - that it can undo relocations performed by the runtime linker. */ + that it can undo relocations performed by the runtime loader. */ for (n = new_file_h->e_shnum; 0 < --n; ) { ElfW (Shdr) *rel_shdr = &NEW_SECTION_H (n); @@ -1235,14 +1235,14 @@ temacs: reloc += rel_shdr->sh_entsize) { ElfW (Addr) addr = ((ElfW (Rel) *) reloc)->r_offset - offset; -#ifdef __alpha__ - /* The Alpha ELF binutils currently have a bug that - sometimes results in relocs that contain all - zeroes. Work around this for now... */ + /* Ignore R_*_NONE relocs. */ if (((ElfW (Rel) *) reloc)->r_offset == 0) continue; -#endif - memcpy (new_base + addr, old_base + addr, sizeof (ElfW (Addr))); + /* Assume reloc applies to a word. + ??? This is not always true, eg. TLS module/index + pair in .got which occupies two words. */ + memcpy (new_base + addr, old_base + addr, + sizeof (ElfW (Addr))); } } break; commit 3ff9fc0e8d738be5004c65c3be314af9aca68148 Author: Alan Modra Date: Sun Nov 8 09:29:00 2015 -0800 ELF unexec: _OBJC_ symbols in bss sections This code assumed that there was only one bss section. Rather than checking for a particular index, check the section type. Also, handle the possibility that the section was SHT_NOBITS originally and is unchanged, in which case no clearing is needed (and sh_offset isn't necessarily valid, which can lead to a wild memset). * unexelf.c (unexec): Properly handle _OBJC_ symbols in bss sections. diff --git a/src/unexelf.c b/src/unexelf.c index 286ba2e..df99f92 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -1176,20 +1176,25 @@ temacs: "_OBJC_", sizeof ("_OBJC_") - 1) == 0) { ElfW (Shdr) *new_shdr = &NEW_SECTION_H (symp->st_shndx); - ptrdiff_t reladdr = symp->st_value - new_shdr->sh_addr; - ptrdiff_t newoff = reladdr + new_shdr->sh_offset; - - /* "Unpatch" index. */ - nn = symp->st_shndx; - if (nn > old_bss_index) - nn--; - if (nn == old_bss_index) - memset (new_base + newoff, 0, symp->st_size); - else + if (new_shdr->sh_type != SHT_NOBITS) { - ElfW (Shdr) *old_shdr = &OLD_SECTION_H (nn); - ptrdiff_t oldoff = reladdr + old_shdr->sh_offset; - memcpy (new_base + newoff, old_base + oldoff, symp->st_size); + ElfW (Shdr) *old_shdr; + ptrdiff_t reladdr = symp->st_value - new_shdr->sh_addr; + ptrdiff_t newoff = reladdr + new_shdr->sh_offset; + + /* "Unpatch" index. */ + nn = symp->st_shndx; + if (nn > old_bss_index) + nn--; + old_shdr = &OLD_SECTION_H (nn); + if (old_shdr->sh_type == SHT_NOBITS) + memset (new_base + newoff, 0, symp->st_size); + else + { + ptrdiff_t oldoff = reladdr + old_shdr->sh_offset; + memcpy (new_base + newoff, old_base + oldoff, + symp->st_size); + } } } #endif commit 190b968f189cb7d06223bb39045ec9055df67f68 Author: Alan Modra Date: Sun Nov 8 09:29:00 2015 -0800 ELF unexec: Symbol table patching No st_shndx value larger than SHN_LORESERVE should be changed. * unexelf.c (unexec): Don't adjust any st_shndx larger than SHN_LORESERVE. Error on SHN_XINDEX. diff --git a/src/unexelf.c b/src/unexelf.c index 0065491..286ba2e 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -1118,7 +1118,7 @@ temacs: } #endif /* __sgi */ - /* If it is the symbol table, its st_shndx field needs to be patched. */ + /* Patch st_shndx field of symbol table. */ if (new_shdr->sh_type == SHT_SYMTAB || new_shdr->sh_type == SHT_DYNSYM) { @@ -1126,9 +1126,10 @@ temacs: ElfW (Sym) *sym = (ElfW (Sym) *) (new_shdr->sh_offset + new_base); for (; num--; sym++) { - if ((sym->st_shndx == SHN_UNDEF) - || (sym->st_shndx == SHN_ABS) - || (sym->st_shndx == SHN_COMMON)) + if (sym->st_shndx == SHN_XINDEX) + fatal ("SHT_SYMTAB_SHNDX unsupported"); + if (sym->st_shndx == SHN_UNDEF + || sym->st_shndx >= SHN_LORESERVE) continue; PATCH_INDEX (sym->st_shndx); commit 47c6e3035b8182c6436de4673473de7824ad59f1 Author: Alan Modra Date: Sun Nov 8 09:28:59 2015 -0800 ELF unexec: Merge Alpha and MIPS COFF debug handling * unexelf.c (unexec): Merge Alpha and MIPS COFF debug handling. Don't find .mdebug section index, find the section in the loop. Allow for unlikely possibility that .mdebug is located at sh_offset before bss segment, by calculating move from difference in sh_offset rather than just assuming new_data2_size. Simplify cbLineOffset handling. diff --git a/src/unexelf.c b/src/unexelf.c index d6c6648..0065491 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -660,9 +660,6 @@ unexec (const char *new_name, const char *old_name) ptrdiff_t n, nn; ptrdiff_t old_bss_index, old_sbss_index, old_plt_index; ptrdiff_t old_data_index, new_data2_index; -#if defined _SYSTYPE_SYSV || defined __sgi - ptrdiff_t old_mdebug_index; -#endif struct stat stat_buf; off_t old_file_size; @@ -706,13 +703,6 @@ unexec (const char *new_name, const char *old_name) old_section_names = (char *) old_base + OLD_SECTION_H (old_file_h->e_shstrndx).sh_offset; - /* Find the mdebug section, if any. */ - -#if defined _SYSTYPE_SYSV || defined __sgi - old_mdebug_index = find_section (".mdebug", old_section_names, - old_name, old_file_h, old_section_h, 1); -#endif - /* Find the old .bss section. Figure out parameters of the new data2 and bss sections. */ @@ -1055,51 +1045,31 @@ temacs: memcpy (new_shdr->sh_offset + new_base, src, new_shdr->sh_size); -#if defined __alpha__ && !defined __OpenBSD__ - /* Update Alpha COFF symbol table: */ - if (strcmp (old_section_names + old_shdr->sh_name, ".mdebug") == 0) - { - pHDRR symhdr = (pHDRR) (new_shdr->sh_offset + new_base); - - symhdr->cbLineOffset += new_data2_size; - symhdr->cbDnOffset += new_data2_size; - symhdr->cbPdOffset += new_data2_size; - symhdr->cbSymOffset += new_data2_size; - symhdr->cbOptOffset += new_data2_size; - symhdr->cbAuxOffset += new_data2_size; - symhdr->cbSsOffset += new_data2_size; - symhdr->cbSsExtOffset += new_data2_size; - symhdr->cbFdOffset += new_data2_size; - symhdr->cbRfdOffset += new_data2_size; - symhdr->cbExtOffset += new_data2_size; - } -#endif /* __alpha__ && !__OpenBSD__ */ - -#if defined (_SYSTYPE_SYSV) - if (new_shdr->sh_type == SHT_MIPS_DEBUG - && old_mdebug_index != -1) +#if (defined __alpha__ && !defined __OpenBSD__) || defined _SYSTYPE_SYSV + /* Update Alpha and MIPS COFF debug symbol table. */ + if (strcmp (old_section_names + new_shdr->sh_name, ".mdebug") == 0 + && new_shdr->sh_offset - old_shdr->sh_offset != 0 +#if defined _SYSTYPE_SYSV + && new_shdr->sh_type == SHT_MIPS_DEBUG +#endif + ) { - ptrdiff_t new_offset = new_shdr->sh_offset; - ptrdiff_t old_offset = OLD_SECTION_H (old_mdebug_index).sh_offset; - ptrdiff_t diff = new_offset - old_offset; + ptrdiff_t diff = new_shdr->sh_offset - old_shdr->sh_offset; HDRR *phdr = (HDRR *) (new_shdr->sh_offset + new_base); - if (diff) - { - phdr->cbLineOffset += diff; - phdr->cbDnOffset += diff; - phdr->cbPdOffset += diff; - phdr->cbSymOffset += diff; - phdr->cbOptOffset += diff; - phdr->cbAuxOffset += diff; - phdr->cbSsOffset += diff; - phdr->cbSsExtOffset += diff; - phdr->cbFdOffset += diff; - phdr->cbRfdOffset += diff; - phdr->cbExtOffset += diff; - } + phdr->cbLineOffset += diff; + phdr->cbDnOffset += diff; + phdr->cbPdOffset += diff; + phdr->cbSymOffset += diff; + phdr->cbOptOffset += diff; + phdr->cbAuxOffset += diff; + phdr->cbSsOffset += diff; + phdr->cbSsExtOffset += diff; + phdr->cbFdOffset += diff; + phdr->cbRfdOffset += diff; + phdr->cbExtOffset += diff; } -#endif /* _SYSTYPE_SYSV */ +#endif /* __alpha__ || _SYSTYPE_SYSV */ #if __sgi /* Adjust the HDRR offsets in .mdebug and copy the @@ -1110,7 +1080,8 @@ temacs: the ld bug that gets the line table in a hole in the elf file rather than in the .mdebug section proper. David Anderson. davea@sgi.com Jan 16,1994. */ - if (n == old_mdebug_index) + if (strcmp (old_section_names + new_shdr->sh_name, ".mdebug") == 0 + && new_shdr->sh_offset - old_shdr->sh_offset != 0) { #define MDEBUGADJUST(__ct,__fileaddr) \ if (n_phdrr->__ct > 0) \ @@ -1120,7 +1091,7 @@ temacs: HDRR *o_phdrr = (HDRR *) ((byte *) old_base + old_shdr->sh_offset); HDRR *n_phdrr = (HDRR *) ((byte *) new_base + new_shdr->sh_offset); - unsigned movement = new_data2_size; + ptrdiff_t movement = new_shdr->sh_offset - old_shdr->sh_offset; MDEBUGADJUST (idnMax, cbDnOffset); MDEBUGADJUST (ipdMax, cbPdOffset); @@ -1136,22 +1107,13 @@ temacs: requires special handling. */ if (n_phdrr->cbLine > 0) { + n_phdrr->cbLineOffset += movement; + if (o_phdrr->cbLineOffset > (old_shdr->sh_offset + old_shdr->sh_size)) - { - /* line data is in a hole in elf. do special copy and adjust - for this ld mistake. - */ - n_phdrr->cbLineOffset += movement; - - memcpy (n_phdrr->cbLineOffset + new_base, - o_phdrr->cbLineOffset + old_base, n_phdrr->cbLine); - } - else - { - /* somehow line data is in .mdebug as it is supposed to be. */ - MDEBUGADJUST (cbLine, cbLineOffset); - } + /* If not covered by section, it hasn't yet been copied. */ + memcpy (n_phdrr->cbLineOffset + new_base, + o_phdrr->cbLineOffset + old_base, n_phdrr->cbLine); } } #endif /* __sgi */ commit 856f4eaba8a76953e0bbcfc7ebb0ca4f2e3cf351 Author: Alan Modra Date: Sun Nov 8 09:28:59 2015 -0800 ELF unexec: Tidy code Separate out some of the more mechanical changes so following patches are smaller. * unexelf.c (unexec): Rearrange initialisation of program header vars. Use pointer vars in loops rather than indexing section header array via macros. Simplify _OBJC_ sym code and reloc handling code. diff --git a/src/unexelf.c b/src/unexelf.c index 1699f31..d6c6648 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -812,20 +812,11 @@ unexec (const char *new_name, const char *old_name) if (new_base == MAP_FAILED) fatal ("Can't allocate buffer for %s: %s", old_name, strerror (errno)); - new_file_h = (ElfW (Ehdr) *) new_base; - new_program_h = (ElfW (Phdr) *) ((byte *) new_base + old_file_h->e_phoff); - new_section_h = (ElfW (Shdr) *) - ((byte *) new_base + old_file_h->e_shoff + new_data2_incr); - /* Make our new file, program and section headers as copies of the originals. */ + new_file_h = (ElfW (Ehdr) *) new_base; memcpy (new_file_h, old_file_h, old_file_h->e_ehsize); - memcpy (new_program_h, old_program_h, - old_file_h->e_phnum * old_file_h->e_phentsize); - - /* Modify the e_shstrndx if necessary. */ - PATCH_INDEX (new_file_h->e_shstrndx); /* Fix up file header. We'll add one section. Section header is further away now. */ @@ -833,6 +824,16 @@ unexec (const char *new_name, const char *old_name) new_file_h->e_shoff += new_data2_incr; new_file_h->e_shnum += 1; + /* Modify the e_shstrndx if necessary. */ + PATCH_INDEX (new_file_h->e_shstrndx); + + new_program_h = (ElfW (Phdr) *) ((byte *) new_base + old_file_h->e_phoff); + new_section_h = (ElfW (Shdr) *) + ((byte *) new_base + old_file_h->e_shoff + new_data2_incr); + + memcpy (new_program_h, old_program_h, + old_file_h->e_phnum * old_file_h->e_phentsize); + #ifdef UNEXELF_DEBUG DEBUG_LOG (old_file_h->e_shoff); fprintf (stderr, "Old section count %td\n", (ptrdiff_t) old_file_h->e_shnum); @@ -905,32 +906,35 @@ unexec (const char *new_name, const char *old_name) for (n = 1, nn = 1; n < old_file_h->e_shnum; n++, nn++) { caddr_t src; + ElfW (Shdr) *old_shdr = &OLD_SECTION_H (n); + ElfW (Shdr) *new_shdr = &NEW_SECTION_H (nn); + /* If it is (s)bss section, insert the new data2 section before it. */ /* new_data2_index is the index of either old_sbss or old_bss, that was chosen as a section for new_data2. */ if (n == new_data2_index) { /* Steal the data section header for this data2 section. */ - memcpy (&NEW_SECTION_H (nn), &OLD_SECTION_H (old_data_index), + memcpy (new_shdr, &OLD_SECTION_H (old_data_index), new_file_h->e_shentsize); - NEW_SECTION_H (nn).sh_addr = new_data2_addr; - NEW_SECTION_H (nn).sh_offset = new_data2_offset; - NEW_SECTION_H (nn).sh_size = new_data2_size; + new_shdr->sh_addr = new_data2_addr; + new_shdr->sh_offset = new_data2_offset; + new_shdr->sh_size = new_data2_size; /* Use the bss section's alignment. This will assure that the new data2 section always be placed in the same spot as the old bss section by any other application. */ - NEW_SECTION_H (nn).sh_addralign = OLD_SECTION_H (n).sh_addralign; + new_shdr->sh_addralign = old_shdr->sh_addralign; /* Now copy over what we have in the memory now. */ - memcpy (NEW_SECTION_H (nn).sh_offset + new_base, - (caddr_t) OLD_SECTION_H (n).sh_addr, + memcpy (new_shdr->sh_offset + new_base, + (caddr_t) old_shdr->sh_addr, new_data2_size); nn++; + new_shdr++; } - memcpy (&NEW_SECTION_H (nn), &OLD_SECTION_H (n), - old_file_h->e_shentsize); + memcpy (new_shdr, old_shdr, old_file_h->e_shentsize); if (n == old_bss_index /* The new bss and sbss section's size is zero, and its file offset @@ -939,13 +943,13 @@ unexec (const char *new_name, const char *old_name) ) { /* NN should be `old_s?bss_index + 1' at this point. */ - NEW_SECTION_H (nn).sh_offset = new_data2_offset + new_data2_size; - NEW_SECTION_H (nn).sh_addr = new_data2_addr + new_data2_size; + new_shdr->sh_offset = new_data2_offset + new_data2_size; + new_shdr->sh_addr = new_data2_addr + new_data2_size; /* Let the new bss section address alignment be the same as the section address alignment followed the old bss section, so this section will be placed in exactly the same place. */ - NEW_SECTION_H (nn).sh_addralign = OLD_SECTION_H (nn).sh_addralign; - NEW_SECTION_H (nn).sh_size = 0; + new_shdr->sh_addralign = OLD_SECTION_H (nn).sh_addralign; + new_shdr->sh_size = 0; } else { @@ -975,53 +979,50 @@ temacs: 25 1709 0x4 0x10 */ - if (NEW_SECTION_H (nn).sh_offset >= old_bss_offset - || (NEW_SECTION_H (nn).sh_offset + NEW_SECTION_H (nn).sh_size + if (new_shdr->sh_offset >= old_bss_offset + || (new_shdr->sh_offset + new_shdr->sh_size > new_data2_offset)) - NEW_SECTION_H (nn).sh_offset += new_data2_incr; + new_shdr->sh_offset += new_data2_incr; /* Any section that was originally placed after the section header table should now be off by the size of one section header table entry. */ - if (NEW_SECTION_H (nn).sh_offset > new_file_h->e_shoff) - NEW_SECTION_H (nn).sh_offset += new_file_h->e_shentsize; + if (new_shdr->sh_offset > new_file_h->e_shoff) + new_shdr->sh_offset += new_file_h->e_shentsize; } /* If any section hdr refers to the section after the new .data section, make it refer to next one because we have inserted a new section in between. */ - PATCH_INDEX (NEW_SECTION_H (nn).sh_link); + PATCH_INDEX (new_shdr->sh_link); /* For symbol tables, info is a symbol table index, so don't change it. */ - if (NEW_SECTION_H (nn).sh_type != SHT_SYMTAB - && NEW_SECTION_H (nn).sh_type != SHT_DYNSYM) - PATCH_INDEX (NEW_SECTION_H (nn).sh_info); + if (new_shdr->sh_type != SHT_SYMTAB + && new_shdr->sh_type != SHT_DYNSYM) + PATCH_INDEX (new_shdr->sh_info); if (old_sbss_index != -1) - if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".sbss")) + if (!strcmp (old_section_names + new_shdr->sh_name, ".sbss")) { - NEW_SECTION_H (nn).sh_offset = - round_up (NEW_SECTION_H (nn).sh_offset, - NEW_SECTION_H (nn).sh_addralign); - NEW_SECTION_H (nn).sh_type = SHT_PROGBITS; + new_shdr->sh_offset = + round_up (new_shdr->sh_offset, + new_shdr->sh_addralign); + new_shdr->sh_type = SHT_PROGBITS; } /* Now, start to copy the content of sections. */ - if (NEW_SECTION_H (nn).sh_type == SHT_NULL - || NEW_SECTION_H (nn).sh_type == SHT_NOBITS) + if (new_shdr->sh_type == SHT_NULL + || new_shdr->sh_type == SHT_NOBITS) continue; /* Write out the sections. .data and .data1 (and data2, called ".data" in the strings table) get copied from the current process instead of the old file. */ - if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".data") - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".sdata") - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".lit4") - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".lit8") + if (!strcmp (old_section_names + new_shdr->sh_name, ".data") + || !strcmp (old_section_names + new_shdr->sh_name, ".sdata") + || !strcmp (old_section_names + new_shdr->sh_name, ".lit4") + || !strcmp (old_section_names + new_shdr->sh_name, ".lit8") /* The conditional bit below was in Oliva's original code (1999-08-25) and seems to have been dropped by mistake subsequently. It prevents a crash at startup under X in @@ -1043,28 +1044,22 @@ temacs: loader, but I never got anywhere with an SGI support call seeking clues. -- fx 2002-11-29. */ #ifdef IRIX6_5 - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".got") + || !strcmp (old_section_names + new_shdr->sh_name, ".got") #endif - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".sdata1") - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".data1") - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".sbss")) - src = (caddr_t) OLD_SECTION_H (n).sh_addr; + || !strcmp (old_section_names + new_shdr->sh_name, ".sdata1") + || !strcmp (old_section_names + new_shdr->sh_name, ".data1") + || !strcmp (old_section_names + new_shdr->sh_name, ".sbss")) + src = (caddr_t) old_shdr->sh_addr; else - src = old_base + OLD_SECTION_H (n).sh_offset; + src = old_base + old_shdr->sh_offset; - memcpy (NEW_SECTION_H (nn).sh_offset + new_base, src, - NEW_SECTION_H (nn).sh_size); + memcpy (new_shdr->sh_offset + new_base, src, new_shdr->sh_size); #if defined __alpha__ && !defined __OpenBSD__ /* Update Alpha COFF symbol table: */ - if (strcmp (old_section_names + OLD_SECTION_H (n).sh_name, ".mdebug") - == 0) + if (strcmp (old_section_names + old_shdr->sh_name, ".mdebug") == 0) { - pHDRR symhdr = (pHDRR) (NEW_SECTION_H (nn).sh_offset + new_base); + pHDRR symhdr = (pHDRR) (new_shdr->sh_offset + new_base); symhdr->cbLineOffset += new_data2_size; symhdr->cbDnOffset += new_data2_size; @@ -1081,13 +1076,13 @@ temacs: #endif /* __alpha__ && !__OpenBSD__ */ #if defined (_SYSTYPE_SYSV) - if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG + if (new_shdr->sh_type == SHT_MIPS_DEBUG && old_mdebug_index != -1) { - ptrdiff_t new_offset = NEW_SECTION_H (nn).sh_offset; + ptrdiff_t new_offset = new_shdr->sh_offset; ptrdiff_t old_offset = OLD_SECTION_H (old_mdebug_index).sh_offset; ptrdiff_t diff = new_offset - old_offset; - HDRR *phdr = (HDRR *)(NEW_SECTION_H (nn).sh_offset + new_base); + HDRR *phdr = (HDRR *) (new_shdr->sh_offset + new_base); if (diff) { @@ -1123,8 +1118,8 @@ temacs: n_phdrr->__fileaddr += movement; \ } - HDRR * o_phdrr = (HDRR *)((byte *)old_base + OLD_SECTION_H (n).sh_offset); - HDRR * n_phdrr = (HDRR *)((byte *)new_base + NEW_SECTION_H (nn).sh_offset); + HDRR *o_phdrr = (HDRR *) ((byte *) old_base + old_shdr->sh_offset); + HDRR *n_phdrr = (HDRR *) ((byte *) new_base + new_shdr->sh_offset); unsigned movement = new_data2_size; MDEBUGADJUST (idnMax, cbDnOffset); @@ -1141,8 +1136,8 @@ temacs: requires special handling. */ if (n_phdrr->cbLine > 0) { - if (o_phdrr->cbLineOffset > (OLD_SECTION_H (n).sh_offset - + OLD_SECTION_H (n).sh_size)) + if (o_phdrr->cbLineOffset > (old_shdr->sh_offset + + old_shdr->sh_size)) { /* line data is in a hole in elf. do special copy and adjust for this ld mistake. @@ -1162,13 +1157,11 @@ temacs: #endif /* __sgi */ /* If it is the symbol table, its st_shndx field needs to be patched. */ - if (NEW_SECTION_H (nn).sh_type == SHT_SYMTAB - || NEW_SECTION_H (nn).sh_type == SHT_DYNSYM) + if (new_shdr->sh_type == SHT_SYMTAB + || new_shdr->sh_type == SHT_DYNSYM) { - ElfW (Shdr) *spt = &NEW_SECTION_H (nn); - ptrdiff_t num = spt->sh_size / spt->sh_entsize; - ElfW (Sym) * sym = (ElfW (Sym) *) (NEW_SECTION_H (nn).sh_offset + - new_base); + ptrdiff_t num = new_shdr->sh_size / new_shdr->sh_entsize; + ElfW (Sym) *sym = (ElfW (Sym) *) (new_shdr->sh_offset + new_base); for (; num--; sym++) { if ((sym->st_shndx == SHN_UNDEF) @@ -1186,15 +1179,16 @@ temacs: { byte *symnames; ElfW (Sym) *symp, *symendp; + ElfW (Shdr) *sym_shdr = &NEW_SECTION_H (n); - if (NEW_SECTION_H (n).sh_type != SHT_DYNSYM - && NEW_SECTION_H (n).sh_type != SHT_SYMTAB) + if (sym_shdr->sh_type != SHT_DYNSYM + && sym_shdr->sh_type != SHT_SYMTAB) continue; symnames = ((byte *) new_base - + NEW_SECTION_H (NEW_SECTION_H (n).sh_link).sh_offset); - symp = (ElfW (Sym) *) (NEW_SECTION_H (n).sh_offset + new_base); - symendp = (ElfW (Sym) *) ((byte *)symp + NEW_SECTION_H (n).sh_size); + + NEW_SECTION_H (sym_shdr->sh_link).sh_offset); + symp = (ElfW (Sym) *) (sym_shdr->sh_offset + new_base); + symendp = (ElfW (Sym) *) ((byte *) symp + sym_shdr->sh_size); for (; symp < symendp; symp ++) { @@ -1218,22 +1212,21 @@ temacs: if (strncmp ((char *) (symnames + symp->st_name), "_OBJC_", sizeof ("_OBJC_") - 1) == 0) { - caddr_t old, new; + ElfW (Shdr) *new_shdr = &NEW_SECTION_H (symp->st_shndx); + ptrdiff_t reladdr = symp->st_value - new_shdr->sh_addr; + ptrdiff_t newoff = reladdr + new_shdr->sh_offset; - new = ((symp->st_value - NEW_SECTION_H (symp->st_shndx).sh_addr) - + NEW_SECTION_H (symp->st_shndx).sh_offset + new_base); /* "Unpatch" index. */ nn = symp->st_shndx; if (nn > old_bss_index) nn--; if (nn == old_bss_index) - memset (new, 0, symp->st_size); + memset (new_base + newoff, 0, symp->st_size); else { - old = ((symp->st_value - - NEW_SECTION_H (symp->st_shndx).sh_addr) - + OLD_SECTION_H (nn).sh_offset + old_base); - memcpy (new, old, symp->st_size); + ElfW (Shdr) *old_shdr = &OLD_SECTION_H (nn); + ptrdiff_t oldoff = reladdr + old_shdr->sh_offset; + memcpy (new_base + newoff, old_base + oldoff, symp->st_size); } } #endif @@ -1244,13 +1237,10 @@ temacs: that it can undo relocations performed by the runtime linker. */ for (n = new_file_h->e_shnum; 0 < --n; ) { - ElfW (Shdr) section = NEW_SECTION_H (n); - - /* Cause a compilation error if anyone uses n instead of nn below. */ - #define n ((void) 0); - n /* Prevent 'macro "n" is not used' warnings. */ + ElfW (Shdr) *rel_shdr = &NEW_SECTION_H (n); + ElfW (Shdr) *shdr; - switch (section.sh_type) + switch (rel_shdr->sh_type) { default: break; @@ -1259,28 +1249,22 @@ temacs: /* This code handles two different size structs, but there should be no harm in that provided that r_offset is always the first member. */ - nn = section.sh_info; - if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".data") - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".sdata") - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".lit4") - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".lit8") + shdr = &NEW_SECTION_H (rel_shdr->sh_info); + if (!strcmp (old_section_names + shdr->sh_name, ".data") + || !strcmp (old_section_names + shdr->sh_name, ".sdata") + || !strcmp (old_section_names + shdr->sh_name, ".lit4") + || !strcmp (old_section_names + shdr->sh_name, ".lit8") #ifdef IRIX6_5 /* see above */ - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".got") + || !strcmp (old_section_names + shdr->sh_name, ".got") #endif - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".sdata1") - || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), - ".data1")) + || !strcmp (old_section_names + shdr->sh_name, ".sdata1") + || !strcmp (old_section_names + shdr->sh_name, ".data1")) { - ElfW (Addr) offset = (NEW_SECTION_H (nn).sh_addr - - NEW_SECTION_H (nn).sh_offset); - caddr_t reloc = old_base + section.sh_offset, end; - for (end = reloc + section.sh_size; reloc < end; - reloc += section.sh_entsize) + ElfW (Addr) offset = shdr->sh_addr - shdr->sh_offset; + caddr_t reloc = old_base + rel_shdr->sh_offset, end; + for (end = reloc + rel_shdr->sh_size; + reloc < end; + reloc += rel_shdr->sh_entsize) { ElfW (Addr) addr = ((ElfW (Rel) *) reloc)->r_offset - offset; #ifdef __alpha__ @@ -1295,8 +1279,6 @@ temacs: } break; } - - #undef n } /* Write out new_file, and free the buffers. */ commit 0bcd08ef052bca9b8d08696068c2a0c387d0dd56 Author: Alan Modra Date: Sun Nov 8 09:28:59 2015 -0800 ELF unexec: Correct section header index First a small fix. The code incorrectly uses "NEW_SECTION_H (n)" when it should have been using "NEW_SECTION_H (nn)" to find the name of the section currently being processed. Of course, before the bss sections, n and nn have the same value, so this doesn't matter except in the case of .sbss. For .sbss this probably meant .bss (most likely the next section) was copied from memory. A later patch removes the bogus .sbss handling anyway. * unexelf.c (unexec): Use correct index to look up names. diff --git a/src/unexelf.c b/src/unexelf.c index 483da6e..1699f31 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -1015,12 +1015,12 @@ temacs: /* Write out the sections. .data and .data1 (and data2, called ".data" in the strings table) get copied from the current process instead of the old file. */ - if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data") - || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".data") + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), ".sdata") - || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), ".lit4") - || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), ".lit8") /* The conditional bit below was in Oliva's original code (1999-08-25) and seems to have been dropped by mistake @@ -1043,14 +1043,14 @@ temacs: loader, but I never got anywhere with an SGI support call seeking clues. -- fx 2002-11-29. */ #ifdef IRIX6_5 - || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), ".got") #endif - || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), ".sdata1") - || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), ".data1") - || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), + || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), ".sbss")) src = (caddr_t) OLD_SECTION_H (n).sh_addr; else commit 82c1b368a227ca710e3582be311f2cbabc33499f Author: Michael Albinus Date: Sun Nov 8 15:22:09 2015 +0100 Fix Bug#21841 * lisp/filenotify.el (file-notify--rm-descriptor): Use `descriptor' instead of computing its value. (file-notify--descriptor): Additional argument FILE. Adapt all callees. (file-notify-rm-watch): Use `descriptor' when calling file name handler. (Bug#21841) diff --git a/lisp/filenotify.el b/lisp/filenotify.el index 132f164..4c5d43f 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -62,7 +62,7 @@ WHAT is a file or directory name to be removed, needed just for `inotify'." ;; Send `stopped' event. (dolist (entry (cdr registered)) (funcall (cdr entry) - `(,(file-notify--descriptor desc) stopped + `(,descriptor stopped ,(or (and (stringp (car entry)) (expand-file-name (car entry) dir)) dir)))) @@ -123,14 +123,17 @@ This is available in case a file has been moved." ;; `inotify' returns the same descriptor when the file (directory) ;; uses the same inode. We want to distinguish, and apply a virtual ;; descriptor which make the difference. -(defun file-notify--descriptor (descriptor) +(defun file-notify--descriptor (desc file) "Return the descriptor to be used in `file-notify-*-watch'. For `gfilenotify' and `w32notify' it is the same descriptor as used in the low-level file notification package." - (if (and (natnump descriptor) (eq file-notify--library 'inotify)) - (cons descriptor - (car (cadr (gethash descriptor file-notify-descriptors)))) - descriptor)) + (if (and (natnump desc) (eq file-notify--library 'inotify)) + (cons desc + (and (stringp file) + (car (assoc + (file-name-nondirectory file) + (gethash desc file-notify-descriptors))))) + desc)) ;; The callback function used to map between specific flags of the ;; respective file notifications, and the ones we return. @@ -210,9 +213,11 @@ EVENT is the cadr of the event in `file-notify-handle-event' (car file-notify--pending-event))) ;; If the source is handled by another watch, we ;; must fire the rename event there as well. - (when (not (equal (file-notify--descriptor desc) + (when (not (equal (file-notify--descriptor desc file1) (file-notify--descriptor - (caar file-notify--pending-event)))) + (caar file-notify--pending-event) + (file-notify--event-file-name + file-notify--pending-event)))) (setq pending-event `((,(caar file-notify--pending-event) renamed ,file ,file1) @@ -223,7 +228,10 @@ EVENT is the cadr of the event in `file-notify-handle-event' ;; Apply pending callback. (when pending-event (setcar - (car pending-event) (file-notify--descriptor (caar pending-event))) + (car pending-event) + (file-notify--descriptor + (caar pending-event) + (file-notify--event-file-name file-notify--pending-event))) (funcall (cadr pending-event) (car pending-event)) (setq pending-event nil)) @@ -257,14 +265,15 @@ EVENT is the cadr of the event in `file-notify-handle-event' (if file1 (funcall callback - `(,(file-notify--descriptor desc) ,action ,file ,file1)) + `(,(file-notify--descriptor desc file) ,action ,file ,file1)) (funcall callback - `(,(file-notify--descriptor desc) ,action ,file))))) + `(,(file-notify--descriptor desc file) ,action ,file))))) ;; Modify `file-notify-descriptors'. (when stopped - (file-notify--rm-descriptor (file-notify--descriptor desc) file))))) + (file-notify--rm-descriptor + (file-notify--descriptor desc file) file))))) ;; `gfilenotify' and `w32notify' return a unique descriptor for every ;; `file-notify-add-watch', while `inotify' returns a unique @@ -375,7 +384,8 @@ FILE is the name of the file whose event is being reported." file-notify-descriptors) ;; Return descriptor. - (file-notify--descriptor desc))) + (file-notify--descriptor + desc (unless (file-directory-p file) (file-name-nondirectory file))))) (defun file-notify-rm-watch (descriptor) "Remove an existing watch specified by its DESCRIPTOR. @@ -396,7 +406,7 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'." (if handler ;; A file name handler could exist even if there is no local ;; file notification support. - (funcall handler 'file-notify-rm-watch desc) + (funcall handler 'file-notify-rm-watch descriptor) (funcall (cond commit cad0490b013ebcad4711b36e37a3bc198d8f9d1e Author: Dmitry Gutov Date: Sun Nov 8 14:46:22 2015 +0200 Remove dirs in vc project roots from the the vc project library roots * lisp/progmodes/project.el (project-library-roots): Remove directories inside the project roots from the result. (http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00536.html) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index d177779..9cdeb39 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -140,12 +140,15 @@ The file names can be absolute, or relative to the project root." (list (cdr project))) (cl-defmethod project-library-roots ((project (head vc))) - (append - (let ((root (cdr project))) - (mapcar - (lambda (dir) (file-name-as-directory (expand-file-name dir root))) - (project--value-in-dir 'project-vc-library-roots root))) - (cl-call-next-method))) + (project-subtract-directories + (project-combine-directories + (append + (let ((root (cdr project))) + (mapcar + (lambda (dir) (file-name-as-directory (expand-file-name dir root))) + (project--value-in-dir 'project-vc-library-roots root))) + (funcall project-library-roots-function))) + (project-roots project))) (cl-defmethod project-ignores ((project (head vc)) dir) (let* ((root (cdr project)) commit aeae5875f967fb3303e6a180497e9573de1c2966 Author: Dmitry Gutov Date: Sun Nov 8 14:20:26 2015 +0200 ; project-library-roots: Update docstring diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index f67a584..d177779 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -74,10 +74,10 @@ implementation of `project-library-roots'.") ;; FIXME: Add MODE argument, like in `ede-source-paths'? (cl-defgeneric project-library-roots (project) - "Return the list of source root directories. + "Return the list of library roots for PROJECT. -It's the list of directories outside of the current project that -contain related source files. +It's the list of directories outside of the project that contain +related source files. Project-specific version of `project-library-roots-function', which see. Unless it knows better, a specialized implementation commit d5f110e369bce08ea23b60225f0c9534af2f6c4b Author: Glenn Morris Date: Sun Nov 8 06:23:33 2015 -0500 ; Auto-commit of ChangeLog files. diff --git a/ChangeLog.2 b/ChangeLog.2 index 0d0d5ab..3668959 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,3 +1,373 @@ +2015-11-08 Paul Eggert + + Prefer xpalloc to doubling buffers by hand + + * src/lread.c (grow_read_buffer): New function, which uses xpalloc. + (read1): Use it for simplicity. + * src/macros.c (store_kbd_macro_char): + * src/minibuf.c (read_minibuf_noninteractive): + * src/term.c (encode_terminal_code): + * src/xrdb.c (magic_db): + Prefer xpalloc to growing buffers by hand. + This doesn’t fix any bugs, but simplifies the code a bit. + +2015-11-08 Paul Eggert + + Merge from gnulib + + This incorporates: + 2015-11-05 timespec-sub: fix overflow bug; add tests + 2015-11-04 intprops: revise _WRAPV macros, revert _OVERFLOW + 2015-11-03 intprops: add parentheses + * lib/intprops.h, lib/timespec-add.c, lib/timespec-sub.c: + Copy from gnulib. + +2015-11-07 Eli Zaretskii + + ;* test/automated/abbrev-tests.el: Fix a typo in a comment + +2015-11-07 David Reitter + + Provide NS notification objects where required to eliminate warnings + + * nsterm.m (windowDidResize:, toggleFullScreen:): + Call notification functions with notification objects + as per delegate APIs. + +2015-11-07 Noam Postavsky + + Add test for bug #21824 + + * test/automated/buffer-tests.el: New file. + (overlay-modification-hooks-message-other-buf): New test. + +2015-11-07 Kelvin White + + erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771 + +2015-11-07 l3thal + + erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771 + +2015-11-07 David Reitter + + Ignore fullscreen exit notifications on NS when frame is dead + + * nsterm.m (windowDidResize:,windowWillExitFullScreen:) + (windowDidExitFullScreen:): Return if frame is dead. + These functions may be called when a fullscreen frame + is closed; they are called before, not after. + + May address Bug#21428. + +2015-11-07 Eli Zaretskii + + Speed up lookup in redisplay--variables + + * lisp/frame.el (redisplay--variables): Make it a hash-table. + + * src/xdisp.c (maybe_set_redisplay): Access redisplay--variables + as a hash-table. This speeds up this function by an order of + magnitude: where previously a setq was slowed down by 100% by + introducing the maybe_set_redisplay test, it is now only 5% + slower. + (syms_of_xdisp) : Doc fix. + +2015-11-07 Artur Malabarba + + * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix a bug + + The defsubst was being created as: + (cl-defsubst name (args) ("DOC") ...) + + * test/automated/cl-lib-tests.el (cl-lib-struct-constructors): Add test + +2015-11-07 Mihai Olteanu (tiny change) + + Update doc string of hexl-mode + + * lisp/hexl.el (hexl-mode): Doc fix. (Bug#21800) + +2015-11-07 Eli Zaretskii + + Fix error in copy-abbrev-table + + * lisp/abbrev.el (define-abbrev): Don't erase the :abbrev-table-modiff + property of the abbrev-table. (Bug#21828) + + * test/automated/abbrev-tests.el: New file. + +2015-11-07 Michael Albinus + + Add test to auto-revert-tests.el for Bug#21841 + + * test/automated/auto-revert-tests.el + (auto-revert-test01-auto-revert-several-files): New test. + (auto-revert-test02-auto-revert-tail-mode) + (auto-revert-test03-auto-revert-mode-dired): Rename them. + +2015-11-07 Martin Rudalics + + * doc/lispref/windows.texi (Coordinates and Windows): Fix typo. + +2015-11-07 Martin Rudalics + + In x_consider_frame_title don't set title of tooltip frames + + * src/xdisp.c (x_consider_frame_title): Return immediately for + tooltip frames to avoid displaying empty tooltips. + +2015-11-06 Anders Lindgren + + Fixed NextStep fullscreen problem (bug#21770). + + * nsterm.m (ns_constrain_all_frames): Don't constrain fullscreen + frames. + +2015-11-06 Eli Zaretskii + + Ensure redisplay after evaluation + + * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Revert + last change. + * lisp/frame.el (redisplay--variables): Populate the + redisplay--variables list. + * src/xdisp.c (maybe_set_redisplay): New function. + (syms_of_xdisp) : New variable. + * src/window.h (maybe_set_redisplay): Declare prototype. + * src/data.c (set_internal): Call maybe_set_redisplay. (Bug#21835) + +2015-11-06 Artur Malabarba + + * test/automated/subr-tests.el (subr-test-when): Fix again + +2015-11-06 Eli Zaretskii + + Don't invoke overlay modification hooks in wrong buffer + + * src/buffer.c (report_overlay_modification): When called with + AFTER non-zero, don't invoke overlay modification hooks if the + buffer recorded in last_overlay_modification_hooks is different + from the current buffer. (Bug#21824) + +2015-11-06 Juanma Barranquero + + * admin/notes/repo: Fix a few obsolete references to Bazaar + +2015-11-06 Artur Malabarba + + * test/automated/subr-tests.el (subr-test-when): Fix test + +2015-11-06 Martin Rudalics + + Avoid division by zero crash observed by Yuan MEI. + + See http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html. + + * src/dispnew.c (required_matrix_height, required_matrix_width): + Avoid division by zero. + * src/xterm.c (x_term_init): Init dpyinfo->smallest_font_height and + dpyinfo->smallest_char_width to 1. + +2015-11-06 Eli Zaretskii + + Ensure redisplay after "C-x C-e" + + * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Make sure + redisplay happens to account for any side effects of the evaluated + sexp. (Bug#21835) + +2015-11-06 Michael Albinus + + Skip some file notification tests for cygwin + + * test/automated/file-notify-tests.el (file-notify--test-with-events): + Remove argument TIMEOUT. Adapt all callees. + (file-notify-test02-events, file-notify-test04-file-validity): + Skip for cygwin. (Bug#21804) + +2015-11-05 Stephen Leake + + * lisp/progmodes/xref.el: require semantic/symref during compilation. + +2015-11-05 Daiki Ueno + + Suppress redundant Pinentry startup messages + + * lisp/net/pinentry.el (pinentry-start): Add optional QUIET + argument. + * lisp/epg.el: Declare `pinentry-start'. + (epg--start): Call `pinentry-start' with QUIET argument set. + +2015-11-05 Xue Fuqiao + + * doc/emacs/ack.texi (Acknowledgments): Updates. + +2015-11-05 Juanma Barranquero + + * test/automated/elisp-mode-test.el: Silence some run-time warnings + + (xref-elisp-deftest): Bind `find-file-suppress-same-file-warnings' to t. + +2015-11-05 Tassilo Horn + + Add prettify symbol for \times + + * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add + prettification support for \times. + +2015-11-05 Juanma Barranquero + + * test/automated/process-tests.el: Skip tests when bash is not available + + (process-test-sentinel-accept-process-output) + (process-test-sentinel-sit-for): skip-unless bash executable found. + +2015-11-05 Eli Zaretskii + + Add test for bug #21831 + + * test/automated/process-tests.el + (start-process-should-not-modify-arguments): New test. (Bug#21831) + Suggested by Nicolas Richard + +2015-11-04 Stefan Monnier + + * lisp/emacs-lisp/eieio-compat.el: Typo caught by tests + + (eieio--generic-static-object-generalizer): Fix typo. + * test/automated/eieio-tests.el: Byte-compile it again. + It looks like the underlying cause of bug#17852 was fixed in the mean time. + +2015-11-04 Artur Malabarba + + Revert "* lisp/subr.el (when): Use `macroexp-progn'" + + This reverts commit 8e843831eaf271801836b7a3e4dd3b4fb0bb72b8. + It breaks bootstrapping (duh). + +2015-11-04 Artur Malabarba + + * lisp/files.el (report-errors): Obsolete + + (normal-mode, hack-local-variables, dir-locals-find-file): Use + `with-demoted-errors' instead. + +2015-11-04 Artur Malabarba + + * lisp/subr.el (when): Use `macroexp-progn' + + * test/automated/subr-tests.el (subr-test-when): New test + +2015-11-04 Juanma Barranquero + + * lisp/progmodes/xref.el: Doc fixes + + (xref-make-file-location, xref-make-buffer-location, xref-make) + (xref-make-bogus-location, xref-make-match): Add cross-references. + (xref--insert-xrefs): Fix typo in docstring. + +2015-11-04 Anders Lindgren + + Render fringe bitmaps correctly on NextStep (bug#21301). + + The fringe bitmaps were inverted, the background was not transparent, + the image data was horizontally mirrored, and periodic fringe bitmaps + were not supported. + + * nsimage.m ([EmacsImage initFromXBM:width:height:fg:bg:]): When + both background and foreground colors are 0, set the background + alpha channel to 0 (making the background transparent). When + copying the image data, do this from the most significant bit + (leftmost) to the least (rightmost), to avoid mirroring. + * nsterm.m (ns_draw_fringe_bitmap): Don't invert the image bits. Add + support for periodic images (e.g. the empty line indicator). + +2015-11-03 Michael Heerdegen + + * lisp/emacs-lisp/pcase.el (pcase): Tweak docstring. + +2015-11-03 Nicolas Petton + + * admin/MAINTAINERS: Add seq-tests.el, map-tests.el, and thunk-tests.el. + + * admin/MAINTAINERS: Add thunk.el. + +2015-11-03 Jay Belanger + + Change maintainer address. + + * lisp/calc/calc (calc-bug-address): Change address. + +2015-11-03 Michael Albinus + + Fix a stupid error in gfilenotify.c. + + * src/gfilenotify.c (dir_monitor_callback): Cancel monitor only, + if we've got a `deleted' signal AND the file name is the watched one. + +2015-11-03 Stephen Leake + + Fix Bug#21816; case insensitive file system in elisp-mode-tests.el + + * test/automated/elisp-mode-tests.el (xref-elisp-test-run): Use + case-insensitive string compare for file names. + (emacs-test-dir): Add 'downcase' to cause case differences (at least on + my system). + +2015-11-03 Jackson Ray Hamilton + + Fix ChangeLog.2 entry for js-jsx-mode + +2015-11-02 Juanma Barranquero + + flymake-tests.el (warning-predicate-rx-gcc): Fix check. + + * test/automated/flymake-tests.el (warning-predicate-rx-gcc): + Also check that "make" is available, not just "gcc". + +2015-11-02 Ken Brown + + Document behavior of collation on Cygwin + + * test/automated/fns-tests.el (fns-tests-collate-sort): Mark as + expected failure on Cygwin. + * doc/lispref/strings.texi (Text Comparison): Document that + punctuation and whitespace are not ignored for sorting on Cygwin. + +2015-11-02 Dani Moncayo + + * build-aux/msys-to-w32: Prevent double slashes in w32 path list. + +2015-11-01 Glenn Morris + + * lisp/progmodes/f90.el (f90-no-block-limit): + + Add associate. (Bug#21794) + * test/automated/f90.el (f90-test-bug21794): New test. + +2015-11-01 Juanma Barranquero + + Fix incompatibility with TCC in test for bug#18745 + + * test/automated/process-tests.el (process-test-quoted-batfile): + Remove spaces unrelated to the bug being tested. + +2015-11-01 Michael Albinus + + Improve completion in tramp-gvfs.el + + * lisp/net/tramp-gvfs.el (tramp-zeroconf-parse-device-names): + Renamed from `tramp-zeroconf-parse-service-device-names'. + (tramp-zeroconf-parse-webdav-device-names): Removed. Code merged + with `tramp-zeroconf-parse-device-names'. + (tramp-gvfs-parse-device-names): New defun. + (top): Use it when `tramp-zeroconf-parse-device-names' is not + applicable. + + * lisp/net/tramp.el (tramp-set-completion-function): The argument + could also be a zeroconf service type. + 2015-10-31 Thomas Fitzsimmons Change version of ntlm.el to 2.0.0 @@ -17618,7 +17988,7 @@ This file records repository revisions from commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to -commit cb56d4cec80a4da41710e2fa68dcd3d95e2a8e4c (inclusive). +commit 8a8613bcf4227dfe46a694b761e9575bdf6ca2ce (inclusive). See ChangeLog.1 for earlier changes. ;; Local Variables: commit 8a8613bcf4227dfe46a694b761e9575bdf6ca2ce Author: Paul Eggert Date: Sat Nov 7 23:52:17 2015 -0800 Prefer xpalloc to doubling buffers by hand * src/lread.c (grow_read_buffer): New function, which uses xpalloc. (read1): Use it for simplicity. * src/macros.c (store_kbd_macro_char): * src/minibuf.c (read_minibuf_noninteractive): * src/term.c (encode_terminal_code): * src/xrdb.c (magic_db): Prefer xpalloc to growing buffers by hand. This doesn’t fix any bugs, but simplifies the code a bit. diff --git a/src/lread.c b/src/lread.c index 7c891f9..c4456f3 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2120,6 +2120,15 @@ read0 (Lisp_Object readcharfun) static ptrdiff_t read_buffer_size; static char *read_buffer; +/* Grow the read buffer by at least MAX_MULTIBYTE_LENGTH bytes. */ + +static void +grow_read_buffer (void) +{ + read_buffer = xpalloc (read_buffer, &read_buffer_size, + MAX_MULTIBYTE_LENGTH, -1, 1); +} + /* Read a \-escape sequence, assuming we already read the `\'. If the escape sequence forces unibyte, return eight-bit char. */ @@ -2985,10 +2994,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) if (end - p < MAX_MULTIBYTE_LENGTH) { ptrdiff_t offset = p - read_buffer; - if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size) - memory_full (SIZE_MAX); - read_buffer = xrealloc (read_buffer, read_buffer_size * 2); - read_buffer_size *= 2; + grow_read_buffer (); p = read_buffer + offset; end = read_buffer + read_buffer_size; } @@ -3119,10 +3125,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) if (end - p < MAX_MULTIBYTE_LENGTH) { ptrdiff_t offset = p - read_buffer; - if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size) - memory_full (SIZE_MAX); - read_buffer = xrealloc (read_buffer, read_buffer_size * 2); - read_buffer_size *= 2; + grow_read_buffer (); p = read_buffer + offset; end = read_buffer + read_buffer_size; } @@ -3149,10 +3152,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) if (p == end) { ptrdiff_t offset = p - read_buffer; - if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size) - memory_full (SIZE_MAX); - read_buffer = xrealloc (read_buffer, read_buffer_size * 2); - read_buffer_size *= 2; + grow_read_buffer (); p = read_buffer + offset; end = read_buffer + read_buffer_size; } diff --git a/src/macros.c b/src/macros.c index d963838..7c6ab2e 100644 --- a/src/macros.c +++ b/src/macros.c @@ -184,16 +184,11 @@ store_kbd_macro_char (Lisp_Object c) { if (kb->kbd_macro_ptr - kb->kbd_macro_buffer == kb->kbd_macro_bufsize) { - ptrdiff_t ptr_offset, end_offset, nbytes; - - ptr_offset = kb->kbd_macro_ptr - kb->kbd_macro_buffer; - end_offset = kb->kbd_macro_end - kb->kbd_macro_buffer; - if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *kb->kbd_macro_buffer / 2 - < kb->kbd_macro_bufsize) - memory_full (SIZE_MAX); - nbytes = kb->kbd_macro_bufsize * (2 * sizeof *kb->kbd_macro_buffer); - kb->kbd_macro_buffer = xrealloc (kb->kbd_macro_buffer, nbytes); - kb->kbd_macro_bufsize *= 2; + ptrdiff_t ptr_offset = kb->kbd_macro_ptr - kb->kbd_macro_buffer; + ptrdiff_t end_offset = kb->kbd_macro_end - kb->kbd_macro_buffer; + kb->kbd_macro_buffer = xpalloc (kb->kbd_macro_buffer, + &kb->kbd_macro_bufsize, + 1, -1, sizeof *kb->kbd_macro_buffer); kb->kbd_macro_ptr = kb->kbd_macro_buffer + ptr_offset; kb->kbd_macro_end = kb->kbd_macro_buffer + end_offset; } diff --git a/src/minibuf.c b/src/minibuf.c index 31b6946..727a70b 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -229,12 +229,7 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial, if (hide_char) fprintf (stdout, "%c", hide_char); if (len == size) - { - if (STRING_BYTES_BOUND / 2 < size) - memory_full (SIZE_MAX); - size *= 2; - line = xrealloc (line, size); - } + line = xpalloc (line, &size, 1, -1, sizeof *line); line[len++] = c; } } diff --git a/src/term.c b/src/term.c index 9b1e7ca..245712e 100644 --- a/src/term.c +++ b/src/term.c @@ -537,10 +537,10 @@ encode_terminal_code (struct glyph *src, int src_len, required = src_len; required *= MAX_MULTIBYTE_LENGTH; if (encode_terminal_src_size < required) - { - encode_terminal_src = xrealloc (encode_terminal_src, required); - encode_terminal_src_size = required; - } + encode_terminal_src = xpalloc (encode_terminal_src, + &encode_terminal_src_size, + required - encode_terminal_src_size, + -1, sizeof *encode_terminal_src); charset_list = coding_charset_list (coding); diff --git a/src/xrdb.c b/src/xrdb.c index ce6e7d2..10bc769 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -177,12 +177,8 @@ magic_db (const char *string, ptrdiff_t string_len, const char *class, /* Do we have room for this component followed by a '\0'? */ if (path_size - path_len <= next_len) - { - if (min (PTRDIFF_MAX, SIZE_MAX) / 2 - 1 - path_len < next_len) - memory_full (SIZE_MAX); - path_size = (path_len + next_len + 1) * 2; - path = xrealloc (path, path_size); - } + path = xpalloc (path, &path_size, path_len - path_size + next_len + 1, + -1, sizeof *path); memcpy (path + path_len, next, next_len); path_len += next_len; commit 6ea4ff5a362a150fb9e22eff1d8f2b87d017b7a4 Author: Paul Eggert Date: Sat Nov 7 23:36:45 2015 -0800 Merge from gnulib This incorporates: 2015-11-05 timespec-sub: fix overflow bug; add tests 2015-11-04 intprops: revise _WRAPV macros, revert _OVERFLOW 2015-11-03 intprops: add parentheses * lib/intprops.h, lib/timespec-add.c, lib/timespec-sub.c: Copy from gnulib. diff --git a/lib/intprops.h b/lib/intprops.h index 4441f1c..c55c4db 100644 --- a/lib/intprops.h +++ b/lib/intprops.h @@ -267,25 +267,22 @@ The INT__OVERFLOW macros return 1 if the corresponding C operators might not yield numerically correct answers due to arithmetic overflow. - The INT__WRAPV macros return the low-order bits of the answer. - For example, INT_ADD_WRAPV (INT_MAX, 1) returns INT_MIN on a two's - complement host, even if INT_MAX + 1 would trap. - + The INT__WRAPV macros also store the low-order bits of the answer. These macros work correctly on all known practical hosts, and do not rely on undefined behavior due to signed arithmetic overflow. - Example usage: + Example usage, assuming A and B are long int: - long int a = ...; - long int b = ...; long int result = INT_MULTIPLY_WRAPV (a, b); printf ("result is %ld (%s)\n", result, INT_MULTIPLY_OVERFLOW (a, b) ? "after overflow" : "no overflow"); - enum { - INT_PRODUCTS_FIT_IN_LONG - = ! INT_CONST_MULTIPLY_OVERFLOW ((long int) INT_MIN, INT_MIN) - }; + Example usage with WRAPV flavor: + + long int result; + bool overflow = INT_MULTIPLY_WRAPV (a, b, &result); + printf ("result is %ld (%s)\n", result, + overflow ? "after overflow" : "no overflow"); Restrictions on these macros: @@ -296,35 +293,21 @@ These macros may evaluate their arguments zero or multiple times, so the arguments should not have side effects. - On non-GCC-compatible compilers that do not support C11, the type - of INT__WRAPV (A, B) might differ from the native type of (A op - B), so it is wise to convert the result to the native type. Such a - conversion is safe and cannot trap. - - For runtime efficiency GCC 5 and later has builtin functions for +, - -, * when doing integer overflow checking or wraparound arithmetic. - Unfortunately, these builtins require nonnull pointer arguments and - so cannot be used in constant expressions; see GCC bug 68120 - . In constant - expressions, use the macros INT_CONST_ADD_OVERFLOW and - INT_CONST_ADD_WRAPV instead, and similarly for SUBTRACT and - MULTIPLY; these macros avoid the builtins and are slower in - non-constant expressions. Perhaps someday GCC's API for overflow - checking will be improved and we can remove the need for the - INT_CONST_ variants. + The WRAPV macros are not constant expressions. They support only + +, binary -, and *. The result type must be signed. These macros are tuned for their last argument being a constant. Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, A % B, and A << B would overflow, respectively. */ -#define INT_CONST_ADD_OVERFLOW(a, b) \ +#define INT_ADD_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) -#define INT_CONST_SUBTRACT_OVERFLOW(a, b) \ +#define INT_SUBTRACT_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) #define INT_NEGATE_OVERFLOW(a) \ INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) -#define INT_CONST_MULTIPLY_OVERFLOW(a, b) \ +#define INT_MULTIPLY_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) #define INT_DIVIDE_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW) @@ -343,95 +326,104 @@ _GL_INT_MINIMUM (0 * (b) + (a)), \ _GL_INT_MAXIMUM (0 * (b) + (a))) -/* Return the low order bits of the integer expressions - A * B, A - B, -A, A * B, A / B, A % B, and A << B, respectively. - See above for restrictions. */ -#define INT_CONST_ADD_WRAPV(a, b) _GL_INT_OP_WRAPV (a, b, +) -#define INT_CONST_SUBTRACT_WRAPV(a, b) _GL_INT_OP_WRAPV (a, b, -) -#define INT_NEGATE_WRAPV(a) INT_CONST_SUBTRACT_WRAPV (0, a) -#define INT_CONST_MULTIPLY_WRAPV(a, b) _GL_INT_OP_WRAPV (a, b, *) -#define INT_DIVIDE_WRAPV(a, b) \ - (INT_DIVIDE_OVERFLOW(a, b) ? INT_NEGATE_WRAPV (a) : (a) / (b)) -#define INT_REMAINDER_WRAPV(a, b) \ - (INT_REMAINDER_OVERFLOW(a, b) ? 0 : (a) % (b)) -#define INT_LEFT_SHIFT_WRAPV(a, b) _GL_INT_OP_WRAPV (a, b, <<) - -/* Return the low order bits of A B, where OP specifies the operation. - See above for restrictions. */ -#if !_GL_HAVE___TYPEOF__ && 201112 <= __STDC_VERSION__ -# define _GL_INT_OP_WRAPV(a, b, op) \ - _Generic ((a) op (b), \ - int: _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, int), \ - long int: _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, long int), \ - long long int: _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, \ - long long int), \ - default: (a) op (b)) +/* Compute A + B, A - B, A * B, respectively, storing the result into *R. + Return 1 if the result overflows. See above for restrictions. */ +#define INT_ADD_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW) +#define INT_SUBTRACT_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW) +#define INT_MULTIPLY_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) + +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + +/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 + https://llvm.org/bugs/show_bug.cgi?id=25390 + For now, assume all versions of GCC-like compilers generate bogus + warnings for _Generic. This matters only for older compilers that + lack __builtin_add_overflow. */ +#if __GNUC__ +# define _GL__GENERIC_BOGUS 1 #else -# define _GL_INT_OP_WRAPV(a, b, op) \ - (! _GL_INT_SIGNED ((0 * (a)) op (0 * (b))) \ - ? ((a) op (b)) \ - : _GL_EXPR_CAST ((a) op (b), \ - (sizeof ((a) op (b)) <= sizeof (int) \ - ? _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, int) \ - : _GL_INT_OP_WRAPV_LONGISH (a, b, op)))) - -/* Cast to E's type the value of V if possible. Yield V as-is otherwise. */ -# if _GL_HAVE___TYPEOF__ -# define _GL_EXPR_CAST(e, v) ((__typeof__ (e)) (v)) -# else -# define _GL_EXPR_CAST(e, v) (v) -# endif +# define _GL__GENERIC_BOGUS 0 +#endif +/* Store A B into *R, where OP specifies the operation. + BUILTIN is the builtin operation, and OVERFLOW the overflow predicate. + See above for restrictions. */ +#if 5 <= __GNUC__ || __has_builtin (__builtin_add_oveflow) +# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) +#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS +# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ + (_Generic \ + (*(r), \ + signed char: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ + signed char, SCHAR_MIN, SCHAR_MAX), \ + short int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ + short int, SHRT_MIN, SHRT_MAX), \ + int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + int, INT_MIN, INT_MAX), \ + long int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + long int, LONG_MIN, LONG_MAX), \ + long long int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ + long long int, LLONG_MIN, LLONG_MAX))) +#else +# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ + (sizeof *(r) == sizeof (signed char) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ + signed char, SCHAR_MIN, SCHAR_MAX) \ + : sizeof *(r) == sizeof (short int) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ + short int, SHRT_MIN, SHRT_MAX) \ + : sizeof *(r) == sizeof (int) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + int, INT_MIN, INT_MAX) \ + : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) # ifdef LLONG_MAX -# define _GL_INT_OP_WRAPV_LONGISH(a, b, op) \ - (sizeof ((a) op (b)) <= sizeof (long int) \ - ? _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, long int) \ - : _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, long long int)) +# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ + (sizeof *(r) == sizeof (long int) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + long int, LONG_MIN, LONG_MAX) \ + : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ + long long int, LLONG_MIN, LLONG_MAX)) # else -# define _GL_INT_OP_WRAPV_LONGISH(a, b, op) \ - _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, long int) +# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + long int, LONG_MIN, LONG_MAX)) # endif #endif -/* Return A B, where the operation is given by OP and the result - type is T. T is a signed integer type that is at least as wide as int. - Do arithmetic using 'unsigned T' to avoid signed integer overflow. - Subtract TYPE_MINIMUM (T) before converting back to T, and add it - back afterwards, to avoid signed overflow during conversion. */ -#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, t) \ - ((unsigned t) (a) op (unsigned t) (b) <= TYPE_MAXIMUM (t) \ - ? (t) ((unsigned t) (a) op (unsigned t) (b)) \ - : ((t) ((unsigned t) (a) op (unsigned t) (b) - TYPE_MINIMUM (t)) \ - + TYPE_MINIMUM (t))) - -/* Calls to the INT__ macros are like their INT_CONST__ - counterparts, except they are faster with GCC 5 or later, and they - are not constant expressions due to limitations in the GNU C API. */ - -#define INT_ADD_OVERFLOW(a, b) \ - _GL_OP_OVERFLOW (a, b, INT_CONST_ADD_OVERFLOW, __builtin_add_overflow) -#define INT_SUBTRACT_OVERFLOW(a, b) \ - _GL_OP_OVERFLOW (a, b, INT_CONST_SUBTRACT_OVERFLOW, __builtin_sub_overflow) -#define INT_MULTIPLY_OVERFLOW(a, b) \ - _GL_OP_OVERFLOW (a, b, INT_CONST_MULTIPLY_OVERFLOW, __builtin_mul_overflow) - -#define INT_ADD_WRAPV(a, b) \ - _GL_OP_WRAPV (a, b, INT_CONST_ADD_WRAPV, __builtin_add_overflow) -#define INT_SUBTRACT_WRAPV(a, b) \ - _GL_OP_WRAPV (a, b, INT_CONST_SUBTRACT_WRAPV, __builtin_sub_overflow) -#define INT_MULTIPLY_WRAPV(a, b) \ - _GL_OP_WRAPV (a, b, INT_CONST_MULTIPLY_WRAPV, __builtin_mul_overflow) - -#if __GNUC__ < 5 -# define _GL_OP_OVERFLOW(a, b, portable, builtin) portable (a, b) -# define _GL_OP_WRAPV(a, b, portable, builtin) portable (a, b) -#else -# define _GL_OP_OVERFLOW(a, b, portable, builtin) \ - builtin (a, b, &(__typeof__ ((a) + (b))) {0}) -# define _GL_OP_WRAPV(a, b, portable, builtin) \ - _GL_OP_WRAPV_GENSYM(a, b, builtin, __gl_wrapv##__COUNTER__) -# define _GL_OP_WRAPV_GENSYM(a, b, builtin, r) \ - ({__typeof__ ((a) + (b)) r; builtin (a, b, &r); r; }) -#endif +/* Store the low-order bits of A B into *R, where the operation + is given by OP. Use the unsigned type UT for calculation to avoid + overflow problems. *R's type is T, with extremal values TMIN and + TMAX. T must be a signed integer type. */ +#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ + (sizeof ((a) op (b)) < sizeof (t) \ + ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \ + : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax)) +#define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \ + ((overflow (a, b) \ + || (_GL_INT_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \ + || (tmax) < ((a) op (b))) \ + ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \ + : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0)) + +/* Return A B, where the operation is given by OP. Use the + unsigned type UT for calculation to avoid overflow problems. + Convert the result to type T without overflow by subtracting TMIN + from large values before converting, and adding it afterwards. + Compilers can optimize all the operations except OP. */ +#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \ + (((ut) (a) op (ut) (b)) <= (tmax) \ + ? (t) ((ut) (a) op (ut) (b)) \ + : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin))) #endif /* _GL_INTPROPS_H */ diff --git a/lib/timespec-add.c b/lib/timespec-add.c index 255489e..e8f6aac 100644 --- a/lib/timespec-add.c +++ b/lib/timespec-add.c @@ -33,36 +33,39 @@ timespec_add (struct timespec a, struct timespec b) int ns = a.tv_nsec + b.tv_nsec; int nsd = ns - TIMESPEC_RESOLUTION; int rns = ns; + time_t tmin = TYPE_MINIMUM (time_t); + time_t tmax = TYPE_MAXIMUM (time_t); if (0 <= nsd) { rns = nsd; - if (rs == TYPE_MAXIMUM (time_t)) - { - if (0 <= bs) - goto high_overflow; - bs++; - } - else + if (bs < tmax) + bs++; + else if (rs < 0) rs++; + else + goto high_overflow; } - if (INT_ADD_OVERFLOW (rs, bs)) + /* INT_ADD_WRAPV is not appropriate since time_t might be unsigned. + In theory time_t might be narrower than int, so plain + INT_ADD_OVERFLOW does not suffice. */ + if (! INT_ADD_OVERFLOW (rs, bs) && tmin <= rs + bs && rs + bs <= tmax) + rs += bs; + else { if (rs < 0) { - rs = TYPE_MINIMUM (time_t); + rs = tmin; rns = 0; } else { high_overflow: - rs = TYPE_MAXIMUM (time_t); + rs = tmax; rns = TIMESPEC_RESOLUTION - 1; } } - else - rs += bs; return make_timespec (rs, rns); } diff --git a/lib/timespec-sub.c b/lib/timespec-sub.c index c574375..392ec15 100644 --- a/lib/timespec-sub.c +++ b/lib/timespec-sub.c @@ -33,36 +33,39 @@ timespec_sub (struct timespec a, struct timespec b) time_t bs = b.tv_sec; int ns = a.tv_nsec - b.tv_nsec; int rns = ns; + time_t tmin = TYPE_MINIMUM (time_t); + time_t tmax = TYPE_MAXIMUM (time_t); if (ns < 0) { rns = ns + TIMESPEC_RESOLUTION; - if (rs == TYPE_MINIMUM (time_t)) - { - if (bs <= 0) - goto low_overflow; - bs--; - } - else + if (bs < tmax) + bs++; + else if (- TYPE_SIGNED (time_t) < rs) rs--; + else + goto low_overflow; } - if (INT_SUBTRACT_OVERFLOW (rs, bs)) + /* INT_SUBTRACT_WRAPV is not appropriate since time_t might be unsigned. + In theory time_t might be narrower than int, so plain + INT_SUBTRACT_OVERFLOW does not suffice. */ + if (! INT_SUBTRACT_OVERFLOW (rs, bs) && tmin <= rs - bs && rs - bs <= tmax) + rs -= bs; + else { if (rs < 0) { low_overflow: - rs = TYPE_MINIMUM (time_t); + rs = tmin; rns = 0; } else { - rs = TYPE_MAXIMUM (time_t); + rs = tmax; rns = TIMESPEC_RESOLUTION - 1; } } - else - rs -= bs; return make_timespec (rs, rns); } commit b9acb9502fd7c4d3cd32b1fd46e644acba4bd878 Author: Eli Zaretskii Date: Sun Nov 8 05:43:00 2015 +0200 ;* test/automated/abbrev-tests.el: Fix a typo in a comment diff --git a/test/automated/abbrev-tests.el b/test/automated/abbrev-tests.el index da77f61..d08e026 100644 --- a/test/automated/abbrev-tests.el +++ b/test/automated/abbrev-tests.el @@ -40,4 +40,4 @@ (provide 'abbrev-tests) -;;; add-log-tests.el ends here +;;; abbrev-tests.el ends here commit 35cd51814507987b916c4b4e0a7b45e09e454341 Author: David Reitter Date: Sat Nov 7 20:43:29 2015 -0500 Provide NS notification objects where required to eliminate warnings * nsterm.m (windowDidResize:, toggleFullScreen:): Call notification functions with notification objects as per delegate APIs. diff --git a/src/nsterm.m b/src/nsterm.m index 9a2249c..fabfa29 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6267,7 +6267,10 @@ not_in_argv (NSString *arg) wr = NSMakeRect (0, 0, neww, newh); NSTRACE_RECT ("setFrame", wr); [view setFrame: wr]; - [self windowDidMove:nil]; // Update top/left. + // to do: consider using [NSNotificationCenter postNotificationName:]. + [self windowDidMove: // Update top/left. + [NSNotification notificationWithName:NSWindowDidMoveNotification + object:[view window]]]; } else { @@ -7051,13 +7054,17 @@ not_in_argv (NSString *arg) nonfs_window = w; - [self windowWillEnterFullScreen:nil]; + [self windowWillEnterFullScreen: + [NSNotification notificationWithName:NSWindowWillEnterFullScreenNotification + object:[self window]]]; [fw makeKeyAndOrderFront:NSApp]; [fw makeFirstResponder:self]; [w orderOut:self]; r = [fw frameRectForContentRect:[screen frame]]; [fw setFrame: r display:YES animate:ns_use_fullscreen_animation]; - [self windowDidEnterFullScreen:nil]; + [self windowDidEnterFullScreen: + [NSNotification notificationWithName:NSWindowDidEnterFullScreenNotification + object:[self window]]]; [fw display]; } else @@ -7085,11 +7092,17 @@ not_in_argv (NSString *arg) if (FRAME_EXTERNAL_TOOL_BAR (f)) FRAME_TOOLBAR_HEIGHT (f) = tobar_height; - [self windowWillExitFullScreen:nil]; + // to do: consider using [NSNotificationCenter postNotificationName:] to send notifications. + + [self windowWillExitFullScreen: + [NSNotification notificationWithName:NSWindowWillExitFullScreenNotification + object:[self window]]]; [fw setFrame: [w frame] display:YES animate:ns_use_fullscreen_animation]; [fw close]; [w makeKeyAndOrderFront:NSApp]; - [self windowDidExitFullScreen:nil]; + [self windowDidExitFullScreen: + [NSNotification notificationWithName:NSWindowDidExitFullScreenNotification + object:[self window]]]; [self updateFrameSize:YES]; } } commit 3a37d99e974b89de91e07ce5c7955f4fd1d731ca Author: Dmitry Gutov Date: Fri Nov 6 05:08:51 2015 +0200 Move and rename xref-find-regexp to the project package * lisp/progmodes/project.el (project-find-regexp) (project--read-regexp) (project--find-regexp-in): New functions. * lisp/progmodes/xref.el (xref--find-xrefs): Extract from xref--show-xrefs. Use in existing callers in place of that function. (xref--show-xrefs): Only do the "show" part. (xref-find-regexp): Rename, more or less, to project-or-libraries-find-regexp. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index ba83120..f67a584 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -199,5 +199,54 @@ DIRS must contain directory names." (hack-dir-local-variables-non-file-buffer) (symbol-value var))) +(declare-function grep-read-files "grep") +(declare-function xref-collect-matches "xref") +(declare-function xref--show-xrefs "xref") + +;;;###autoload +(defun project-find-regexp (regexp) + "Find all matches for REGEXP in the current project. +With \\[universal-argument] prefix, you can specify the directory +to search in, and the file name pattern to search for." + (interactive (list (project--read-regexp))) + (let* ((pr (project-current)) + (dirs (if current-prefix-arg + (list (read-directory-name "Base directory: " + nil default-directory t)) + (project-roots pr)))) + (project--find-regexp-in dirs regexp pr))) + +;;;###autoload +(defun project-or-libraries-find-regexp (regexp) + "Find all matches for REGEXP in the current project or libraries. +With \\[universal-argument] prefix, you can specify the file name +pattern to search for." + (interactive (list (project--read-regexp))) + (let* ((pr (project-current)) + (dirs (append + (project-roots pr) + (project-library-roots pr)))) + (project--find-regexp-in dirs regexp pr))) + +(defun project--read-regexp () + (defvar xref-identifier-at-point-function) + (require 'xref) + (read-regexp "Find regexp" + (funcall xref-identifier-at-point-function))) + +(defun project--find-regexp-in (dirs regexp project) + (require 'grep) + (let* ((files (if current-prefix-arg + (grep-read-files regexp) + "*")) + (xrefs (cl-mapcan + (lambda (dir) + (xref-collect-matches regexp files dir + (project-ignores project dir))) + dirs))) + (unless xrefs + (user-error "No matches for: %s" regexp)) + (xref--show-xrefs xrefs nil))) + (provide 'project) ;;; project.el ends here diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 3aa85cb..89a0604 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -664,6 +664,8 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." ;; This part of the UI seems fairly uncontroversial: it reads the ;; identifier and deals with the single definition case. +;; (FIXME: do we really want this case to be handled like that in +;; "find references" and "find regexp searches"?) ;; ;; The controversial multiple definitions case is handed off to ;; xref-show-xrefs-function. @@ -675,18 +677,15 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (defvar xref--read-pattern-history nil) -(defun xref--show-xrefs (input kind arg window) - (let* ((xrefs (funcall xref-find-function kind arg))) - (cond - ((null xrefs) - (user-error "No %s found for: %s" (symbol-name kind) input)) - ((not (cdr xrefs)) - (xref-push-marker-stack) - (xref--pop-to-location (car xrefs) window)) - (t - (xref-push-marker-stack) - (funcall xref-show-xrefs-function xrefs - `((window . ,window))))))) +(defun xref--show-xrefs (xrefs window) + (cond + ((not (cdr xrefs)) + (xref-push-marker-stack) + (xref--pop-to-location (car xrefs) window)) + (t + (xref-push-marker-stack) + (funcall xref-show-xrefs-function xrefs + `((window . ,window)))))) (defun xref--prompt-p (command) (or (eq xref-prompt-for-identifier t) @@ -714,8 +713,14 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." ;;; Commands +(defun xref--find-xrefs (input kind arg window) + (let ((xrefs (funcall xref-find-function kind arg))) + (unless xrefs + (user-error "No %s found for: %s" (symbol-name kind) input)) + (xref--show-xrefs xrefs window))) + (defun xref--find-definitions (id window) - (xref--show-xrefs id 'definitions id window)) + (xref--find-xrefs id 'definitions id window)) ;;;###autoload (defun xref-find-definitions (identifier) @@ -749,35 +754,7 @@ display the list in a buffer." "Find references to the identifier at point. With prefix argument, prompt for the identifier." (interactive (list (xref--read-identifier "Find references of: "))) - (xref--show-xrefs identifier 'references identifier nil)) - -;; TODO: Rename and move to project-find-regexp, as soon as idiomatic -;; usage of xref from other packages has stabilized. -;;;###autoload -(defun xref-find-regexp (regexp) - "Find all matches for REGEXP. -With \\[universal-argument] prefix, you can specify the directory -to search in, and the file name pattern to search for." - (interactive (list (xref--read-identifier "Find regexp: "))) - (require 'grep) - (let* ((proj (project-current)) - (files (if current-prefix-arg - (grep-read-files regexp) - "*")) - (dirs (if current-prefix-arg - (list (read-directory-name "Base directory: " - nil default-directory t)) - (append - (project-roots proj) - (project-library-roots proj)))) - (xref-find-function - (lambda (_kind regexp) - (cl-mapcan - (lambda (dir) - (xref-collect-matches regexp files dir - (project-ignores proj dir))) - dirs)))) - (xref--show-xrefs regexp 'matches regexp nil))) + (xref--find-xrefs identifier 'references identifier nil)) (declare-function apropos-parse-pattern "apropos" (pattern)) @@ -789,7 +766,7 @@ The argument has the same meaning as in `apropos'." "Search for pattern (word list or regexp): " nil 'xref--read-pattern-history))) (require 'apropos) - (xref--show-xrefs pattern 'apropos + (xref--find-xrefs pattern 'apropos (apropos-parse-pattern (if (string-equal (regexp-quote pattern) pattern) ;; Split into words @@ -833,7 +810,6 @@ and just use etags." (declare-function semantic-symref-find-references-by-name "semantic/symref") (declare-function semantic-find-file-noselect "semantic/fw") -(declare-function grep-read-files "grep") (declare-function grep-expand-template "grep") (defun xref-collect-references (symbol dir) commit ea88d874a4f3ecbfdb5fa79dcb3ea90927cebec2 Merge: 76be8f2 044991f Author: Eli Zaretskii Date: Sat Nov 7 20:05:43 2015 +0200 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs commit 76be8f28ebecaaa41551dad8e9f1eb43d646a715 Author: Noam Postavsky Date: Sat Nov 7 20:04:00 2015 +0200 Add test for bug #21824 * test/automated/buffer-tests.el: New file. (overlay-modification-hooks-message-other-buf): New test. diff --git a/test/automated/buffer-tests.el b/test/automated/buffer-tests.el new file mode 100644 index 0000000..bb3c92d --- /dev/null +++ b/test/automated/buffer-tests.el @@ -0,0 +1,48 @@ +;;; buffer-tests.el --- tests for buffer.c functions -*- lexical-binding: t -*- + +;; Copyright (C) 2015 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(require 'ert) + +(ert-deftest overlay-modification-hooks-message-other-buf () + "Test for bug#21824. +After a modification-hook has been run and there is an overlay in +the *Messages* buffer, the message coalescing [2 times] wrongly +runs the modification-hook of the overlay in the 1st buffer, but +with parameters from the *Messages* buffer modification." + (let ((buf nil) + (msg-ov nil)) + (with-temp-buffer + (insert "123") + (overlay-put (make-overlay 1 3) + 'modification-hooks + (list (lambda (&rest _) + (setq buf (current-buffer))))) + (goto-char 2) + (insert "x") + (unwind-protect + (progn + (setq msg-ov (make-overlay 1 1 (get-buffer-create "*Messages*"))) + (message "a message") + (message "a message") + (should (eq buf (current-buffer)))) + (when msg-ov (delete-overlay msg-ov)))))) + +;;; buffer-tests.el ends here commit 044991f6c61a498a8cf15d05b10c6d04359f8537 Merge: ae24d82 7a18701 Author: Kelvin White Date: Sat Nov 7 13:03:03 2015 -0500 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit ae24d821faba48fbc74ace082ff28669f9e1cec3 Author: Kelvin White Date: Sat Nov 7 12:54:58 2015 -0500 erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771 diff --git a/lisp/erc/ChangeLog.2 b/lisp/erc/ChangeLog.2 index 8dce508..80ee3bb 100644 --- a/lisp/erc/ChangeLog.2 +++ b/lisp/erc/ChangeLog.2 @@ -1,3 +1,8 @@ +2015-11-07 Kelvin White + + * erc-pcomplete.el (pcomplete-erc-nicks): Fix bug for tab complete + (bug#18771) + 2015-03-25 Stefan Monnier * erc.el (erc-switch-to-buffer): Fix last change (bug#20187). diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el index e46ac68..686a3a8 100644 --- a/lisp/erc/erc-pcomplete.el +++ b/lisp/erc/erc-pcomplete.el @@ -225,9 +225,10 @@ If optional argument IGNORE-SELF is non-nil, don't return the current nick." (erc-get-channel-user-list))) (nicks nil)) (dolist (user users) - (unless (and ignore-self - (string= (erc-server-user-nickname (car user)) - (erc-current-nick))) + (unless (or (not user) + (and ignore-self + (string= (erc-server-user-nickname (car user)) + (erc-current-nick)))) (setq nicks (cons (concat (erc-server-user-nickname (car user)) postfix) nicks)))) commit 7a187017d0d10df19636b354142d13fc9367d0a1 Author: l3thal Date: Sat Nov 7 12:54:58 2015 -0500 erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771 diff --git a/lisp/erc/ChangeLog.2 b/lisp/erc/ChangeLog.2 index 8dce508..80ee3bb 100644 --- a/lisp/erc/ChangeLog.2 +++ b/lisp/erc/ChangeLog.2 @@ -1,3 +1,8 @@ +2015-11-07 Kelvin White + + * erc-pcomplete.el (pcomplete-erc-nicks): Fix bug for tab complete + (bug#18771) + 2015-03-25 Stefan Monnier * erc.el (erc-switch-to-buffer): Fix last change (bug#20187). diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el index e46ac68..686a3a8 100644 --- a/lisp/erc/erc-pcomplete.el +++ b/lisp/erc/erc-pcomplete.el @@ -225,9 +225,10 @@ If optional argument IGNORE-SELF is non-nil, don't return the current nick." (erc-get-channel-user-list))) (nicks nil)) (dolist (user users) - (unless (and ignore-self - (string= (erc-server-user-nickname (car user)) - (erc-current-nick))) + (unless (or (not user) + (and ignore-self + (string= (erc-server-user-nickname (car user)) + (erc-current-nick)))) (setq nicks (cons (concat (erc-server-user-nickname (car user)) postfix) nicks)))) commit 88733e67df4ef20aad1fc51ea3ed29510db49afb Author: Thomas Fitzsimmons Date: Sat Nov 7 09:08:19 2015 -0500 ; ChangeLog.2: Fix formatting of ntlm.el 2.0.0 entry diff --git a/ChangeLog.2 b/ChangeLog.2 index 31f793e..0d0d5ab 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,6 +1,7 @@ 2015-10-31 Thomas Fitzsimmons - ntlm.el: Change version to 2.0.0 + Change version of ntlm.el to 2.0.0 + * lisp/net/ntlm.el: Change version to 2.0.0. 2015-10-31 Juanma Barranquero commit 2dc91e65b46ec80dacdab4916bf855fdbad58bef Author: Thomas Fitzsimmons Date: Sat Nov 7 08:53:49 2015 -0500 ; ChangeLog.2: Fix entry for soap-client 3.0.0 sync diff --git a/ChangeLog.2 b/ChangeLog.2 index 599a4c8..31f793e 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -708,6 +708,186 @@ * lisp/net/soap-client.el, lisp/net/soap-inspect.el: Update home page. +2015-10-25 Eli Zaretskii + + * lisp/progmodes/grep.el (grep): Doc fix. (Bug#21754) + +2015-10-25 Artur Malabarba + + * src/keyboard.c (post-command-hook): Extend the docstring. + Mainly, explain how to use it without hanging Emacs, or giving the + impression that it is hanging. Also mention `pre-command-hook'. + (pre-command-hook): Mention `post-command-hook'. + +2015-10-25 Artur Malabarba + + * lisp/custom.el (custom-declare-variable): Shorten code again. + Without using pcase this time. We can't use pcase because it is + loaded after custom in loadup.el. Also add a comment explaining + this to future dummies like me. + +2015-10-25 Michael Albinus + + * doc/lispref/os.texi (File Notifications): Document `stopped event'. + +2015-10-25 Michael Albinus + + Introduce `stopped' event in file notification + + * lisp/filenotify.el (file-notify--rm-descriptor): New defun. + (file-notify-rm-watch): Use it. + (file-notify-callback): Implement `stopped' event. + (file-notify-add-watch): Mention `stopped' in the docstring. + Check, that upper directory exists. + + * test/automated/file-notify-tests.el (file-notify-test01-add-watch): + Add two test cases. + (file-notify-test02-events): Handle also `stopped' event. + (file-notify-test04-file-validity): Add another test case. + +2015-10-25 Paul Eggert + + Revert commit that broke 'make bootstrap' + + * lisp/custom.el (custom-declare-variable): Revert commit + 79fac080d277fed07b3c192890ad59d36d9f83b6. custom.el needs to work + even when pcase has not been defined yet, when doing bootstrapping. + +2015-10-25 Paul Eggert + + Port recent inline functions fix to Standard C + + * src/lisp.h (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): Remove. + All uses rewritten to define the function directly rather than to + use a macro to define the function. This conforms to Standard C, + which does not allow stray semicolons at the top level. I hope it + also avoids the problems with TAGS. Those macros, though clever, + were pretty confusing anyway, and it wasn’t clear they were worth + the aggravation even without the TAGS problem. + +2015-10-24 Artur Malabarba + + * lisp/isearch.el: Make character-fold search the default again. + +2015-10-24 Artur Malabarba + + * lisp/character-fold.el: Many improvements. + (character-fold-search-forward, character-fold-search-backward): + New command. + (character-fold-to-regexp): Remove lax-whitespace hack. + (character-fold-search): Remove variable. Only isearch and + query-replace use char-folding, and they both have their own + variables to configure that. + +2015-10-24 Artur Malabarba + + * lisp/isearch.el: Generalize definition of regexp-function toggles. + (isearch-specify-regexp-function): New macro for specifying + possible values of `isearch-regexp-function'. + (isearch-toggle-character-fold, isearch-toggle-symbol) + (isearch-toggle-word): Define with `isearch-specify-regexp-function'. + +2015-10-24 Artur Malabarba + + * lisp/isearch.el (search-default-regexp-mode): New variable. + (isearch-mode): Use it. + +2015-10-24 Artur Malabarba + + * lisp/isearch.el (search-exit-option, search-slow-window-lines) + (search-slow-speed, search-upper-case) + (search-nonincremental-instead, search-whitespace-regexp) + (search-invisible, isearch-hide-immediately) + (isearch-resume-in-command-history, search-ring-max) + (regexp-search-ring-max, search-ring-update, search-highlight) + (isearch-fail): Delete :group entries. + +2015-10-24 Artur Malabarba + + * lisp/custom.el (custom-declare-variable): Shorten code a bit. + +2015-10-24 Juanma Barranquero + + addpm.c: Silence some warnings. + + * nt/addpm.c (DdeCommand): Cast pData argument of DdeClientTransaction + to LPBYTE. + (add_registry): Pass NULL to optional lpClass argument of + RegCreateKeyEx, not an empty string. + +2015-10-24 Juanma Barranquero + + addpm.c: Do not add obsolete GTK libraries to the path. + + * nt/addpm.c (REG_GTK, REG_RUNEMACS_PATH): Delete. + (add_registry): Remove variables `size' and `gtk_key'. + Do not add the GTK DLL directory to the library search path; it is + confusing behavior (in particular, the same Emacs version with and + without invoking addpm will use a different path), and the GTK image + libraries are obsolete anyway. + +2015-10-24 Juanma Barranquero + + addpm.c: Replace existing registry entries, but do not create new ones + + * nt/addpm.c (add_registry): If the Emacs registry key exists, replace + existing values from previous versions, but do not add new ones; the + key could exist for other reasons unrelated to old Emacsen, like X-style + resources, or to set some environment variables like HOME or LANG, and + in that case we don't want to populate it with obsolete values. + +2015-10-24 Juanma Barranquero + + * nt/addpm.c (add_registry): Do not compute unused return value. + +2015-10-24 Juanma Barranquero + + addpm.c: Don't pass REG_OPTION_NON_VOLATILE to RegOpenKeyEx + + * nt/addpm.c (add_registry): Pass 0 to ulOptions argument of + RegOpenKeyEx, not REG_OPTION_NON_VOLATILE. This doesn't change + current behavior because REG_OPTION_NON_VOLATILE is defined to + be 0L anyway, but that option is actually documented only for + RegCreateKeyEx. + +2015-10-24 Juanma Barranquero + + * src/w32notify.c (Fw32notify_add_watch): Fix version check. + +2015-10-24 Eli Zaretskii + + Update frame title when redisplay scrolls selected window + + * src/xdisp.c (redisplay_window): Reconsider the frame's title + when the mode-line of the frame's selected window needs to be + updated. + +2015-10-24 Eli Zaretskii + + Update frame title when scrolling the selected window + + * src/window.c (wset_update_mode_line): New function, sets either + the window's update_mode_line flag or the global update_mode_lines + variable. + (Fset_window_start, set_window_buffer, window_scroll_pixel_based) + (window_scroll_line_based): Call it instead of only setting the + window's update_mode_line flag. + +2015-10-24 Eli Zaretskii + + An even better fix for bug#21739 + + * src/window.c (set_window_buffer): If the window is the frame's + selected window, set update_mode_lines, not the window's + update_mode_line flag. + * src/buffer.c (Fkill_buffer): Undo last change. + (set_update_modelines_for_buf): Function deleted. + +2015-10-24 Thomas Fitzsimmons + Alexandru Harsanyi + + Sync with soap-client repository, version 3.0.0 + * lisp/net/soap-client.el, lisp/net/soap-inspect.el: Bump version to 3.0.0. @@ -1101,185 +1281,6 @@ * lisp/net/soap-client.el (soap-invoke): Encode the string for `url-request-data' as UTF-8. Fixes issue 16. -2015-10-25 Eli Zaretskii - - * lisp/progmodes/grep.el (grep): Doc fix. (Bug#21754) - -2015-10-25 Artur Malabarba - - * src/keyboard.c (post-command-hook): Extend the docstring. - Mainly, explain how to use it without hanging Emacs, or giving the - impression that it is hanging. Also mention `pre-command-hook'. - (pre-command-hook): Mention `post-command-hook'. - -2015-10-25 Artur Malabarba - - * lisp/custom.el (custom-declare-variable): Shorten code again. - Without using pcase this time. We can't use pcase because it is - loaded after custom in loadup.el. Also add a comment explaining - this to future dummies like me. - -2015-10-25 Michael Albinus - - * doc/lispref/os.texi (File Notifications): Document `stopped event'. - -2015-10-25 Michael Albinus - - Introduce `stopped' event in file notification - - * lisp/filenotify.el (file-notify--rm-descriptor): New defun. - (file-notify-rm-watch): Use it. - (file-notify-callback): Implement `stopped' event. - (file-notify-add-watch): Mention `stopped' in the docstring. - Check, that upper directory exists. - - * test/automated/file-notify-tests.el (file-notify-test01-add-watch): - Add two test cases. - (file-notify-test02-events): Handle also `stopped' event. - (file-notify-test04-file-validity): Add another test case. - -2015-10-25 Paul Eggert - - Revert commit that broke 'make bootstrap' - - * lisp/custom.el (custom-declare-variable): Revert commit - 79fac080d277fed07b3c192890ad59d36d9f83b6. custom.el needs to work - even when pcase has not been defined yet, when doing bootstrapping. - -2015-10-25 Paul Eggert - - Port recent inline functions fix to Standard C - - * src/lisp.h (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): Remove. - All uses rewritten to define the function directly rather than to - use a macro to define the function. This conforms to Standard C, - which does not allow stray semicolons at the top level. I hope it - also avoids the problems with TAGS. Those macros, though clever, - were pretty confusing anyway, and it wasn’t clear they were worth - the aggravation even without the TAGS problem. - -2015-10-24 Artur Malabarba - - * lisp/isearch.el: Make character-fold search the default again. - -2015-10-24 Artur Malabarba - - * lisp/character-fold.el: Many improvements. - (character-fold-search-forward, character-fold-search-backward): - New command. - (character-fold-to-regexp): Remove lax-whitespace hack. - (character-fold-search): Remove variable. Only isearch and - query-replace use char-folding, and they both have their own - variables to configure that. - -2015-10-24 Artur Malabarba - - * lisp/isearch.el: Generalize definition of regexp-function toggles. - (isearch-specify-regexp-function): New macro for specifying - possible values of `isearch-regexp-function'. - (isearch-toggle-character-fold, isearch-toggle-symbol) - (isearch-toggle-word): Define with `isearch-specify-regexp-function'. - -2015-10-24 Artur Malabarba - - * lisp/isearch.el (search-default-regexp-mode): New variable. - (isearch-mode): Use it. - -2015-10-24 Artur Malabarba - - * lisp/isearch.el (search-exit-option, search-slow-window-lines) - (search-slow-speed, search-upper-case) - (search-nonincremental-instead, search-whitespace-regexp) - (search-invisible, isearch-hide-immediately) - (isearch-resume-in-command-history, search-ring-max) - (regexp-search-ring-max, search-ring-update, search-highlight) - (isearch-fail): Delete :group entries. - -2015-10-24 Artur Malabarba - - * lisp/custom.el (custom-declare-variable): Shorten code a bit. - -2015-10-24 Juanma Barranquero - - addpm.c: Silence some warnings. - - * nt/addpm.c (DdeCommand): Cast pData argument of DdeClientTransaction - to LPBYTE. - (add_registry): Pass NULL to optional lpClass argument of - RegCreateKeyEx, not an empty string. - -2015-10-24 Juanma Barranquero - - addpm.c: Do not add obsolete GTK libraries to the path. - - * nt/addpm.c (REG_GTK, REG_RUNEMACS_PATH): Delete. - (add_registry): Remove variables `size' and `gtk_key'. - Do not add the GTK DLL directory to the library search path; it is - confusing behavior (in particular, the same Emacs version with and - without invoking addpm will use a different path), and the GTK image - libraries are obsolete anyway. - -2015-10-24 Juanma Barranquero - - addpm.c: Replace existing registry entries, but do not create new ones - - * nt/addpm.c (add_registry): If the Emacs registry key exists, replace - existing values from previous versions, but do not add new ones; the - key could exist for other reasons unrelated to old Emacsen, like X-style - resources, or to set some environment variables like HOME or LANG, and - in that case we don't want to populate it with obsolete values. - -2015-10-24 Juanma Barranquero - - * nt/addpm.c (add_registry): Do not compute unused return value. - -2015-10-24 Juanma Barranquero - - addpm.c: Don't pass REG_OPTION_NON_VOLATILE to RegOpenKeyEx - - * nt/addpm.c (add_registry): Pass 0 to ulOptions argument of - RegOpenKeyEx, not REG_OPTION_NON_VOLATILE. This doesn't change - current behavior because REG_OPTION_NON_VOLATILE is defined to - be 0L anyway, but that option is actually documented only for - RegCreateKeyEx. - -2015-10-24 Juanma Barranquero - - * src/w32notify.c (Fw32notify_add_watch): Fix version check. - -2015-10-24 Eli Zaretskii - - Update frame title when redisplay scrolls selected window - - * src/xdisp.c (redisplay_window): Reconsider the frame's title - when the mode-line of the frame's selected window needs to be - updated. - -2015-10-24 Eli Zaretskii - - Update frame title when scrolling the selected window - - * src/window.c (wset_update_mode_line): New function, sets either - the window's update_mode_line flag or the global update_mode_lines - variable. - (Fset_window_start, set_window_buffer, window_scroll_pixel_based) - (window_scroll_line_based): Call it instead of only setting the - window's update_mode_line flag. - -2015-10-24 Eli Zaretskii - - An even better fix for bug#21739 - - * src/window.c (set_window_buffer): If the window is the frame's - selected window, set update_mode_lines, not the window's - update_mode_line flag. - * src/buffer.c (Fkill_buffer): Undo last change. - (set_update_modelines_for_buf): Function deleted. - -2015-10-24 Thomas Fitzsimmons - - Sync with soap-client repository, version 3.0.0 - 2015-10-24 Nicolas Petton Update the new icon commit 0ea647d80dbae21bb394362b37e73e92da4dba66 Author: Eli Zaretskii Date: Sat Nov 7 15:50:40 2015 +0200 ; * lisp/abbrev.el (copy-abbrev-table): Remove forgotten debug code. diff --git a/lisp/abbrev.el b/lisp/abbrev.el index bd1650b..43a905b 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -87,7 +87,6 @@ be replaced by its expansion." "Make a new abbrev-table with the same abbrevs as TABLE. Does not copy property lists." (let ((new-table (make-abbrev-table))) - (message "modif: %s" (abbrev-table-get new-table :abbrev-table-modiff)) (mapatoms (lambda (symbol) (define-abbrev new-table commit 53def55b4391f43aecf18bc02b61e055e4b2edd3 Author: David Reitter Date: Sat Nov 7 08:32:59 2015 -0500 Ignore fullscreen exit notifications on NS when frame is dead * nsterm.m (windowDidResize:,windowWillExitFullScreen:) (windowDidExitFullScreen:): Return if frame is dead. These functions may be called when a fullscreen frame is closed; they are called before, not after. May address Bug#21428. diff --git a/src/nsterm.m b/src/nsterm.m index b4ec553..9a2249c 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6380,7 +6380,11 @@ not_in_argv (NSString *arg) - (void)windowDidResize: (NSNotification *)notification { NSTRACE ("windowDidResize"); - + if (!FRAME_LIVE_P (emacsframe)) + { + NSTRACE_MSG ("Ignored (frame dead)"); + return; + } if (emacsframe->output_data.ns->in_animation) { NSTRACE_MSG ("Ignored (in animation)"); @@ -6902,7 +6906,11 @@ not_in_argv (NSString *arg) - (void)windowWillExitFullScreen:(NSNotification *)notification { NSTRACE ("windowWillExitFullScreen"); - + if (!FRAME_LIVE_P (emacsframe)) + { + NSTRACE_MSG ("Ignored (frame dead)"); + return; + } if (next_maximized != -1) fs_before_fs = next_maximized; } @@ -6910,7 +6918,11 @@ not_in_argv (NSString *arg) - (void)windowDidExitFullScreen:(NSNotification *)notification { NSTRACE ("windowDidExitFullScreen"); - + if (!FRAME_LIVE_P (emacsframe)) + { + NSTRACE_MSG ("Ignored (frame dead)"); + return; + } [self setFSValue: fs_before_fs]; fs_before_fs = -1; #ifdef HAVE_NATIVE_FS commit fc61ea4fd744480dcd5cd174f4599e135752882a Author: Eli Zaretskii Date: Sat Nov 7 15:32:45 2015 +0200 Speed up lookup in redisplay--variables * lisp/frame.el (redisplay--variables): Make it a hash-table. * src/xdisp.c (maybe_set_redisplay): Access redisplay--variables as a hash-table. This speeds up this function by an order of magnitude: where previously a setq was slowed down by 100% by introducing the maybe_set_redisplay test, it is now only 5% slower. (syms_of_xdisp) : Doc fix. diff --git a/lisp/frame.el b/lisp/frame.el index 4b23cb2..3f31a29 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -2231,8 +2231,10 @@ See also `toggle-frame-maximized'." (make-obsolete-variable 'window-system-version "it does not give useful information." "24.3") -;; These variables should trigger redisplay of the current buffer. -(setq redisplay--variables +;; Variables which should trigger redisplay of the current buffer. +(setq redisplay--variables (make-hash-table :test 'eq :size 10)) +(mapc (lambda (var) + (puthash var 1 redisplay--variables)) '(line-spacing overline-margin line-prefix diff --git a/src/xdisp.c b/src/xdisp.c index dbc2d84..30dfac5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -623,7 +623,8 @@ bset_update_mode_line (struct buffer *b) void maybe_set_redisplay (Lisp_Object symbol) { - if (!NILP (Fassoc_string (symbol, Vredisplay__variables, Qnil))) + if (HASH_TABLE_P (Vredisplay__variables) + && hash_lookup (XHASH_TABLE (Vredisplay__variables), symbol, NULL) >= 0) { bset_update_mode_line (current_buffer); current_buffer->prevent_redisplay_optimizations_p = true; @@ -31478,7 +31479,7 @@ display table takes effect; in this case, Emacs does not consult Vredisplay__mode_lines_cause = Fmake_hash_table (0, NULL); DEFVAR_LISP ("redisplay--variables", Vredisplay__variables, - doc: /* A list of variables changes to which trigger a thorough redisplay. */); + doc: /* A hash-table of variables changing which triggers a thorough redisplay. */); Vredisplay__variables = Qnil; } commit b74c8847e86a9fc2abfe3a80e75cd361ce2d53af Author: Artur Malabarba Date: Sat Nov 7 11:25:31 2015 +0000 * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix a bug The defsubst was being created as: (cl-defsubst name (args) ("DOC") ...) * test/automated/cl-lib-tests.el (cl-lib-struct-constructors): Add test diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index c42094f..80f0cd7 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2730,7 +2730,7 @@ non-nil value, that slot cannot be set via `setf'. slots defaults))) (push `(cl-defsubst ,cname (&cl-defs (nil ,@descs) ,@args) - ,(if (stringp doc) (list doc) + ,(if (stringp doc) doc (format "Constructor for objects of type `%s'." name)) ,@(if (cl--safe-expr-p `(progn ,@(mapcar #'cl-second descs))) '((declare (side-effect-free t)))) diff --git a/test/automated/cl-lib-tests.el b/test/automated/cl-lib-tests.el index 1bdc6d7..b31622f 100644 --- a/test/automated/cl-lib-tests.el +++ b/test/automated/cl-lib-tests.el @@ -206,7 +206,8 @@ (cl-defstruct (mystruct (:constructor cl-lib--con-1 (&aux (abc 1))) - (:constructor cl-lib--con-2 (&optional def))) + (:constructor cl-lib--con-2 (&optional def) "Constructor docstring.")) + "General docstring." (abc 5 :readonly t) (def nil)) (ert-deftest cl-lib-struct-accessors () (let ((x (make-mystruct :abc 1 :def 2))) @@ -220,6 +221,11 @@ (`((cl-tag-slot) (abc 5 :readonly t) (def . ,(or `nil `(nil)))) t))))) +(ert-deftest cl-lib-struct-constructors () + (should (equal (documentation 'cl-lib--con-2 t) + "Constructor docstring.")) + (should (mystruct-p (cl-lib--con-1))) + (should (mystruct-p (cl-lib--con-2)))) (ert-deftest cl-lib-arglist-performance () ;; An `&aux' should not cause lambda's arglist to be turned into an &rest commit e21e3b6ba9a33fde2ba951f7b7e38da387186ae5 Author: Mihai Olteanu Date: Sat Nov 7 14:35:10 2015 +0200 Update doc string of hexl-mode * lisp/hexl.el (hexl-mode): Doc fix. (Bug#21800) Copyright-paperwork-exempt: yes diff --git a/lisp/hexl.el b/lisp/hexl.el index 499253e..20a48bc 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -294,7 +294,7 @@ in hexl format. A sample format: - HEX ADDR: 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f ASCII-TEXT + HEX ADDR: 0011 2233 4455 6677 8899 aabb ccdd eeff ASCII-TEXT -------- ---- ---- ---- ---- ---- ---- ---- ---- ---------------- 00000000: 5468 6973 2069 7320 6865 786c 2d6d 6f64 This is hexl-mod 00000010: 652e 2020 4561 6368 206c 696e 6520 7265 e. Each line re commit bede518c38db805ab9ac4b86f570ca9bff79a783 Author: Eli Zaretskii Date: Sat Nov 7 13:32:33 2015 +0200 Fix error in copy-abbrev-table * lisp/abbrev.el (define-abbrev): Don't erase the :abbrev-table-modiff property of the abbrev-table. (Bug#21828) * test/automated/abbrev-tests.el: New file. diff --git a/lisp/abbrev.el b/lisp/abbrev.el index f372a28..bd1650b 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -87,6 +87,7 @@ be replaced by its expansion." "Make a new abbrev-table with the same abbrevs as TABLE. Does not copy property lists." (let ((new-table (make-abbrev-table))) + (message "modif: %s" (abbrev-table-get new-table :abbrev-table-modiff)) (mapatoms (lambda (symbol) (define-abbrev new-table @@ -580,6 +581,8 @@ An obsolete but still supported calling form is: ,@(if (cadr props) (list :system (cadr props)))))) (unless (plist-get props :count) (setq props (plist-put props :count 0))) + (setq props (plist-put props :abbrev-table-modiff + (abbrev-table-get table :abbrev-table-modiff))) (let ((system-flag (plist-get props :system)) (sym (intern name table))) ;; Don't override a prior user-defined abbrev with a system abbrev, diff --git a/test/automated/abbrev-tests.el b/test/automated/abbrev-tests.el new file mode 100644 index 0000000..da77f61 --- /dev/null +++ b/test/automated/abbrev-tests.el @@ -0,0 +1,43 @@ +;;; abbrev-tests.el --- Test suite for abbrevs. + +;; Copyright (C) 2015 Free Software Foundation, Inc. + +;; Author: Eli Zaretskii +;; Keywords: abbrevs + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(require 'ert) +(require 'abbrev) + +(ert-deftest copy-abbrev-table-test () + (defvar foo-abbrev-table nil) ; Avoid compiler warning + (define-abbrev-table 'foo-abbrev-table + '()) + (should (abbrev-table-p foo-abbrev-table)) + ;; Bug 21828 + (let ((new-foo-abbrev-table + (condition-case nil + (copy-abbrev-table foo-abbrev-table) + (error nil)))) + (should (abbrev-table-p new-foo-abbrev-table))) + (should-not (string-equal (buffer-name) "*Backtrace*"))) + +(provide 'abbrev-tests) + +;;; add-log-tests.el ends here commit b29be628889c4bdec24f14a3352848d559446a70 Author: Michael Albinus Date: Sat Nov 7 11:05:03 2015 +0100 Add test to auto-revert-tests.el for Bug#21841 * test/automated/auto-revert-tests.el (auto-revert-test01-auto-revert-several-files): New test. (auto-revert-test02-auto-revert-tail-mode) (auto-revert-test03-auto-revert-mode-dired): Rename them. diff --git a/test/automated/auto-revert-tests.el b/test/automated/auto-revert-tests.el index 7cabc5c..2745f10 100644 --- a/test/automated/auto-revert-tests.el +++ b/test/automated/auto-revert-tests.el @@ -89,7 +89,71 @@ (kill-buffer buf)) (ignore-errors (delete-file tmpfile))))) -(ert-deftest auto-revert-test01-auto-revert-tail-mode () +;; This is inspired by Bug#21841. +(ert-deftest auto-revert-test01-auto-revert-several-files () + "Check autorevert for several files at once." + (skip-unless (executable-find "cp")) + + (let* ((cp (executable-find "cp")) + (tmpdir1 (make-temp-file "auto-revert-test" 'dir)) + (tmpdir2 (make-temp-file "auto-revert-test" 'dir)) + (tmpfile1 + (make-temp-file (expand-file-name "auto-revert-test" tmpdir1))) + (tmpfile2 + (make-temp-file (expand-file-name "auto-revert-test" tmpdir1))) + buf1 buf2) + (unwind-protect + (progn + (with-current-buffer (get-buffer-create "*Messages*") + (narrow-to-region (point-max) (point-max))) + (write-region "any text" nil tmpfile1 nil 'no-message) + (setq buf1 (find-file-noselect tmpfile1)) + (write-region "any text" nil tmpfile2 nil 'no-message) + (setq buf2 (find-file-noselect tmpfile2)) + + (dolist (buf (list buf1 buf2)) + (with-current-buffer buf + (should (string-equal (buffer-string) "any text")) + ;; `buffer-stale--default-function' checks for + ;; `verify-visited-file-modtime'. We must ensure that + ;; it returns nil. + (sleep-for 1) + (auto-revert-mode 1) + (should auto-revert-mode))) + + ;; Modify files. We wait for a second, in order to have + ;; another timestamp. + (sleep-for 1) + (write-region + "another text" nil + (expand-file-name (file-name-nondirectory tmpfile1) tmpdir2) + nil 'no-message) + (write-region + "another text" nil + (expand-file-name (file-name-nondirectory tmpfile2) tmpdir2) + nil 'no-message) + ;;(copy-directory tmpdir2 tmpdir1 nil 'copy-contents) + ;; Strange, that `copy-directory' does not work as expected. + ;; The following shell command is not portable on all + ;; platforms, unfortunately. + (shell-command (format "%s -f %s/* %s" cp tmpdir2 tmpdir1)) + + ;; Check, that the buffers have been reverted. + (dolist (buf (list buf1 buf2)) + (with-current-buffer buf + (auto-revert--wait-for-revert buf) + (should (string-match "another text" (buffer-string)))))) + + ;; Exit. + (with-current-buffer "*Messages*" (widen)) + (ignore-errors + (dolist (buf (list buf1 buf2)) + (with-current-buffer buf (set-buffer-modified-p nil)) + (kill-buffer buf))) + (ignore-errors (delete-directory tmpdir1 'recursive)) + (ignore-errors (delete-directory tmpdir2 'recursive))))) + +(ert-deftest auto-revert-test02-auto-revert-tail-mode () "Check autorevert tail mode." ;; `auto-revert-buffers' runs every 5". And we must wait, until the ;; file has been reverted. @@ -127,7 +191,7 @@ (ignore-errors (kill-buffer buf)) (ignore-errors (delete-file tmpfile))))) -(ert-deftest auto-revert-test02-auto-revert-mode-dired () +(ert-deftest auto-revert-test03-auto-revert-mode-dired () "Check autorevert for dired." ;; `auto-revert-buffers' runs every 5". And we must wait, until the ;; file has been reverted. commit 07178f43e16dc343c67bf9525fbccf049b1aedba Author: Martin Rudalics Date: Sat Nov 7 09:19:03 2015 +0100 * doc/lispref/windows.texi (Coordinates and Windows): Fix typo. diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 1da2d1c..357247e 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -3899,7 +3899,7 @@ visible in some window: @group (let ((edges (window-absolute-body-pixel-edges)) (position (pos-visible-in-window-p nil nil t))) - (x-set-mouse-absolute-pixel-position + (set-mouse-absolute-pixel-position (+ (nth 0 edges) (nth 0 position)) (+ (nth 1 edges) (nth 1 position)))) @end group commit e5a98644f8afd29bc105270bacb09fe9044957c4 Author: Martin Rudalics Date: Sat Nov 7 08:51:28 2015 +0100 In x_consider_frame_title don't set title of tooltip frames * src/xdisp.c (x_consider_frame_title): Return immediately for tooltip frames to avoid displaying empty tooltips. diff --git a/src/xdisp.c b/src/xdisp.c index f6d63ea..dbc2d84 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -11551,9 +11551,10 @@ x_consider_frame_title (Lisp_Object frame) { struct frame *f = XFRAME (frame); - if (FRAME_WINDOW_P (f) - || FRAME_MINIBUF_ONLY_P (f) - || f->explicit_name) + if ((FRAME_WINDOW_P (f) + || FRAME_MINIBUF_ONLY_P (f) + || f->explicit_name) + && NILP (Fframe_parameter (frame, Qtooltip))) { /* Do we have more than one visible frame on this X display? */ Lisp_Object tail, other_frame, fmt; commit 60959975b1b44ad9c4a4019a0a203c8a3bf08fd3 Author: Anders Lindgren Date: Fri Nov 6 22:39:02 2015 +0100 Fixed NextStep fullscreen problem (bug#21770). * nsterm.m (ns_constrain_all_frames): Don't constrain fullscreen frames. diff --git a/src/nsterm.m b/src/nsterm.m index 4f97276..b4ec553 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -839,6 +839,9 @@ static NSRect constrain_frame_rect(NSRect frameRect) static void ns_constrain_all_frames (void) +/* -------------------------------------------------------------------------- + Ensure that the menu bar doesn't cover any frames. + -------------------------------------------------------------------------- */ { Lisp_Object tail, frame; @@ -851,10 +854,14 @@ ns_constrain_all_frames (void) struct frame *f = XFRAME (frame); if (FRAME_NS_P (f)) { - NSView *view = FRAME_NS_VIEW (f); + EmacsView *view = FRAME_NS_VIEW (f); - [[view window] setFrame:constrain_frame_rect([[view window] frame]) - display:NO]; + if (![view isFullscreen]) + { + [[view window] + setFrame:constrain_frame_rect([[view window] frame]) + display:NO]; + } } } @@ -862,10 +869,11 @@ ns_constrain_all_frames (void) } -/* Show or hide the menu bar, based on user setting. */ - static void ns_update_auto_hide_menu_bar (void) +/* -------------------------------------------------------------------------- + Show or hide the menu bar, based on user setting. + -------------------------------------------------------------------------- */ { #ifdef NS_IMPL_COCOA NSTRACE ("ns_update_auto_hide_menu_bar"); commit 19e09cfab61436cb4590303871a31ee07624f5ab Author: Eli Zaretskii Date: Fri Nov 6 21:21:52 2015 +0200 Ensure redisplay after evaluation * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Revert last change. * lisp/frame.el (redisplay--variables): Populate the redisplay--variables list. * src/xdisp.c (maybe_set_redisplay): New function. (syms_of_xdisp) : New variable. * src/window.h (maybe_set_redisplay): Declare prototype. * src/data.c (set_internal): Call maybe_set_redisplay. (Bug#21835) diff --git a/lisp/frame.el b/lisp/frame.el index f550851..4b23cb2 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -2231,6 +2231,13 @@ See also `toggle-frame-maximized'." (make-obsolete-variable 'window-system-version "it does not give useful information." "24.3") +;; These variables should trigger redisplay of the current buffer. +(setq redisplay--variables + '(line-spacing + overline-margin + line-prefix + wrap-prefix)) + (provide 'frame) ;;; frame.el ends here diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index daf5e41..8ea17b7 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1116,17 +1116,9 @@ include additional formats for integers \(octal, hexadecimal, and character)." (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t))) ;; Setup the lexical environment if lexical-binding is enabled. - (prog1 - (elisp--eval-last-sexp-print-value - (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding) - eval-last-sexp-arg-internal) - ;; If we are going to display the result in the echo area, force - ;; a more thorough redisplay, in case the sexp we evaluated - ;; changes something that should affect the display of the - ;; current window. Otherwise, Emacs might decide that only the - ;; echo area needs to be redisplayed. - (if (eq standard-output t) - (force-mode-line-update 'all))))) + (elisp--eval-last-sexp-print-value + (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding) + eval-last-sexp-arg-internal))) (defun elisp--eval-last-sexp-print-value (value &optional eval-last-sexp-arg-internal) (let ((unabbreviated (let ((print-length nil) (print-level nil)) diff --git a/src/data.c b/src/data.c index 5382b01..4db93f5 100644 --- a/src/data.c +++ b/src/data.c @@ -1240,6 +1240,7 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, return; } + maybe_set_redisplay (symbol); sym = XSYMBOL (symbol); start: diff --git a/src/window.h b/src/window.h index eaff57e..135f5de 100644 --- a/src/window.h +++ b/src/window.h @@ -1056,6 +1056,7 @@ extern void wset_redisplay (struct window *w); extern void fset_redisplay (struct frame *f); extern void bset_redisplay (struct buffer *b); extern void bset_update_mode_line (struct buffer *b); +extern void maybe_set_redisplay (Lisp_Object); /* Call this to tell redisplay to look for other windows than selected-window that need to be redisplayed. Calling one of the *set_redisplay functions above already does it, so it's only needed in unusual cases. */ diff --git a/src/xdisp.c b/src/xdisp.c index bdf2d09..f6d63ea 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -620,6 +620,16 @@ bset_update_mode_line (struct buffer *b) b->text->redisplay = true; } +void +maybe_set_redisplay (Lisp_Object symbol) +{ + if (!NILP (Fassoc_string (symbol, Vredisplay__variables, Qnil))) + { + bset_update_mode_line (current_buffer); + current_buffer->prevent_redisplay_optimizations_p = true; + } +} + #ifdef GLYPH_DEBUG /* True means print traces of redisplay if compiled with @@ -31465,6 +31475,10 @@ display table takes effect; in this case, Emacs does not consult DEFVAR_LISP ("redisplay--mode-lines-cause", Vredisplay__mode_lines_cause, doc: /* */); Vredisplay__mode_lines_cause = Fmake_hash_table (0, NULL); + + DEFVAR_LISP ("redisplay--variables", Vredisplay__variables, + doc: /* A list of variables changes to which trigger a thorough redisplay. */); + Vredisplay__variables = Qnil; } commit 8025fdbbea6eaaa3e1290864fe2dc48e2201df48 Author: Artur Malabarba Date: Fri Nov 6 15:53:23 2015 +0000 * test/automated/subr-tests.el (subr-test-when): Fix again diff --git a/test/automated/subr-tests.el b/test/automated/subr-tests.el index e782f7b..ee8db59 100644 --- a/test/automated/subr-tests.el +++ b/test/automated/subr-tests.el @@ -96,7 +96,7 @@ (setq x (1+ x)) x)) (should (= x 1)) - (should (= 2 (when true + (should (= 2 (when t (setq x (1+ x)) x))) (should (= x 2))) commit 564d811725596f15ecf543777e11504b47d2af86 Author: Eli Zaretskii Date: Fri Nov 6 17:19:39 2015 +0200 Don't invoke overlay modification hooks in wrong buffer * src/buffer.c (report_overlay_modification): When called with AFTER non-zero, don't invoke overlay modification hooks if the buffer recorded in last_overlay_modification_hooks is different from the current buffer. (Bug#21824) diff --git a/src/buffer.c b/src/buffer.c index 91e42dc..c0179c7 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4481,6 +4481,23 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after, Lisp_Object *copy; ptrdiff_t i; + if (size) + { + Lisp_Object ovl + = XVECTOR (last_overlay_modification_hooks)->contents[1]; + + /* If the buffer of the first overlay in the array doesn't + match the current buffer, then these modification hooks + should not be run in this buffer. This could happen when + some code calls some insdel functions, such as del_range_1, + with the PREPARE argument false -- in that case this + function is never called to record the overlay modification + hook functions in the last_overlay_modification_hooks + array, so anything we find there is not ours. */ + if (XMARKER (OVERLAY_START (ovl))->buffer != current_buffer) + return; + } + USE_SAFE_ALLOCA; SAFE_ALLOCA_LISP (copy, size); memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents, commit 55ad7fce86b9a12f222587978ec0892d23273387 Author: Dmitry Gutov Date: Tue Nov 3 02:36:50 2015 +0200 Abolish temporary buffer management for xref * lisp/progmodes/xref.el (xref--temporary-buffers) (xref--current) (xref--inhibit-mark-current) (xref--mark-selected): Remove. Remove all references. (xref--show-xrefs): Do not construct the list of the temporary buffers, nor pass it along. diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 360d1ba..3aa85cb 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -414,20 +414,6 @@ WINDOW controls how the buffer is displayed: (defvar-local xref--display-history nil "List of pairs (BUFFER . WINDOW), for temporarily displayed buffers.") -(defvar-local xref--temporary-buffers nil - "List of buffers created by xref code.") - -(defvar-local xref--current nil - "Non-nil if this buffer was once current, except while displaying xrefs. -Used for temporary buffers.") - -(defvar xref--inhibit-mark-current nil) - -(defun xref--mark-selected () - (unless xref--inhibit-mark-current - (setq xref--current t)) - (remove-hook 'buffer-list-update-hook #'xref--mark-selected t)) - (defun xref--save-to-history (buf win) (let ((restore (window-parameter win 'quit-restore))) ;; Save the new entry if the window displayed another buffer @@ -449,15 +435,9 @@ Used for temporary buffers.") (defun xref--show-location (location) (condition-case err - (let ((bl (buffer-list)) - (xref--inhibit-mark-current t) - (marker (xref-location-marker location))) - (let ((buf (marker-buffer marker))) - (unless (memq buf bl) - ;; Newly created. - (add-hook 'buffer-list-update-hook #'xref--mark-selected nil t) - (push buf xref--temporary-buffers)) - (xref--display-position marker t buf))) + (let* ((marker (xref-location-marker location)) + (buf (marker-buffer marker))) + (xref--display-position marker t buf)) (user-error (message (error-message-string err))))) (defun xref-show-location-at-point () @@ -594,8 +574,7 @@ Used for temporary buffers.") (defun xref-quit (&optional kill) "Bury temporarily displayed buffers, then quit the current window. -If KILL is non-nil, kill all buffers that were created in the -process of showing xrefs, and also kill the current buffer. +If KILL is non-nil, also kill the current buffer. The buffers that the user has otherwise interacted with in the meantime are preserved." @@ -607,13 +586,6 @@ meantime are preserved." (when (and (window-live-p win) (eq buf (window-buffer win))) (quit-window nil win))) - (when kill - (let ((xref--inhibit-mark-current t) - kill-buffer-query-functions) - (dolist (buf xref--temporary-buffers) - (unless (buffer-local-value 'xref--current buf) - (kill-buffer buf))) - (setq xref--temporary-buffers nil))) (quit-window kill window))) (defconst xref-buffer-name "*xref*" @@ -687,10 +659,6 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (pop-to-buffer (current-buffer)) (goto-char (point-min)) (setq xref--window (assoc-default 'window alist)) - (setq xref--temporary-buffers (assoc-default 'temporary-buffers alist)) - (dolist (buf xref--temporary-buffers) - (with-current-buffer buf - (add-hook 'buffer-list-update-hook #'xref--mark-selected nil t))) (current-buffer))))) @@ -708,9 +676,7 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (defvar xref--read-pattern-history nil) (defun xref--show-xrefs (input kind arg window) - (let* ((bl (buffer-list)) - (xrefs (funcall xref-find-function kind arg)) - (tb (cl-set-difference (buffer-list) bl))) + (let* ((xrefs (funcall xref-find-function kind arg))) (cond ((null xrefs) (user-error "No %s found for: %s" (symbol-name kind) input)) @@ -720,8 +686,7 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (t (xref-push-marker-stack) (funcall xref-show-xrefs-function xrefs - `((window . ,window) - (temporary-buffers . ,tb))))))) + `((window . ,window))))))) (defun xref--prompt-p (command) (or (eq xref-prompt-for-identifier t) commit 977697203f7f063b2f26a9f25bff933e6c939765 Author: Dmitry Gutov Date: Tue Nov 3 02:11:45 2015 +0200 Rename "search path" to "library roots" * lisp/emacs-lisp/cl-seq.el (cl-set-difference): Retain the order of the elements from CL-LIST1. * test/automated/cl-lib-tests.el (cl-lib-test-set-functions): Update WRT to the above change. * lisp/progmodes/project.el (project-search-path-function): Rename to project-library-roots-function, update the documentation and references. (project-search-path): Likewise, to project-library-roots. (project-roots): Clarify documentation. (project-vc-search-path): Likewise, to project-vc-library-roots. (project-library-roots): In addition to the renames, thread the results through file-name-as-directory. (project-prune-directories): Accept a variable number of arguments. Rename to project-combine-directories. (project-subtract-directories): New function. * lisp/progmodes/elisp-mode.el (elisp--xref-find-references): Append project-roots and project-library-roots together. * lisp/progmodes/etags.el (etags--xref-find-references): Ditto. diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el index 3aea67a..5f0f088 100644 --- a/lisp/emacs-lisp/cl-seq.el +++ b/lisp/emacs-lisp/cl-seq.el @@ -849,7 +849,7 @@ to avoid corrupting the original LIST1 and LIST2. (memq (car cl-list1) cl-list2)) (push (car cl-list1) cl-res)) (pop cl-list1)) - cl-res)))) + (nreverse cl-res))))) ;;;###autoload (defun cl-nset-difference (cl-list1 cl-list2 &rest cl-keys) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index bdc304e..298c7a7 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -230,7 +230,7 @@ Blank lines separate paragraphs. Semicolons start comments. :group 'lisp (defvar xref-find-function) (defvar xref-identifier-completion-table-function) - (defvar project-search-path-function) + (defvar project-library-roots-function) (lisp-mode-variables nil nil 'elisp) (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) (setq-local electric-pair-text-pairs @@ -242,7 +242,7 @@ Blank lines separate paragraphs. Semicolons start comments. (setq-local xref-find-function #'elisp-xref-find) (setq-local xref-identifier-completion-table-function #'elisp--xref-identifier-completion-table) - (setq-local project-search-path-function #'elisp-search-path) + (setq-local project-library-roots-function #'elisp-library-roots) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil 'local)) @@ -801,7 +801,7 @@ non-nil result supercedes the xrefs produced by xrefs)) -(declare-function project-search-path "project") +(declare-function project-library-roots "project") (declare-function project-current "project") (defun elisp--xref-find-references (symbol) @@ -809,7 +809,10 @@ non-nil result supercedes the xrefs produced by (cl-mapcan (lambda (dir) (xref-collect-references symbol dir)) - (project-search-path (project-current)))) + (let ((pr (project-current))) + (append + (project-roots pr) + (project-library-roots pr))))) (defun elisp--xref-find-apropos (regexp) (apply #'nconc @@ -846,7 +849,7 @@ non-nil result supercedes the xrefs produced by (cl-defmethod xref-location-group ((l xref-elisp-location)) (xref-elisp-location-file l)) -(defun elisp-search-path () +(defun elisp-library-roots () (defvar package-user-dir) (cons package-user-dir load-path)) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 0d5fc3a..2d7537a 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -2098,7 +2098,10 @@ for \\[find-tag] (which see)." (cl-mapcan (lambda (dir) (xref-collect-references symbol dir)) - (project-search-path (project-current)))) + (let ((pr (project-current))) + (append + (project-roots pr) + (project-library-roots pr))))) (defun etags--xref-find-definitions (pattern &optional regexp?) ;; This emulates the behaviour of `find-tag-in-order' but instead of @@ -2154,7 +2157,7 @@ for \\[find-tag] (which see)." (with-slots (tag-info) l (nth 1 tag-info))) -(defun etags-search-path () +(defun etags-library-roots () (mapcar #'file-name-directory tags-table-list)) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 186840a..ba83120 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -23,7 +23,7 @@ ;; projects, and a number of public functions: finding the current ;; root, related project directories, search path, etc. ;; -;; The goal is to make it easy for Lisp programs to operate on the +;; The goal is to make it easier for Lisp programs to operate on the ;; current project, without having to know which package handles ;; detection of that project type, parsing its config files, etc. @@ -38,19 +38,33 @@ Each functions on this hook is called in turn with one argument (the directory) and should return either nil to mean that it is not applicable, or a project instance.") -(declare-function etags-search-path "etags" ()) - -(defvar project-search-path-function #'etags-search-path - "Function that returns a list of source root directories. +;; FIXME: Using the current approach, we don't have access to the +;; "library roots" of language A from buffers of language B, which +;; seems desirable in multi-language projects, at least for some +;; potential uses, like "jump to a file in project or library". +;; +;; We can add a second argument to this function: a file extension, or +;; a language name. Some projects will know the set of languages used +;; in them; for others, like VC-based projects, we'll need +;; auto-detection. I see two options: +;; +;; - That could be implemented as a separate second hook, with a +;; list of functions that return file extensions. +;; +;; - This variable will be turned into a hook with "append" semantics, +;; and each function in it will perform auto-detection when passed +;; nil instead of an actual file extension. Then this hook will, in +;; general, be modified globally, and not from major mode functions. +(defvar project-library-roots-function 'etags-library-roots + "Function that returns a list of library roots. -The directories in which we can recursively look for the -declarations or other references to the symbols used in the -current buffer. Depending on the language, it should include the -headers search path, load path, class path, or so on. +It should return a list of directories that contain source files +related to the current buffer. Depending on the language, it +should include the headers search path, load path, class path, +and so on. -The directory names should be absolute. This variable is -normally set by the major mode. Used in the default -implementation of `project-search-path'.") +The directory names should be absolute. Used in the default +implementation of `project-library-roots'.") ;;;###autoload (defun project-current (&optional dir) @@ -59,35 +73,39 @@ implementation of `project-search-path'.") (run-hook-with-args-until-success 'project-find-functions dir)) ;; FIXME: Add MODE argument, like in `ede-source-paths'? -(cl-defgeneric project-search-path (project) +(cl-defgeneric project-library-roots (project) "Return the list of source root directories. -Any directory roots where source (or header, etc) files used by -the current project may be found, inside or outside of the -current project tree(s). The directory names should be absolute. - -Unless it really knows better, a specialized implementation -should take into account the value returned by -`project-search-path-function' and call -`project-prune-directories' on the result." - (project-prune-directories - (append - ;; We don't know the project layout, like where the sources are, - ;; so we simply include the roots. - (project-roots project) - (funcall project-search-path-function)))) + +It's the list of directories outside of the current project that +contain related source files. + +Project-specific version of `project-library-roots-function', +which see. Unless it knows better, a specialized implementation +should use the value returned by that function." + (project-subtract-directories + (project-combine-directories + (funcall project-library-roots-function)) + (project-roots project))) (cl-defgeneric project-roots (project) - "Return the list of directory roots related to the current project. -It should include the current project root, as well as the roots -of any other currently open projects, if they're meant to be -edited together. The directory names should be absolute.") + "Return the list of directory roots belonging to the current project. + +Most often it's just one directory, which contains the project +file and everything else in the project. But in more advanced +configurations, a project can span multiple directories. + +The rule of tumb for whether to include a directory here, and not +in `project-library-roots', is whether its contents are meant to +be edited together with the rest of the project. + +The directory names should be absolute.") (cl-defgeneric project-ignores (_project _dir) "Return the list of glob patterns to ignore inside DIR. Patterns can match both regular files and directories. To root an entry, start it with `./'. To match directories only, -end it with `/'. DIR must be either one of `project-roots', or -an element of `project-search-path'." +end it with `/'. DIR must be one of `project-roots' or +`project-library-roots'." (require 'grep) (defvar grep-find-ignored-files) (nconc @@ -101,8 +119,8 @@ an element of `project-search-path'." "Project implementation using the VC package." :group 'tools) -(defcustom project-vc-search-path nil - "List ot directories to include in `project-search-path'. +(defcustom project-vc-library-roots nil + "List ot directories to include in `project-library-roots'. The file names can be absolute, or relative to the project root." :type '(repeat file) :safe 'listp) @@ -121,12 +139,12 @@ The file names can be absolute, or relative to the project root." (cl-defmethod project-roots ((project (head vc))) (list (cdr project))) -(cl-defmethod project-search-path ((project (head vc))) +(cl-defmethod project-library-roots ((project (head vc))) (append (let ((root (cdr project))) (mapcar - (lambda (dir) (expand-file-name dir root)) - (project--value-in-dir 'project-vc-search-path root))) + (lambda (dir) (file-name-as-directory (expand-file-name dir root))) + (project--value-in-dir 'project-vc-library-roots root))) (cl-call-next-method))) (cl-defmethod project-ignores ((project (head vc)) dir) @@ -150,13 +168,16 @@ The file names can be absolute, or relative to the project root." (cl-defmethod project-roots ((project (head user))) (list (cdr project))) -(defun project-prune-directories (dirs) - "Returns a copy of DIRS sorted, without subdirectories or non-existing ones." +(defun project-combine-directories (&rest lists-of-dirs) + "Return a sorted and culled list of directory names. +Appends the elements of LISTS-OF-DIRS together, removes +non-existing directories, as well as directories a parent of +whose is already in the list." (let* ((dirs (sort (mapcar (lambda (dir) (file-name-as-directory (expand-file-name dir))) - dirs) + (apply #'append lists-of-dirs)) #'string<)) (ref dirs)) ;; Delete subdirectories from the list. @@ -166,6 +187,12 @@ The file names can be absolute, or relative to the project root." (setq ref (cdr ref)))) (cl-delete-if-not #'file-exists-p dirs))) +(defun project-subtract-directories (files dirs) + "Return a list of elements from FILES that are outside of DIRS. +DIRS must contain directory names." + (cl-set-difference files dirs + :test (lambda (file dir) (string-prefix-p dir file)))) + (defun project--value-in-dir (var dir) (with-temp-buffer (setq default-directory dir) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index a222533..360d1ba 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -802,10 +802,9 @@ to search in, and the file name pattern to search for." (dirs (if current-prefix-arg (list (read-directory-name "Base directory: " nil default-directory t)) - (project-prune-directories - (append - (project-roots proj) - (project-search-path proj))))) + (append + (project-roots proj) + (project-library-roots proj)))) (xref-find-function (lambda (_kind regexp) (cl-mapcan diff --git a/test/automated/cl-lib-tests.el b/test/automated/cl-lib-tests.el index 1bdc6d7..d6e6bef 100644 --- a/test/automated/cl-lib-tests.el +++ b/test/automated/cl-lib-tests.el @@ -117,8 +117,8 @@ (should (equal (cl-set-difference b b) e)) ;; Note: this test (and others) is sensitive to the order of the ;; result, which is not documented. - (should (equal (cl-set-difference a b) (list c2 "x" "" nil 'a))) - (should (equal (cl-set-difference b a) (list 'x 'y))) + (should (equal (cl-set-difference a b) (list 'a nil "" "x" c2))) + (should (equal (cl-set-difference b a) (list 'y 'x))) ;; We aren't testing whether this is really using `eq' rather than `eql'. (should (equal (cl-set-difference e e :test 'eq) e)) @@ -128,8 +128,8 @@ (should (equal (cl-set-difference b e :test 'eq) b)) (should (equal (cl-set-difference e b :test 'eq) e)) (should (equal (cl-set-difference b b :test 'eq) e)) - (should (equal (cl-set-difference a b :test 'eq) (list c2 "x" "" nil 'a))) - (should (equal (cl-set-difference b a :test 'eq) (list 'x 'y))) + (should (equal (cl-set-difference a b :test 'eq) (list 'a nil "" "x" c2))) + (should (equal (cl-set-difference b a :test 'eq) (list 'y 'x))) (should (equal (cl-union e e) e)) (should (equal (cl-union a e) a)) commit 3172a6ac39d98383451e8b36cd33d291347fc93b Author: Juanma Barranquero Date: Fri Nov 6 14:06:29 2015 +0100 * admin/notes/repo: Fix a few obsolete references to Bazaar diff --git a/admin/notes/repo b/admin/notes/repo index b27a3f4..3ab3da7 100644 --- a/admin/notes/repo +++ b/admin/notes/repo @@ -41,8 +41,8 @@ preferable not to merge from master until you are done with the feature. Unless you really need some change that was done on the master while you were developing on the branch, you don't really need those merges; just merge once, when you are done with the feature, and -Bazaar will take care of the rest. Bazaar is much better in this than -CVS, so interim merges are unnecessary. +Git will take care of the rest. Git is much better in this than CVS, +so interim merges are unnecessary. Or use shelves; or rebase; or do something else. See the thread for yet another fun excursion into the exciting world of version control. commit 9b912623ad9032267106b134dd04e620c2b6c0a1 Author: Artur Malabarba Date: Fri Nov 6 11:18:23 2015 +0000 * test/automated/subr-tests.el (subr-test-when): Fix test diff --git a/test/automated/subr-tests.el b/test/automated/subr-tests.el index 85d5d11..e782f7b 100644 --- a/test/automated/subr-tests.el +++ b/test/automated/subr-tests.el @@ -91,8 +91,15 @@ (should (equal (when t 'x 2) 2)) (should (equal (when nil 'x 1) nil)) (should (equal (when nil 'x 2) nil)) - (should (equal (macroexpand-all '(when a b)) - '(if a b))) + (let ((x 1)) + (should-not (when nil + (setq x (1+ x)) + x)) + (should (= x 1)) + (should (= 2 (when true + (setq x (1+ x)) + x))) + (should (= x 2))) (should (equal (macroexpand-all '(when a b c d)) '(if a (progn b c d))))) commit 40014fe9fd59b3332b3bec20c6973ef324192b7a Author: Martin Rudalics Date: Fri Nov 6 12:15:18 2015 +0100 Avoid division by zero crash observed by Yuan MEI. See http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html. * src/dispnew.c (required_matrix_height, required_matrix_width): Avoid division by zero. * src/xterm.c (x_term_init): Init dpyinfo->smallest_font_height and dpyinfo->smallest_char_width to 1. diff --git a/src/dispnew.c b/src/dispnew.c index 9164076..1a822f0 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1694,7 +1694,8 @@ required_matrix_height (struct window *w) if (FRAME_WINDOW_P (f)) { - int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f); + /* http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html */ + int ch_height = max (FRAME_SMALLEST_FONT_HEIGHT (f), 1); int window_pixel_height = window_box_height (w) + eabs (w->vscroll); return (((window_pixel_height + ch_height - 1) @@ -1720,7 +1721,8 @@ required_matrix_width (struct window *w) struct frame *f = XFRAME (w->frame); if (FRAME_WINDOW_P (f)) { - int ch_width = FRAME_SMALLEST_CHAR_WIDTH (f); + /* http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html */ + int ch_width = max (FRAME_SMALLEST_CHAR_WIDTH (f), 1); /* Compute number of glyphs needed in a glyph row. */ return (((WINDOW_PIXEL_WIDTH (w) + ch_width - 1) diff --git a/src/xterm.c b/src/xterm.c index 691ad05..5e9c16b 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11963,6 +11963,10 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) dpyinfo->display = dpy; dpyinfo->connection = ConnectionNumber (dpyinfo->display); + /* http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html */ + dpyinfo->smallest_font_height = 1; + dpyinfo->smallest_char_width = 1; + /* Set the name of the terminal. */ terminal->name = xlispstrdup (display_name); commit 29c360ee1cb0ba68470d831739d4df33016fada1 Author: Eli Zaretskii Date: Fri Nov 6 11:28:46 2015 +0200 Ensure redisplay after "C-x C-e" * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Make sure redisplay happens to account for any side effects of the evaluated sexp. (Bug#21835) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index bdc304e..daf5e41 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1116,10 +1116,17 @@ include additional formats for integers \(octal, hexadecimal, and character)." (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t))) ;; Setup the lexical environment if lexical-binding is enabled. - (elisp--eval-last-sexp-print-value - (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding) - eval-last-sexp-arg-internal))) - + (prog1 + (elisp--eval-last-sexp-print-value + (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding) + eval-last-sexp-arg-internal) + ;; If we are going to display the result in the echo area, force + ;; a more thorough redisplay, in case the sexp we evaluated + ;; changes something that should affect the display of the + ;; current window. Otherwise, Emacs might decide that only the + ;; echo area needs to be redisplayed. + (if (eq standard-output t) + (force-mode-line-update 'all))))) (defun elisp--eval-last-sexp-print-value (value &optional eval-last-sexp-arg-internal) (let ((unabbreviated (let ((print-length nil) (print-level nil)) commit 2b316c0581181be173459cd791585ad7ecadfe8e Author: Eli Zaretskii Date: Fri Nov 6 10:56:59 2015 +0200 ; * CONTRIBUTE: Add section about the bug tracker * CONTRIBUTE: Move less important sections after the more important ones. Add section about the bug tracker. diff --git a/CONTRIBUTE b/CONTRIBUTE index 4d5d08a..0ca5d0d 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -201,48 +201,6 @@ then exclude that commit from the merge to trunk. ** Other process information -*** Non-ASCII characters in Emacs files - -If you introduce non-ASCII characters into Emacs source files, it is a -good idea to add a 'coding' cookie to the file to state its encoding. -Please use the UTF-8 encoding unless it cannot do the job for some -good reason. As of Emacs 24.4, it is no longer necessary to have -explicit 'coding' cookies in *.el files if they are encoded in UTF-8, -but other files need them even if encoded in UTF-8. However, if -an *.el file is intended for use with older Emacs versions (e.g. if -it's also distributed via ELPA), having an explicit encoding -specification is still a good idea. - -*** Useful files in the admin/ directory - -See all the files in admin/notes/* . In particular, see -admin/notes/newfile, see admin/notes/repo. - -The file admin/MAINTAINERS records the areas of interest of frequent -Emacs contributors. If you are making changes in one of the files -mentioned there, it is a good idea to consult the person who expressed -an interest in that file, and/or get his/her feedback for the changes. -If you are a frequent contributor and have interest in maintaining -specific files, please record those interests in that file, so that -others could be aware of that. - -*** git vs rename - -Git does not explicitly represent a file renaming; it uses a percent -changed heuristic to deduce that a file was renamed. So if you are -planning to make extensive changes to a file after renaming it (or -moving it to another directory), you should: - -- create a feature branch - -- commit the rename without any changes - -- make other changes - -- merge the feature branch to trunk, _not_ squashing the commits into - one. The commit message on this merge should summarize the renames - and all the changes. - ** Emacs Mailing lists. Discussion about Emacs development takes place on emacs-devel@gnu.org. @@ -260,6 +218,17 @@ packages the patch's commit message and changes. To send just one such patch without additional remarks, you can use a command like 'git send-email --to=bug-gnu-emacs@gnu.org 0001-DESCRIPTION.patch'. +** Issue tracker (a.k.a. "bug tracker") + +The Emacs issue tracker is at http://debbugs.gnu.org/. The form +presented by that page allows to view bug reports and search the +database for bugs matching several criteria. Messages posted to the +bug-gnu-emacs@gnu.org mailing list, mentioned above, are recorded by +the tracker with the corresponding bugs/issues. + +GNU ELPA has a 'debbugs' package that allows accessing the tracker +database from Emacs. + ** Document your changes. Any change that matters to end-users should have an entry in etc/NEWS. @@ -301,6 +270,48 @@ implementation in more detail. The file etc/DEBUG describes how to debug Emacs bugs. +*** Non-ASCII characters in Emacs files + +If you introduce non-ASCII characters into Emacs source files, it is a +good idea to add a 'coding' cookie to the file to state its encoding. +Please use the UTF-8 encoding unless it cannot do the job for some +good reason. As of Emacs 24.4, it is no longer necessary to have +explicit 'coding' cookies in *.el files if they are encoded in UTF-8, +but other files need them even if encoded in UTF-8. However, if +an *.el file is intended for use with older Emacs versions (e.g. if +it's also distributed via ELPA), having an explicit encoding +specification is still a good idea. + +*** Useful files in the admin/ directory + +See all the files in admin/notes/* . In particular, see +admin/notes/newfile, see admin/notes/repo. + +The file admin/MAINTAINERS records the areas of interest of frequent +Emacs contributors. If you are making changes in one of the files +mentioned there, it is a good idea to consult the person who expressed +an interest in that file, and/or get his/her feedback for the changes. +If you are a frequent contributor and have interest in maintaining +specific files, please record those interests in that file, so that +others could be aware of that. + +*** git vs rename + +Git does not explicitly represent a file renaming; it uses a percent +changed heuristic to deduce that a file was renamed. So if you are +planning to make extensive changes to a file after renaming it (or +moving it to another directory), you should: + +- create a feature branch + +- commit the rename without any changes + +- make other changes + +- merge the feature branch to trunk, _not_ squashing the commits into + one. The commit message on this merge should summarize the renames + and all the changes. + This file is part of GNU Emacs. commit f353f53b648784a6c6a4a23fbb575b9ac53d3ba6 Author: Michael Albinus Date: Fri Nov 6 07:33:50 2015 +0100 Skip some file notification tests for cygwin * test/automated/file-notify-tests.el (file-notify--test-with-events): Remove argument TIMEOUT. Adapt all callees. (file-notify-test02-events, file-notify-test04-file-validity): Skip for cygwin. (Bug#21804) diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index 964dc4a..67e929a 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el @@ -275,10 +275,10 @@ TIMEOUT is the maximum time to wait for, in seconds." (while (null ,until) (read-event nil nil 0.1)))) -(defmacro file-notify--test-with-events (timeout events &rest body) +(defmacro file-notify--test-with-events (events &rest body) "Run BODY collecting events and then compare with EVENTS. -Don't wait longer than TIMEOUT seconds for the events to be delivered." - (declare (indent 2)) +Don't wait longer than timeout seconds for the events to be delivered." + (declare (indent 1)) (let ((outer (make-symbol "outer"))) `(let ((,outer file-notify--test-events)) (setq file-notify--test-expected-events @@ -286,7 +286,8 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." (let (file-notify--test-events) ,@body (file-notify--wait-for-events - ,timeout (= (length ,events) (length file-notify--test-events))) + (file-notify--test-timeout) + (= (length ,events) (length file-notify--test-events))) (should (equal ,events (mapcar #'cadr file-notify--test-events))) (setq ,outer (append ,outer file-notify--test-events))) (setq file-notify--test-events ,outer)))) @@ -294,6 +295,8 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." (ert-deftest file-notify-test02-events () "Check file creation/change/removal notifications." (skip-unless (file-notify--test-local-enabled)) + ;; Under cygwin there are so bad timings that it doesn't make sense to test. + (skip-unless (not (eq system-type 'cygwin))) (setq file-notify--test-tmpfile (file-notify--test-make-temp-name) file-notify--test-tmpfile1 (file-notify--test-make-temp-name)) @@ -305,8 +308,7 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." (file-notify-add-watch file-notify--test-tmpfile '(change) 'file-notify--test-event-handler)) - (file-notify--test-with-events - (file-notify--test-timeout) '(created changed deleted) + (file-notify--test-with-events '(created changed deleted) (write-region "any text" nil file-notify--test-tmpfile nil 'no-message) (delete-file file-notify--test-tmpfile)) @@ -324,7 +326,6 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." file-notify--test-tmpfile '(change) 'file-notify--test-event-handler)) (file-notify--test-with-events - (file-notify--test-timeout) ;; There are two `deleted' events, for the file and for ;; the directory. '(created changed deleted deleted stopped) @@ -343,7 +344,6 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." '(change) 'file-notify--test-event-handler)) (should file-notify--test-desc) (file-notify--test-with-events - (file-notify--test-timeout) ;; w32notify does not distinguish between `changed' and ;; `attribute-changed'. (if (eq file-notify--library 'w32notify) @@ -368,8 +368,7 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." file-notify--test-tmpfile '(change) 'file-notify--test-event-handler)) (should file-notify--test-desc) - (file-notify--test-with-events - (file-notify--test-timeout) '(created changed renamed) + (file-notify--test-with-events '(created changed renamed) (write-region "any text" nil file-notify--test-tmpfile nil 'no-message) (rename-file file-notify--test-tmpfile file-notify--test-tmpfile1) @@ -386,7 +385,6 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." file-notify--test-tmpfile '(attribute-change) 'file-notify--test-event-handler)) (file-notify--test-with-events - (file-notify--test-timeout) (if (file-remote-p temporary-file-directory) ;; In the remote case, `write-region' raises also an ;; `attribute-changed' event. @@ -511,6 +509,8 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." (ert-deftest file-notify-test04-file-validity () "Check `file-notify-valid-p' for files." (skip-unless (file-notify--test-local-enabled)) + ;; Under cygwin there are so bad timings that it doesn't make sense to test. + (skip-unless (not (eq system-type 'cygwin))) (unwind-protect (progn @@ -519,8 +519,7 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." (file-notify-add-watch file-notify--test-tmpfile '(change) #'file-notify--test-event-handler)) - (file-notify--test-with-events - (file-notify--test-timeout) '(created changed deleted) + (file-notify--test-with-events '(created changed deleted) (should (file-notify-valid-p file-notify--test-desc)) (write-region "any text" nil file-notify--test-tmpfile nil 'no-message) @@ -547,8 +546,7 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." (file-notify-add-watch file-notify--test-tmpfile '(change) #'file-notify--test-event-handler)) - (file-notify--test-with-events - (file-notify--test-timeout) '(created changed deleted stopped) + (file-notify--test-with-events '(created changed deleted stopped) (should (file-notify-valid-p file-notify--test-desc)) (write-region "any text" nil file-notify--test-tmpfile nil 'no-message) @@ -624,6 +622,7 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." ;; TODO: ;; * For w32notify, no stopped events arrive when a directory is removed. +;; * Try to handle arriving events under cygwin reliably. (provide 'file-notify-tests) ;;; file-notify-tests.el ends here commit 267e0e80e1ad8c33c10ccaff77169a7aa759c163 Author: Stephen Leake Date: Fri Nov 6 05:14:45 2015 +0200 * lisp/progmodes/xref.el: require semantic/symref during compilation. diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 329bd9d..a222533 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -56,6 +56,9 @@ (require 'pcase) (require 'project) +(eval-when-compile + (require 'semantic/symref)) ;; for hit-lines slot + (defgroup xref nil "Cross-referencing commands" :group 'tools) commit ddd0eada666c48906341ef57e3385e5faf92989c Author: Daiki Ueno Date: Fri Nov 6 10:28:36 2015 +0900 Suppress redundant Pinentry startup messages * lisp/net/pinentry.el (pinentry-start): Add optional QUIET argument. * lisp/epg.el: Declare `pinentry-start'. (epg--start): Call `pinentry-start' with QUIET argument set. diff --git a/lisp/epg.el b/lisp/epg.el index aa79c7d..71a83c3 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -551,6 +551,8 @@ callback data (if any)." (defun epg-errors-to-string (errors) (mapconcat #'epg-error-to-string errors "; ")) +(declare-function pinentry-start "pinentry" (&optional quiet)) + (defun epg--start (context args) "Start `epg-gpg-program' in a subprocess with given ARGS." (if (and (epg-context-process context) @@ -614,7 +616,7 @@ callback data (if any)." (re-search-forward "^allow-emacs-pinentry:\\(?:.*:\\)\\{8\\}1" nil t)))) - (pinentry-start)) + (pinentry-start 'quiet)) (setq process-environment (cons (format "INSIDE_EMACS=%s,epg" emacs-version) process-environment)) diff --git a/lisp/net/pinentry.el b/lisp/net/pinentry.el index eaa9fa4..0037006 100644 --- a/lisp/net/pinentry.el +++ b/lisp/net/pinentry.el @@ -151,16 +151,20 @@ If local sockets are not supported, this is nil.") (apply query-function (concat desc "\n" prompt) query-args)))) ;;;###autoload -(defun pinentry-start () +(defun pinentry-start (&optional quiet) "Start a Pinentry service. Once the environment is properly set, subsequent invocations of -the gpg command will interact with Emacs for passphrase input." +the gpg command will interact with Emacs for passphrase input. + +If the optional QUIET argument is non-nil, messages at startup +will not be shown." (interactive) (unless (featurep 'make-network-process '(:family local)) (error "local sockets are not supported")) (if (process-live-p pinentry--server-process) - (message "Pinentry service is already running") + (unless quiet + (message "Pinentry service is already running")) (let* ((server-file (expand-file-name "pinentry" pinentry--socket-dir))) (server-ensure-safe-dir pinentry--socket-dir) ;; Delete the socket files made by previous server invocations. commit 8311d3929a4ebd1684f11e3e97c25b4152d40679 Author: Xue Fuqiao Date: Fri Nov 6 07:30:32 2015 +0800 * doc/emacs/ack.texi (Acknowledgments): Updates. diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index eebab8a..1c88e97 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi @@ -949,6 +949,14 @@ Jens Petersen wrote @file{find-func.el}, which makes it easy to find the source code for an Emacs Lisp function or variable. @item +Nicolas Petton wrote @file{map.el}, a library providing +map-manipulation functions that work on alists, hash-table and arrays; +@file{seq.el}, a library providing advanced sequence manipulation +functions and macros; and @file{thunk.el}, a library providing +functions and macros to delay the evaluation of forms. He also +created the new icon in Emacs 25. + +@item Daniel Pfeiffer wrote @file{conf-mode.el}, a mode for editing configuration files; @file{copyright.el}, a package for updating copyright notices in files; @file{executable.el}, a package for @@ -1341,15 +1349,16 @@ Rodney Whitby and Reto Zimmermann wrote @file{vhdl-mode.el}, a major mode for editing VHDL source code. @item -John Wiegley wrote @file{align.el}, a set of commands for aligning text -according to regular-expression based rules; @file{isearchb.el} for fast -buffer switching; @file{timeclock.el}, a package for keeping track of -time spent on projects; the Bahá'í calendar support; -@file{pcomplete.el}, a programmable completion facility; -@file{remember.el}, a mode for jotting down things to remember; -@file{eudcb-mab.el}, an address book backend for the Emacs Unified -Directory Client; and @code{eshell}, a command shell implemented -entirely in Emacs Lisp. He also contributed to Org mode (q.v.). +John Wiegley was the Emacs maintainer from Emacs 25 onwards. He wrote +@file{align.el}, a set of commands for aligning text according to +regular-expression based rules; @file{isearchb.el} for fast buffer +switching; @file{timeclock.el}, a package for keeping track of time +spent on projects; the Bahá'í calendar support; @file{pcomplete.el}, a +programmable completion facility; @file{remember.el}, a mode for +jotting down things to remember; @file{eudcb-mab.el}, an address book +backend for the Emacs Unified Directory Client; and @code{eshell}, a +command shell implemented entirely in Emacs Lisp. He also contributed +to Org mode (q.v.). @item Mike Williams wrote @file{thingatpt.el}, a library of functions for commit 7afaf0c0def0966722f7048cbb012c36fbfe48ac Author: Juanma Barranquero Date: Thu Nov 5 22:47:52 2015 +0100 * test/automated/elisp-mode-test.el: Silence some run-time warnings (xref-elisp-deftest): Bind `find-file-suppress-same-file-warnings' to t. diff --git a/test/automated/elisp-mode-tests.el b/test/automated/elisp-mode-tests.el index 1085b54..38c0b3b 100644 --- a/test/automated/elisp-mode-tests.el +++ b/test/automated/elisp-mode-tests.el @@ -208,8 +208,9 @@ to (xref-elisp-test-descr-to-target xref)." (declare (indent defun) (debug (symbolp "name"))) `(ert-deftest ,(intern (concat "xref-elisp-test-" (symbol-name name))) () - (xref-elisp-test-run ,computed-xrefs ,expected-xrefs) - )) + (let ((find-file-suppress-same-file-warnings t)) + (xref-elisp-test-run ,computed-xrefs ,expected-xrefs) + ))) ;; When tests are run from the Makefile, 'default-directory' is $HOME, ;; so we must provide this dir to expand-file-name in the expected commit ddb8069d9bf3d7a584d690e73c91b00454fe5ec1 Author: Tassilo Horn Date: Thu Nov 5 21:12:37 2015 +0100 Add prettify symbol for \times * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add prettification support for \times. diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 0b13759..c9d347d 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -3291,6 +3291,7 @@ There might be text before point." ("\\rightthreetimes" . ?⋌) ("\\risingdotseq" . ?≓) ("\\rtimes" . ?⋊) + ("\\times" . ?×) ("\\sbs" . ?﹨) ("\\searrow" . ?↘) ("\\setminus" . ?∖) commit 0880d5f6e1ad5006a022416cd21b974c7f5923b9 Author: Juanma Barranquero Date: Thu Nov 5 19:40:42 2015 +0100 * test/automated/process-tests.el: Skip tests when bash is not available (process-test-sentinel-accept-process-output) (process-test-sentinel-sit-for): skip-unless bash executable found. diff --git a/test/automated/process-tests.el b/test/automated/process-tests.el index 4a43a01..ee9e4f3 100644 --- a/test/automated/process-tests.el +++ b/test/automated/process-tests.el @@ -43,10 +43,12 @@ sentinel-called)) (ert-deftest process-test-sentinel-accept-process-output () + (skip-unless (executable-find "bash")) (should (process-test-sentinel-wait-function-working-p #'accept-process-output))) (ert-deftest process-test-sentinel-sit-for () + (skip-unless (executable-find "bash")) (should (process-test-sentinel-wait-function-working-p (lambda () (sit-for 0.01 t))))) commit 3be53aaed126e72be11a6743de6ddd51aaf96b63 Author: Eli Zaretskii Date: Thu Nov 5 20:12:19 2015 +0200 Add test for bug #21831 * test/automated/process-tests.el (start-process-should-not-modify-arguments): New test. (Bug#21831) Suggested by Nicolas Richard diff --git a/test/automated/process-tests.el b/test/automated/process-tests.el index 58a2de7..4a43a01 100644 --- a/test/automated/process-tests.el +++ b/test/automated/process-tests.el @@ -142,4 +142,22 @@ (should (equal "hello stderr!\n" (mapconcat #'identity (nreverse stderr-output) ""))))) +(ert-deftest start-process-should-not-modify-arguments () + "`start-process' must not modify its arguments in-place." + ;; See bug#21831. + (let* ((path (pcase system-type + ((or 'windows-nt 'ms-dos) + ;; Make sure the file name uses forward slashes. + ;; The original bug was that 'start-process' would + ;; convert forward slashes to backslashes. + (expand-file-name (executable-find "attrib.exe"))) + (_ "/bin//sh"))) + (samepath (copy-sequence path))) + ;; Make sure 'start-process' actually goes all the way and invokes + ;; the program. + (should (process-live-p (condition-case nil + (start-process "" nil path) + (error nil)))) + (should (equal path samepath)))) + (provide 'process-tests) commit 6540f6c58685c99a14ff73ac2e945733edc92608 Author: Glenn Morris Date: Thu Nov 5 06:17:56 2015 -0500 ; Auto-commit of loaddefs files. diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index 7011a30..dcaaab6 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el @@ -1101,7 +1101,7 @@ method invocation orders of the involved classes." (list eieio--generic-subclass-generalizer)) -;;;### (autoloads nil "eieio-compat" "eieio-compat.el" "bd51800d7de6429a2c9a6a600ba2dc52") +;;;### (autoloads nil "eieio-compat" "eieio-compat.el" "11dd361fd4c1c625de90a39977936236") ;;; Generated autoloads from eieio-compat.el (autoload 'eieio--defalias "eieio-compat" "\ commit c9def83b492391785270bc92baa621f244b99cff Author: Juanma Barranquero Date: Thu Nov 5 12:01:25 2015 +0100 ; * test/automated/elisp-mode-tests.el: Fix typo. diff --git a/test/automated/elisp-mode-tests.el b/test/automated/elisp-mode-tests.el index bd83f1a..1085b54 100644 --- a/test/automated/elisp-mode-tests.el +++ b/test/automated/elisp-mode-tests.el @@ -1,4 +1,4 @@ -d;;; elisp-mode-tests.el --- Tests for emacs-lisp-mode -*- lexical-binding: t; -*- +;;; elisp-mode-tests.el --- Tests for emacs-lisp-mode -*- lexical-binding: t; -*- ;; Copyright (C) 2015 Free Software Foundation, Inc. commit 54e2ed97bf904eda2ee5ae9b7822288e10b3abc5 Author: Stefan Monnier Date: Wed Nov 4 09:42:20 2015 -0500 * lisp/emacs-lisp/eieio-compat.el: Typo caught by tests (eieio--generic-static-object-generalizer): Fix typo. * test/automated/eieio-tests.el: Byte-compile it again. It looks like the underlying cause of bug#17852 was fixed in the mean time. diff --git a/lisp/emacs-lisp/eieio-compat.el b/lisp/emacs-lisp/eieio-compat.el index 638c475..06e65b9 100644 --- a/lisp/emacs-lisp/eieio-compat.el +++ b/lisp/emacs-lisp/eieio-compat.el @@ -143,7 +143,7 @@ Summary: ;; Give it a slightly higher priority than `class' so that the ;; interleaved list comes before the class's non-interleaved list. 51 #'cl--generic-struct-tag - (lambda (tag _targets) + (lambda (tag &rest _) (and (symbolp tag) (boundp tag) (setq tag (symbol-value tag)) (eieio--class-p tag) (let ((superclasses (eieio--class-precedence-list tag)) diff --git a/test/automated/eieio-tests.el b/test/automated/eieio-tests.el index 5709a1b..915532b 100644 --- a/test/automated/eieio-tests.el +++ b/test/automated/eieio-tests.el @@ -898,7 +898,3 @@ Subclasses to override slot attributes.") (provide 'eieio-tests) ;;; eieio-tests.el ends here - -;; Local Variables: -;; no-byte-compile: t -;; End: commit 39355bc045874874eb83cecdf2e2e04c3b81d3f7 Author: Artur Malabarba Date: Wed Nov 4 14:22:27 2015 +0000 Revert "* lisp/subr.el (when): Use `macroexp-progn'" This reverts commit 8e843831eaf271801836b7a3e4dd3b4fb0bb72b8. It breaks bootstrapping (duh). diff --git a/lisp/subr.el b/lisp/subr.el index 91647a6..ea926ae 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -179,7 +179,7 @@ value of last one, or nil if there are none. \(fn COND BODY...)" (declare (indent 1) (debug t)) - (list 'if cond (macroexp-progn body))) + (list 'if cond (cons 'progn body))) (defmacro unless (cond &rest body) "If COND yields nil, do BODY, else return nil. commit 2fef1fc823bc14957fa624e501dd3b739809d525 Author: Artur Malabarba Date: Wed Nov 4 13:00:04 2015 +0000 * lisp/files.el (report-errors): Obsolete (normal-mode, hack-local-variables, dir-locals-find-file): Use `with-demoted-errors' instead. diff --git a/lisp/files.el b/lisp/files.el index b25994c..9de9ac0 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2283,18 +2283,7 @@ unless NOMODES is non-nil." (view-mode-enter)) (run-hooks 'find-file-hook))) -(defmacro report-errors (format &rest body) - "Eval BODY and turn any error into a FORMAT message. -FORMAT can have a %s escape which will be replaced with the actual error. -If `debug-on-error' is set, errors are not caught, so that you can -debug them. -Avoid using a large BODY since it is duplicated." - (declare (debug t) (indent 1)) - `(if debug-on-error - (progn . ,body) - (condition-case err - (progn . ,body) - (error (message ,format (prin1-to-string err)))))) +(define-obsolete-function-alias 'report-errors 'with-demoted-errors "25.1") (defun normal-mode (&optional find-file) "Choose the major mode for this buffer automatically. @@ -2315,9 +2304,9 @@ in that case, this function acts as if `enable-local-variables' were t." (let ((enable-local-variables (or (not find-file) enable-local-variables))) ;; FIXME this is less efficient than it could be, since both ;; s-a-m and h-l-v may parse the same regions, looking for "mode:". - (report-errors "File mode specification error: %s" + (with-demoted-errors "File mode specification error: %s" (set-auto-mode)) - (report-errors "File local-variables error: %s" + (with-demoted-errors "File local-variables error: %s" (hack-local-variables))) ;; Turn font lock off and on, to make sure it takes account of ;; whatever file local variables are relevant to it. @@ -3316,7 +3305,7 @@ local variables, but directory-local variables may still be applied." result) (unless mode-only (setq file-local-variables-alist nil) - (report-errors "Directory-local variables error: %s" + (with-demoted-errors "Directory-local variables error: %s" ;; Note this is a no-op if enable-local-variables is nil. (hack-dir-local-variables))) ;; This entire function is basically a no-op if enable-local-variables commit 8e843831eaf271801836b7a3e4dd3b4fb0bb72b8 Author: Artur Malabarba Date: Wed Nov 4 12:54:53 2015 +0000 * lisp/subr.el (when): Use `macroexp-progn' * test/automated/subr-tests.el (subr-test-when): New test diff --git a/lisp/subr.el b/lisp/subr.el index ea926ae..91647a6 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -179,7 +179,7 @@ value of last one, or nil if there are none. \(fn COND BODY...)" (declare (indent 1) (debug t)) - (list 'if cond (cons 'progn body))) + (list 'if cond (macroexp-progn body))) (defmacro unless (cond &rest body) "If COND yields nil, do BODY, else return nil. diff --git a/test/automated/subr-tests.el b/test/automated/subr-tests.el index 28a423f..85d5d11 100644 --- a/test/automated/subr-tests.el +++ b/test/automated/subr-tests.el @@ -82,5 +82,19 @@ (should (string-greaterp 'acb 'abc)) (should (string-greaterp "acb" 'abc))) +(ert-deftest subr-test-when () + (should (equal (when t 1) 1)) + (should (equal (when t 2) 2)) + (should (equal (when nil 1) nil)) + (should (equal (when nil 2) nil)) + (should (equal (when t 'x 1) 1)) + (should (equal (when t 'x 2) 2)) + (should (equal (when nil 'x 1) nil)) + (should (equal (when nil 'x 2) nil)) + (should (equal (macroexpand-all '(when a b)) + '(if a b))) + (should (equal (macroexpand-all '(when a b c d)) + '(if a (progn b c d))))) + (provide 'subr-tests) ;;; subr-tests.el ends here commit 587b2328377c32950a7ccf89f7c0b7d95db873af Author: Juanma Barranquero Date: Wed Nov 4 10:07:25 2015 +0100 * lisp/progmodes/xref.el: Doc fixes (xref-make-file-location, xref-make-buffer-location, xref-make) (xref-make-bogus-location, xref-make-match): Add cross-references. (xref--insert-xrefs): Fix typo in docstring. diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 7eff1f1..329bd9d 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -92,7 +92,7 @@ This is typically the filename.") Line numbers start from 1 and columns from 0.") (defun xref-make-file-location (file line column) - "Create and return a new xref-file-location." + "Create and return a new `xref-file-location'." (make-instance 'xref-file-location :file file :line line :column column)) (cl-defmethod xref-location-marker ((l xref-file-location)) @@ -117,7 +117,7 @@ Line numbers start from 1 and columns from 0.") (position :type fixnum :initarg :position))) (defun xref-make-buffer-location (buffer position) - "Create and return a new xref-buffer-location." + "Create and return a new `xref-buffer-location'." (make-instance 'xref-buffer-location :buffer buffer :position position)) (cl-defmethod xref-location-marker ((l xref-buffer-location)) @@ -138,7 +138,7 @@ indicate errors, e.g. when we know that a function exists but the actual location is not known.") (defun xref-make-bogus-location (message) - "Create and return a new xref-bogus-location." + "Create and return a new `xref-bogus-location'." (make-instance 'xref-bogus-location :message message)) (cl-defmethod xref-location-marker ((l xref-bogus-location)) @@ -162,7 +162,7 @@ to the reference's target.")) somewhere.") (defun xref-make (summary location) - "Create and return a new xref item. + "Create and return a new `xref-item'. SUMMARY is a short string to describe the xref. LOCATION is an `xref-location'." (make-instance 'xref-item :summary summary :location location)) @@ -183,7 +183,7 @@ somewhere.") end-column))) (defun xref-make-match (summary end-column location) - "Create and return a new xref match item. + "Create and return a new `xref-match-item'. SUMMARY is a short string to describe the xref. END-COLUMN is the match end column number inside SUMMARY. LOCATION is an `xref-location'." @@ -633,7 +633,7 @@ meantime are preserved." (defun xref--insert-xrefs (xref-alist) "Insert XREF-ALIST in the current-buffer. -XREF-ALIST is of the form ((GROUP . (XREF ...)) ...). Where +XREF-ALIST is of the form ((GROUP . (XREF ...)) ...), where GROUP is a string for decoration purposes and XREF is an `xref-item' object." (require 'compile) ; For the compilation faces. commit 411b516d65b4e3b88e7b268dac7a32668e8d39c7 Author: Anders Lindgren Date: Wed Nov 4 06:50:19 2015 +0100 Render fringe bitmaps correctly on NextStep (bug#21301). The fringe bitmaps were inverted, the background was not transparent, the image data was horizontally mirrored, and periodic fringe bitmaps were not supported. * nsimage.m ([EmacsImage initFromXBM:width:height:fg:bg:]): When both background and foreground colors are 0, set the background alpha channel to 0 (making the background transparent). When copying the image data, do this from the most significant bit (leftmost) to the least (rightmost), to avoid mirroring. * nsterm.m (ns_draw_fringe_bitmap): Don't invert the image bits. Add support for periodic images (e.g. the empty line indicator). diff --git a/src/nsimage.m b/src/nsimage.m index e76a7db..bdaf6a4 100644 --- a/src/nsimage.m +++ b/src/nsimage.m @@ -202,10 +202,13 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) } +/* Create image from monochrome bitmap. If both FG and BG are 0 + (black), set the background to white and make it transparent. */ - initFromXBM: (unsigned char *)bits width: (int)w height: (int)h fg: (unsigned long)fg bg: (unsigned long)bg { unsigned char *planes[5]; + unsigned char bg_alpha = 0xff; [self initWithSize: NSMakeSize (w, h)]; @@ -219,7 +222,10 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) [bmRep getBitmapDataPlanes: planes]; if (fg == 0 && bg == 0) - bg = 0xffffff; + { + bg = 0xffffff; + bg_alpha = 0; + } { /* pull bits out to set the (bytewise) alpha mask */ @@ -244,21 +250,22 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) c = *s++; for (k = 0; i < w && k < 8; ++k, ++i) { - *alpha++ = 0xff; - if (c & 1) + if (c & 0x80) { *rr++ = fgr; *gg++ = fgg; *bb++ = fgb; + *alpha++ = 0xff; } else { *rr++ = bgr; *gg++ = bgg; *bb++ = bgb; + *alpha++ = bg_alpha; } idx++; - c >>= 1; + c <<= 1; } } } diff --git a/src/nsterm.m b/src/nsterm.m index 925e9af..4f97276 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2456,11 +2456,31 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, External (RIF); fringe-related -------------------------------------------------------------------------- */ { + /* Fringe bitmaps comes in two variants, normal and periodic. A + periodic bitmap is used to create a continuous pattern. Since a + bitmap is rendered one text line at a time, the start offset (dh) + of the bitmap varies. Concretely, this is used for the empty + line indicator. + + For a bitmap, "h + dh" is the full height and is always + invariant. For a normal bitmap "dh" is zero. + + For example, when the period is three and the full height is 72 + the following combinations exists: + + h=72 dh=0 + h=71 dh=1 + h=70 dh=2 */ + struct frame *f = XFRAME (WINDOW_FRAME (w)); struct face *face = p->face; static EmacsImage **bimgs = NULL; static int nBimgs = 0; + NSTRACE ("ns_draw_fringe_bitmap"); + NSTRACE_MSG ("which:%d cursor:%d overlay:%d width:%d height:%d period:%d", + p->which, p->cursor_p, p->overlay_p, p->wd, p->h, p->dh); + /* grow bimgs if needed */ if (nBimgs < max_used_fringe_bitmap) { @@ -2493,19 +2513,24 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, if (!img) { - unsigned short *bits = p->bits + p->dh; - int len = p->h; + // Note: For "periodic" images, allocate one EmacsImage for + // the base image, and use it for all dh:s. + unsigned short *bits = p->bits; + int full_height = p->h + p->dh; int i; - unsigned char *cbits = xmalloc (len); + unsigned char *cbits = xmalloc (full_height); - for (i = 0; i < len; i++) - cbits[i] = ~(bits[i] & 0xff); - img = [[EmacsImage alloc] initFromXBM: cbits width: 8 height: p->h + for (i = 0; i < full_height; i++) + cbits[i] = bits[i]; + img = [[EmacsImage alloc] initFromXBM: cbits width: 8 + height: full_height fg: 0 bg: 0]; bimgs[p->which - 1] = img; xfree (cbits); } + NSTRACE_RECT ("r", r); + NSRectClip (r); /* Since we composite the bitmap instead of just blitting it, we need to erase the whole background. */ @@ -2523,9 +2548,15 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, [img setXBMColor: bm_color]; } + // Note: For periodic images, the full image height is "h + hd". + // By using the height h, a suitable part of the image is used. + NSRect fromRect = NSMakeRect(0, 0, p->wd, p->h); + + NSTRACE_RECT ("fromRect", fromRect); + #ifdef NS_IMPL_COCOA [img drawInRect: r - fromRect: NSZeroRect + fromRect: fromRect operation: NSCompositeSourceOver fraction: 1.0 respectFlipped: YES commit 335cb1ee158db47003bda61a6cb077b62d04ca4f Author: Michael Heerdegen Date: Tue Nov 3 23:42:24 2015 +0100 * lisp/emacs-lisp/pcase.el (pcase): Tweak docstring. diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 8bcb447..bf6550d 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -107,7 +107,7 @@ ;;;###autoload (defmacro pcase (exp &rest cases) - "Perform ML-style pattern matching on EXP. + "Eval EXP and perform ML-style pattern matching on that value. CASES is a list of elements of the form (PATTERN CODE...). Patterns can take the following forms: @@ -115,7 +115,7 @@ Patterns can take the following forms: SYMBOL matches anything and binds it to SYMBOL. (or PAT...) matches if any of the patterns matches. (and PAT...) matches if all the patterns match. - \\='VAL matches if the object is `equal' to VAL + \\='VAL matches if the object is `equal' to VAL. ATOM is a shorthand for \\='ATOM. ATOM can be a keyword, an integer, or a string. (pred FUN) matches if FUN applied to the object returns non-nil. @@ -131,11 +131,11 @@ FUN can take the form which is the value being matched. So a FUN of the form SYMBOL is equivalent to one of the form (FUN). FUN can refer to variables bound earlier in the pattern. -FUN is assumed to be pure, i.e. it can be dropped if its result is not used, -and two identical calls can be merged into one. E.g. you can match pairs where the cdr is larger than the car with a pattern like \\=`(,a . ,(pred (< a))) or, with more checks: \\=`(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a)))) +FUN is assumed to be pure, i.e. it can be dropped if its result is not used, +and two identical calls can be merged into one. Additional patterns can be defined via `pcase-defmacro'. Currently, the following patterns are provided this way:" commit 5d1e2fec21dee5d7f81c774e3e30ce8c0c8e5176 Author: Nicolas Petton Date: Tue Nov 3 23:22:39 2015 +0100 * admin/MAINTAINERS: Add seq-tests.el, map-tests.el, and thunk-tests.el. diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index f32e27e..dc6c0d2 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -81,8 +81,11 @@ Simen Heggestøyl Nicolas Petton lisp/emacs-lisp/map.el + test/automated/map-tests.el lisp/emacs-lisp/seq.el + test/automated/seq-tests.el lisp/emacs-lisp/thunk.el + test/automated/thunk-tests.el The GNU AUCTeX maintainers (auctex-devel@gnu.org) RefTeX commit eb7e21bf388e485f38f119dab0b34262f5528e3b Author: Nicolas Petton Date: Tue Nov 3 23:20:56 2015 +0100 * admin/MAINTAINERS: Add thunk.el. diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index 3b863c7..f32e27e 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -82,6 +82,7 @@ Simen Heggestøyl Nicolas Petton lisp/emacs-lisp/map.el lisp/emacs-lisp/seq.el + lisp/emacs-lisp/thunk.el The GNU AUCTeX maintainers (auctex-devel@gnu.org) RefTeX commit fb711d7275a6c18bcc15cc17af6e20b23191ab40 Author: Jay Belanger Date: Tue Nov 3 16:16:54 2015 -0600 Change maintainer address. * lisp/calc/calc (calc-bug-address): Change address. diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index 322803b..3b863c7 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -46,12 +46,6 @@ Stefan Monnier minibuffer completion lisp/outline.el -Jay Belanger - Calc - lisp/calc/* - etc/calccard.tex - doc/misc/calc.texi - Bastien Guerry Org lisp/org/* diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index f4754c7..3cc9d69 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: Dave Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el index ebc5ba6..b163992 100644 --- a/lisp/calc/calc-alg.el +++ b/lisp/calc/calc-alg.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el index de27c56..12cc5d3 100644 --- a/lisp/calc/calc-arith.el +++ b/lisp/calc/calc-arith.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el index 9a1e524..b22aea1 100644 --- a/lisp/calc/calc-bin.el +++ b/lisp/calc/calc-bin.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el index 4e52a3b..5faa1a3 100644 --- a/lisp/calc/calc-comb.el +++ b/lisp/calc/calc-comb.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-cplx.el b/lisp/calc/calc-cplx.el index edcd3c2..1b99d56 100644 --- a/lisp/calc/calc-cplx.el +++ b/lisp/calc/calc-cplx.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index d0efe53..fe23408 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 9adf66f..6edc266 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-fin.el b/lisp/calc/calc-fin.el index 76c34e6..a31859d 100644 --- a/lisp/calc/calc-fin.el +++ b/lisp/calc/calc-fin.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 08fa5ce..63674a1 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-frac.el b/lisp/calc/calc-frac.el index 830bafe..ddf6762 100644 --- a/lisp/calc/calc-frac.el +++ b/lisp/calc/calc-frac.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-funcs.el b/lisp/calc/calc-funcs.el index 51922c8..b96cbd5 100644 --- a/lisp/calc/calc-funcs.el +++ b/lisp/calc/calc-funcs.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el index 20b0249..4ae6ec5 100644 --- a/lisp/calc/calc-graph.el +++ b/lisp/calc/calc-graph.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index 33cb1c1..36e09b9 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-incom.el b/lisp/calc/calc-incom.el index b2856b9..14de2ca 100644 --- a/lisp/calc/calc-incom.el +++ b/lisp/calc/calc-incom.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el index 18e900d..6980cd6 100644 --- a/lisp/calc/calc-keypd.el +++ b/lisp/calc/calc-keypd.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index 9436606..4b1c4f5 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el index 9730d30..e6bc2de 100644 --- a/lisp/calc/calc-macs.el +++ b/lisp/calc/calc-macs.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-map.el b/lisp/calc/calc-map.el index d2c9da8..9bf391a 100644 --- a/lisp/calc/calc-map.el +++ b/lisp/calc/calc-map.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index e7d073a..5e6c14a 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el index 8610090..4a3ad87 100644 --- a/lisp/calc/calc-menu.el +++ b/lisp/calc/calc-menu.el @@ -2,8 +2,6 @@ ;; Copyright (C) 2007-2015 Free Software Foundation, Inc. -;; Maintainer: Jay Belanger - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index aa0ccb7..6acda2b 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el index 3ed9612..6c986b2 100644 --- a/lisp/calc/calc-mode.el +++ b/lisp/calc/calc-mode.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-mtx.el b/lisp/calc/calc-mtx.el index b8c5ff9..75e33ca 100644 --- a/lisp/calc/calc-mtx.el +++ b/lisp/calc/calc-mtx.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-nlfit.el b/lisp/calc/calc-nlfit.el index 8e0eb73..41dc8f4 100644 --- a/lisp/calc/calc-nlfit.el +++ b/lisp/calc/calc-nlfit.el @@ -2,8 +2,6 @@ ;; Copyright (C) 2007-2015 Free Software Foundation, Inc. -;; Maintainer: Jay Belanger - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el index 1dab3c4..bd9a9f9 100644 --- a/lisp/calc/calc-poly.el +++ b/lisp/calc/calc-poly.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 8d97bc6..0d55823 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el index e57a6b4..4ab0f44 100644 --- a/lisp/calc/calc-rewr.el +++ b/lisp/calc/calc-rewr.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-rules.el b/lisp/calc/calc-rules.el index 4489f66..c4e2f2b 100644 --- a/lisp/calc/calc-rules.el +++ b/lisp/calc/calc-rules.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el index ec104ee..8130bae 100644 --- a/lisp/calc/calc-sel.el +++ b/lisp/calc/calc-sel.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-stat.el b/lisp/calc/calc-stat.el index a797db2..b9b8028 100644 --- a/lisp/calc/calc-stat.el +++ b/lisp/calc/calc-stat.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index 2684e62..fa2bf07 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el index 91ef259a..81be0b8 100644 --- a/lisp/calc/calc-stuff.el +++ b/lisp/calc/calc-stuff.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-trail.el b/lisp/calc/calc-trail.el index 9417f7f..441c122 100644 --- a/lisp/calc/calc-trail.el +++ b/lisp/calc/calc-trail.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-undo.el b/lisp/calc/calc-undo.el index 28c1679..6d4473c 100644 --- a/lisp/calc/calc-undo.el +++ b/lisp/calc/calc-undo.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index a450d8f..403f008 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el index cd15770..61bcb41 100644 --- a/lisp/calc/calc-vec.el +++ b/lisp/calc/calc-vec.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 5105ba9..37efadd 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index e44226d..07ea4fc 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; Keywords: convenience, extensions ;; This file is part of GNU Emacs. @@ -487,7 +486,7 @@ to be identified as that note." "Face used to show the selected portion of a formula." :group 'calc) -(defvar calc-bug-address "jay.p.belanger@gmail.com" +(defvar calc-bug-address "emacs-devel@gnu.org" "Address of the maintainer of Calc, for use by `report-calc-bug'.") (defvar calc-scan-for-dels t diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index 55064a3..23c972c 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el index 957f120..a9c8eef 100644 --- a/lisp/calc/calcalg3.el +++ b/lisp/calc/calcalg3.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index 119f419..81a035d 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calcsel2.el b/lisp/calc/calcsel2.el index ace2684..df86e2d 100644 --- a/lisp/calc/calcsel2.el +++ b/lisp/calc/calcsel2.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc. ;; Author: David Gillespie -;; Maintainer: Jay Belanger ;; This file is part of GNU Emacs. commit 7e9da9f70980b4b07777c27959035b3be10731ff Author: Michael Albinus Date: Tue Nov 3 18:33:25 2015 +0100 ; Shorten TODO list in file-notify-tests.el diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index d848f4b..964dc4a 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el @@ -623,7 +623,6 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." ;; TODO: -;; * It does not work yet for local gfilenotify. ;; * For w32notify, no stopped events arrive when a directory is removed. (provide 'file-notify-tests) commit 436ed2399ade5c41b8ed3cffe177fb5210eff574 Author: Michael Albinus Date: Tue Nov 3 18:17:53 2015 +0100 Fix a stupid error in gfilenotify.c. * src/gfilenotify.c (dir_monitor_callback): Cancel monitor only, if we've got a `deleted' signal AND the file name is the watched one. diff --git a/src/gfilenotify.c b/src/gfilenotify.c index 2057f88..8660f41 100644 --- a/src/gfilenotify.c +++ b/src/gfilenotify.c @@ -110,6 +110,7 @@ dir_monitor_callback (GFileMonitor *monitor, /* Cancel monitor if file or directory is deleted. */ if (!NILP (Fmember (symbol, list2 (Qdeleted, Qmoved))) && + (strcmp (name, SSDATA (XCAR (XCDR (watch_object)))) == 0) && !g_file_monitor_is_cancelled (monitor)) g_file_monitor_cancel (monitor); } commit fcfa23911dfb530c2fb5cdc81518127853c88f9a Author: Stephen Leake Date: Tue Nov 3 08:37:53 2015 -0600 Fix Bug#21816; case insensitive file system in elisp-mode-tests.el * test/automated/elisp-mode-tests.el (xref-elisp-test-run): Use case-insensitive string compare for file names. (emacs-test-dir): Add 'downcase' to cause case differences (at least on my system). diff --git a/test/automated/elisp-mode-tests.el b/test/automated/elisp-mode-tests.el index 2f6675a..bd83f1a 100644 --- a/test/automated/elisp-mode-tests.el +++ b/test/automated/elisp-mode-tests.el @@ -1,4 +1,4 @@ -;;; elisp-mode-tests.el --- Tests for emacs-lisp-mode -*- lexical-binding: t; -*- +d;;; elisp-mode-tests.el --- Tests for emacs-lisp-mode -*- lexical-binding: t; -*- ;; Copyright (C) 2015 Free Software Foundation, Inc. @@ -179,15 +179,23 @@ (defun xref-elisp-test-run (xrefs expected-xrefs) (should (= (length xrefs) (length expected-xrefs))) (while xrefs - (let ((xref (pop xrefs)) - (expected (pop expected-xrefs))) + (let* ((xref (pop xrefs)) + (expected (pop expected-xrefs)) + (expected-xref (or (when (consp expected) (car expected)) expected)) + (expected-source (when (consp expected) (cdr expected)))) - (should (equal xref - (or (when (consp expected) (car expected)) expected))) + ;; Downcase the filenames for case-insensitive file systems. + (setf (xref-elisp-location-file (oref xref location)) + (downcase (xref-elisp-location-file (oref xref location)))) + + (setf (xref-elisp-location-file (oref expected-xref location)) + (downcase (xref-elisp-location-file (oref expected-xref location)))) + + (should (equal xref expected-xref)) (xref--goto-location (xref-item-location xref)) (back-to-indentation) - (should (looking-at (or (when (consp expected) (cdr expected)) + (should (looking-at (or expected-source (xref-elisp-test-descr-to-target expected))))) )) @@ -207,7 +215,16 @@ to (xref-elisp-test-descr-to-target xref)." ;; so we must provide this dir to expand-file-name in the expected ;; results. This also allows running these tests from other ;; directories. -(defconst emacs-test-dir (file-name-directory (or load-file-name (buffer-file-name)))) +;; +;; We add 'downcase' here to deliberately cause a potential problem on +;; case-insensitive file systems. On such systems, `load-file-name' +;; may not have the same case as the real file system, since the user +;; can set `load-path' to have the wrong case (on my Windows system, +;; `load-path' has the correct case, so this causes the expected test +;; values to have the wrong case). This is handled in +;; `xref-elisp-test-run'. +(defconst emacs-test-dir (downcase (file-name-directory (or load-file-name (buffer-file-name))))) + ;; alphabetical by test name commit 7ad183d8905e7b15690b98d67ae0ae22d873bfa8 Author: Jackson Ray Hamilton Date: Mon Nov 2 21:14:05 2015 -0800 Fix ChangeLog.2 entry for js-jsx-mode diff --git a/ChangeLog.2 b/ChangeLog.2 index ddb2635..599a4c8 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -31,8 +31,16 @@ Add JSX indentation via js-jsx-mode (Bug#21799) * progmodes/js.el: Add JSX indentation support. + (js--jsx-end-tag-re) + (js--jsx-after-tag-re): New variables. + (js--jsx-find-before-tag) + (js--jsx-indented-element-p) + (js--as-sgml) + (js--expression-in-sgml-indent-line) (js-jsx-indent-line) (js-jsx-mode): New functions. + * test/indent/js-jsx.el: New file. + * etc/NEWS: Add information about js-jsx-mode. 2015-10-31 Michael Albinus commit 1cd0e89ab93b4e27d2b55332649558f044b6c6b5 Author: Juanma Barranquero Date: Mon Nov 2 18:08:52 2015 +0100 flymake-tests.el (warning-predicate-rx-gcc): Fix check. * test/automated/flymake-tests.el (warning-predicate-rx-gcc): Also check that "make" is available, not just "gcc". diff --git a/test/automated/flymake-tests.el b/test/automated/flymake-tests.el index a77c316..11231bc 100644 --- a/test/automated/flymake-tests.el +++ b/test/automated/flymake-tests.el @@ -50,7 +50,7 @@ (ert-deftest warning-predicate-rx-gcc () "Test GCC warning via regexp predicate." - (skip-unless (executable-find "gcc")) + (skip-unless (and (executable-find "gcc") (executable-find "make"))) (should (eq 'flymake-warnline (flymake-tests--current-face "test.c" "^[Ww]arning")))) commit a9cdc4a23c9ba93095cb6595972cbe2fde450e2c Author: Ken Brown Date: Mon Nov 2 11:22:51 2015 -0500 Document behavior of collation on Cygwin * test/automated/fns-tests.el (fns-tests-collate-sort): Mark as expected failure on Cygwin. * doc/lispref/strings.texi (Text Comparison): Document that punctuation and whitespace are not ignored for sorting on Cygwin. diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 143de82..f8685d9 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -584,8 +584,8 @@ determined by the lexicographic order of the characters contained in relations between these characters. Usually, it is defined by the @var{locale} environment Emacs is running with. -For example, punctuation and whitespace characters might be considered -less significant for @ref{Sorting,,sorting}. +For example, punctuation and whitespace characters might be ignored +for sorting (@pxref{Sequence Functions}): @example @group @@ -594,6 +594,9 @@ less significant for @ref{Sorting,,sorting}. @end group @end example +This behavior is system-dependent; punctuation and whitespace are +never ignored on Cygwin, regardless of locale. + The optional argument @var{locale}, a string, overrides the setting of your current locale identifier for collation. The value is system dependent; a @var{locale} @code{"en_US.UTF-8"} is applicable on POSIX diff --git a/test/automated/fns-tests.el b/test/automated/fns-tests.el index 7e9c1f1..b5222db 100644 --- a/test/automated/fns-tests.el +++ b/test/automated/fns-tests.el @@ -155,6 +155,8 @@ (9 . "aaa") (9 . "zzz") (9 . "ppp") (9 . "fff")]))) (ert-deftest fns-tests-collate-sort () + ;; See https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02505.html. + :expected-result (if (eq system-type 'cygwin) :failed :passed) (skip-unless (fns-tests--collate-enabled-p)) ;; Punctuation and whitespace characters are relevant for POSIX. commit 5401bb8645f955b6fde8c0a5e5c8cf5ec1cab626 Author: Dani Moncayo Date: Mon Nov 2 11:48:47 2015 +0100 * build-aux/msys-to-w32: Prevent double slashes in w32 path list. diff --git a/build-aux/msys-to-w32 b/build-aux/msys-to-w32 index f8a0a81..d30047f 100755 --- a/build-aux/msys-to-w32 +++ b/build-aux/msys-to-w32 @@ -96,7 +96,7 @@ do # translate the existing part and append the rest w32p=$(cd "${p1}" && pwd -W) remainder=${p#$p1} - w32p+=/${remainder#/} + w32p=${w32p%/}/${remainder#/} fi w32pathlist="${w32pathlist};${w32p}" commit ff80687aee5da42ff151df4e68f8dbcd2f8b2be3 Author: Glenn Morris Date: Sun Nov 1 18:25:42 2015 -0800 * lisp/progmodes/f90.el (f90-no-block-limit): Add associate. (Bug#21794) * test/automated/f90.el (f90-test-bug21794): New test. diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 5c938fd..0e333f1 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -1452,7 +1452,7 @@ if all else fails." (not (or (looking-at "end") (looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\ \\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\|\ -block\\|critical\\|enum\\)\\_>") +block\\|critical\\|enum\\|associate\\)\\_>") (looking-at "\\(program\\|\\(?:sub\\)?module\\|\ \\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\_>") (looking-at "\\(contains\\|\\(?:\\sw\\|\\s_\\)+[ \t]*:\\)") diff --git a/test/automated/f90.el b/test/automated/f90.el index c521d28..e429b21 100644 --- a/test/automated/f90.el +++ b/test/automated/f90.el @@ -240,4 +240,19 @@ end module modname") (forward-line -1) (should (= 2 (current-indentation))))) +(ert-deftest f90-test-bug21794 () + "Test for http://debbugs.gnu.org/21794 ." + (with-temp-buffer + (f90-mode) + (insert "program prog +do i=1,10 +associate (x => xa(i), y => ya(i)) +a(x,y,i) = fun(x,y,i) +end associate +end do +end program prog") + (f90-indent-subprogram) + (forward-line -2) + (should (= 5 (current-indentation))))) + ;;; f90.el ends here commit 3a769e173ebaaff768497dae9c430ac03aedeb94 Author: Juanma Barranquero Date: Sun Nov 1 00:22:13 2015 +0100 Fix incompatibility with TCC in test for bug#18745 * test/automated/process-tests.el (process-test-quoted-batfile): Remove spaces unrelated to the bug being tested. diff --git a/test/automated/process-tests.el b/test/automated/process-tests.el index 1dab615..58a2de7 100644 --- a/test/automated/process-tests.el +++ b/test/automated/process-tests.el @@ -61,15 +61,15 @@ ;; to force quoting. (setq batfile (make-temp-file "echo args" nil ".bat")) (with-temp-file batfile - (insert "@echo arg1 = %1, arg2 = %2\n")) + (insert "@echo arg1=%1, arg2=%2\n")) (with-temp-buffer (call-process batfile nil '(t t) t "x &y") - (should (string= (buffer-string) "arg1 = \"x &y\", arg2 = \n"))) + (should (string= (buffer-string) "arg1=\"x &y\", arg2=\n"))) (with-temp-buffer (call-process-shell-command (mapconcat #'shell-quote-argument (list batfile "x &y") " ") nil '(t t) t) - (should (string= (buffer-string) "arg1 = \"x &y\", arg2 = \n")))) + (should (string= (buffer-string) "arg1=\"x &y\", arg2=\n")))) (when batfile (delete-file batfile)))))) (ert-deftest process-test-stderr-buffer () commit bf9e3e7711c6256febd443765afe006bfa6dcf5f Author: Juanma Barranquero Date: Sun Nov 1 19:05:30 2015 +0100 ; ChangeLog.2 fixes diff --git a/ChangeLog.2 b/ChangeLog.2 index c8c231f..ddb2635 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -5,42 +5,30 @@ 2015-10-31 Juanma Barranquero Fix bug#21762 - * lisp/progmodes/python.el (python-syntax-closing-paren-p): Check with `eql' instead of `=' to accommodate the case that (syntax-after (point)) returns nil. - * test/automated/python-tests.el (python-indent-inside-paren-7): New test. 2015-10-31 Juanma Barranquero - * test/automated/python-tests.el: Avoid warnings - + * test/automated/python-tests.el: Avoid warnings. (python-tests-with-temp-buffer, python-tests-with-temp-file): Bind `python-indent-guess-indent-offset' to nil. - # Please enter the commit message for your changes. Lines starting - # with '#' will be ignored, and an empty message aborts the commit. - # On branch master - # Your branch is up-to-date with 'origin/master'. - # - # Changes to be committed: - # modified: test/automated/python-tests.el - # 2015-10-31 Juanma Barranquero - * src/alloc.c: Silence compiler warnings - + * src/alloc.c: Silence compiler warnings. (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): #ifdef DOUG_LEA_MALLOC. 2015-10-31 Jackson Ray Hamilton - * etc/NEWS: Fix js-jsx-mode entry punctuation + * etc/NEWS: Fix js-jsx-mode entry punctuation. 2015-10-31 Jackson Ray Hamilton - Add JSX indentation via js-jsx-mode. (Bug#21799) + Add JSX indentation via js-jsx-mode (Bug#21799) * progmodes/js.el: Add JSX indentation support. (js-jsx-indent-line) @@ -63,7 +51,7 @@ 2015-10-30 Paul Eggert - Merge from gnulib. + Merge from gnulib This incorporates: 2015-10-30 intprops: add WRAPV and const flavors for GCC 5 @@ -73,17 +61,14 @@ 2015-10-30 Eli Zaretskii - Fix a typo in a macro name - * src/w32proc.c (_NLSCMPERROR): Fix a typo in the name of this macro. (w32_compare_strings): Adjust for the correction. 2015-10-30 Michael Albinus - Add result messages in vc-tests.el - * test/automated/vc-tests.el (vc-test--state) - (vc-test--working-revision, vc-test--checkout-model): Add result messages. + (vc-test--working-revision, vc-test--checkout-model): + Add result messages. 2015-10-30 Artur Malabarba @@ -92,17 +77,15 @@ 2015-10-30 Artur Malabarba * lisp/faces.el (faces--attribute-at-point): Fix bug - introduced by previous commit. 2015-10-30 Artur Malabarba - * test/automated/faces-tests.el: New file + * test/automated/faces-tests.el: New file. 2015-10-30 Artur Malabarba - * lisp/faces.el: Refactor common code and fix a bug - + * lisp/faces.el: Refactor common code and fix a bug. (faces--attribute-at-point): New function. Fix a bug when the face at point is a list of faces and the desired attribute is not on the first one. @@ -110,18 +93,16 @@ 2015-10-30 Przemysław Wojnowski - * etc/tutorials/TUTORIAL.translators: Fix PL names + * etc/tutorials/TUTORIAL.translators: Fix PL names. 2015-10-30 Juanma Barranquero - * lisp/character-fold.el: Provide `character-fold' + * lisp/character-fold.el: Provide `character-fold'. 2015-10-30 Tassilo Horn - Add more faces for Gnus and ivy - - * etc/themes/tsdh-dark-theme.el (tsdh-dark): add more faces for Gnus and - ivy. + * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add more faces + for Gnus and ivy. 2015-10-30 Michael Albinus @@ -140,8 +121,7 @@ 2015-10-30 Artur Malabarba - * test/automated/sort-tests.el: New file - + * test/automated/sort-tests.el: New file. Tests in this file are randomly generated and then tested with regular, reverse, and case-fold sorting. @@ -155,13 +135,12 @@ 2015-10-30 Artur Malabarba - * lisp/isearch.el: Avoid an error that blocks isearch - + * lisp/isearch.el: Avoid an error that blocks isearch. (isearch-update): Don't error if `isearch--current-buffer' has been killed. - * test/automated/isearch-tests.el (isearch--test-update): New - file. + * test/automated/isearch-tests.el (isearch--test-update): + New file. 2015-10-30 Phil Sainty @@ -179,8 +158,7 @@ 2015-10-29 Stefan Monnier - * lisp/gnus/auth-source.el: Silence lexical-binding warnings - + * lisp/gnus/auth-source.el: Silence lexical-binding warnings. (auth-source-netrc-use-gpg-tokens): Simplify (symbol-value 'VAR) to just VAR. (auth-source-backend-parse): Use make-instance. @@ -212,14 +190,12 @@ 2015-10-29 Juri Linkov * lisp/dired.el (dired-unmark-all-files-query): Declare. - (dired-unmark-all-files): Let-bind it and use instead of ‘query’. (Bug#21746) 2015-10-29 Juri Linkov * lisp/ielm.el (ielm-indent-line): Use non-nil arg of comint-bol - to go to the beginning of text line instead of command line. http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02360.html @@ -232,8 +208,7 @@ 2015-10-29 Stefan Monnier - * lisp/emacs-lisp/cl-generic.el: Add (major-mode MODE) context - + * lisp/emacs-lisp/cl-generic.el: Add (major-mode MODE) context. (cl--generic-derived-specializers): New function. (cl--generic-derived-generalizer): New generalizer. (cl-generic-generalizers): New specializer (derived-mode MODE). @@ -273,15 +248,13 @@ 2015-10-29 Stefan Monnier - * lisp/emacs-lisp/smie.el: Use `declare' for `pure' - - (smie-precs->prec2, smie-merge-prec2s, smie-bnf->prec2, smie-prec2->grammar): - Use `declare'. + * lisp/emacs-lisp/smie.el: Use `declare' for `pure'. + (smie-precs->prec2, smie-merge-prec2s, smie-bnf->prec2) + (smie-prec2->grammar): Use `declare'. 2015-10-29 Stefan Monnier - * lisp/emacs-lisp/cl-generic.el: Accomodate future changes - + * lisp/emacs-lisp/cl-generic.el: Accomodate future changes. (cl--generic-generalizer): Add `name' field. (cl-generic-make-generalizer): Add corresponding `name' argument. (cl-generic-define-generalizer): New macro. @@ -298,12 +271,15 @@ (cl--generic-struct-tag, cl--generic-struct-specializers): Allow extra arguments. - * lisp/emacs-lisp/eieio-compat.el (eieio--generic-static-symbol-generalizer) - (eieio--generic-static-object-generalizer): Use cl-generic-define-generalizer. + * lisp/emacs-lisp/eieio-compat.el + (eieio--generic-static-symbol-generalizer) + (eieio--generic-static-object-generalizer): + Use cl-generic-define-generalizer. (eieio--generic-static-symbol-specializers): Allow extra arguments. * lisp/emacs-lisp/eieio-core.el (eieio--generic-generalizer) - (eieio--generic-subclass-generalizer): Use cl-generic-define-generalizer. + (eieio--generic-subclass-generalizer): + Use cl-generic-define-generalizer. (eieio--generic-subclass-specializers): Allow extra arguments. 2015-10-29 Stefan Monnier @@ -356,13 +332,13 @@ 2015-10-28 Artur Malabarba - * lisp/isearch.el: Delete some outdated comments + * lisp/isearch.el: Delete some outdated comments. 2015-10-28 Vibhav Pant Fix eshell/clear not working if the output has a small line count - * lisp/eshell/esh-mode.el: (eshell/clear): Use (window-size) as the + * lisp/eshell/esh-mode.el (eshell/clear): Use (window-size) as the number of newlines to be inserted. This fixes the issue where eshell/clear wouldn't work if the prompt was not at the bottom of the window, and the output wasn't too long. @@ -377,8 +353,7 @@ 2015-10-28 Stefan Monnier - * lisp/emacs-lisp/macroexp.el: Tweak macroexp-if optimizations - + * lisp/emacs-lisp/macroexp.el: Tweak macroexp-if optimizations. (macroexp-unprogn): Make sure we never return an empty list. (macroexp-if): Remove unused (and unsafe) optimization. Optimize (if A T (if B T E)) into (if (or A B) T E) instead, which does @@ -387,7 +362,6 @@ 2015-10-28 Juanma Barranquero Fix bug#21766 and add test - * lisp/simple.el (delete-trailing-whitespace): Save match data when calling `skip-syntax-backward'. * test/automated/simple-test.el (simple-delete-trailing-whitespace): @@ -395,7 +369,7 @@ 2015-10-28 Artur Malabarba - * doc/lispref/sequences.texi (Sequence Functions): Fix typo + * doc/lispref/sequences.texi (Sequence Functions): Fix typo. 2015-10-28 Paul Eggert @@ -404,19 +378,17 @@ 2015-10-28 Artur Malabarba * lisp/character-fold.el (character-fold-to-regexp): Fix case - where string ends in space 2015-10-28 Artur Malabarba - * lisp/emacs-lisp/seq.el (seq-mapn): New function + * lisp/emacs-lisp/seq.el (seq-mapn): New function. - * doc/lispref/sequences.texi (Sequence Functions): Document seq-mapn + * doc/lispref/sequences.texi (Sequence Functions): Document seq-mapn. 2015-10-28 Artur Malabarba - * lisp/character-fold.el: Make compatible with lax-whitespace - + * lisp/character-fold.el: Make compatible with lax-whitespace. (character-fold-to-regexp): Rework internals to play nice with lax-whitespacing. @@ -433,18 +405,16 @@ 2015-10-28 Artur Malabarba - * lisp/isearch.el: Refactor momentary messages - + * lisp/isearch.el: Refactor momentary messages. (isearch--momentary-message): New function. (isearch-toggle-lax-whitespace, isearch-toggle-case-fold) (isearch-toggle-invisible): Use it. 2015-10-28 Artur Malabarba - * lisp/isearch.el: Define all toggles with `isearch-define-mode-toggle' - + * lisp/isearch.el: Define all toggles with `isearch-define-mode-toggle'. (isearch-define-mode-toggle): New macro. - (isearch-toggle-invisible): Renamed to + (isearch-toggle-invisible): Rename to `isearch-define-mode-toggle'. (isearch-toggle-case-fold, isearch-toggle-invisible) (isearch-toggle-regexp, isearch-toggle-lax-whitespace): Define @@ -467,18 +437,16 @@ 2015-10-28 Michael Albinus - Revert 692bce5b9eccfae19ae2a5a23a9ccd8d6bf86076 - * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Revert 692bce5b9eccfae19ae2a5a23a9ccd8d6bf86076, `delete-dups' does not exist in XEmacs 21.4. 2015-10-28 Anders Lindgren - Fixed OS X startup crash. + Fixed OS X startup crash Input events started to arrive before ns_term_init() was finished. - Solved by blocking input. This also seems to correct the "You + Solved by blocking input. This also seems to correct the "You can't open the application "Emacs" because it may be damaged or incomplete" error issued when double-clicking on the Emacs application. @@ -492,8 +460,7 @@ 2015-10-28 Artur Malabarba - * src/process.c (Fget_buffer_process): Improve docstring - + * src/process.c (Fget_buffer_process): Improve docstring. Document the fact that it doesn't return dead processes. 2015-10-28 Anders Lindgren @@ -526,8 +493,8 @@ Prettify TeX macros not ending in a word char - * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p): Prettify - macros which don't end in a word character. + * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p): + Prettify macros which don't end in a word character. 2015-10-27 Dmitry Gutov @@ -540,15 +507,14 @@ 2015-10-27 Stefan Monnier - * lisp/net/tramp-smb.el: Avoid using `add-to-list' on a let-local var + * lisp/net/tramp-smb.el: Avoid using `add-to-list' on a let-local var. + (tramp-smb-handle-directory-files): Use `delete-dups'. - * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Use `delete-dups'. * lisp/net/tramp.el (auto-save-file-name-transforms): Declare. 2015-10-27 Stefan Monnier - * lisp/international/ccl.el: Use lexical-binding - + * lisp/international/ccl.el: Use lexical-binding. (ccl-compile-if): Remove unused var `false-ic'. (ccl-compile-write-repeat): Remove unused var `i'. (ccl-compile-map-single): Remove unused var `id'. @@ -557,18 +523,17 @@ 2015-10-27 Stefan Monnier - * lisp/json.el (json-new-object): Optimize trivial `list' call + * lisp/json.el (json-new-object): Optimize trivial `list' call. 2015-10-27 Stefan Monnier - * lisp/help.el: Fix bug with incorrect arglist string - - (help-add-fundoc-usage): Don't mistake a mis-formatted string for a list. + * lisp/help.el: Fix bug with incorrect arglist string. + (help-add-fundoc-usage): Don't mistake a mis-formatted string + for a list. 2015-10-27 Stefan Monnier - * lisp/gnus/gnus-topic.el: Silence some warnings - + * lisp/gnus/gnus-topic.el: Silence some warnings. (gnus-topic-prepare-topic): Remove unused var `topic'. (gnus-topic-remove-topic): Mark unused arg `hide'. (gnus-tmp-header): Declare. @@ -581,13 +546,13 @@ Minor CEDET fixes - * lisp/cedet/cedet-global.el (cedet-gnu-global-gtags-call): Handle - warnings from gtags about invalid options. + * lisp/cedet/cedet-global.el (cedet-gnu-global-gtags-call): + Handle warnings from gtags about invalid options. (cedet-gnu-global-create/update-database): Do incremental update properly. - * lisp/cedet/ede/generic.el (ede-enable-generic-projects): Get monotone - root right. + * lisp/cedet/ede/generic.el (ede-enable-generic-projects): + Get monotone root right. 2015-10-27 Michael Albinus @@ -610,7 +575,7 @@ 2015-10-27 Nicolas Petton - Use a plain svg file for the icon + Use a plain SVG file for the icon * etc/images/icons/hicolor/scalable/apps/emacs.svg: Use a plain SVG format instead of the Inkscape SVG format. @@ -629,18 +594,18 @@ * lisp/emacs-lisp/seq.el: Better docstrings. - * lisp/emacs-lisp/seq.el: Rename all seq argumentss to sequence. + * lisp/emacs-lisp/seq.el: Rename all seq arguments to sequence. 2015-10-26 Phillip Lord - * lisp/emacs-lisp/ert.el: Print results without newline escaping + * lisp/emacs-lisp/ert.el: Print results without newline escaping. 2015-10-26 Stephen Leake Clarify that load-path contents should be directory file names * doc/lispref/files.texi (Directory Names): Define and use "directory - file name". Recommend `expand-file-name'. + file name". Recommend `expand-file-name'. * src/lread.c (load-path): Fix doc string; elements are directory file names. @@ -649,14 +614,13 @@ Fix simple-test.el test - * test/automated/simple-test.el (simple-test--dummy-buffer): Make - sure indentation doesn't use TABs, otherwise the 6th test might - fail. + * test/automated/simple-test.el (simple-test--dummy-buffer): + Make sure indentation doesn't use TABs, otherwise the 6th test + might fail. 2015-10-26 Mark Oteiza * lisp/net/eww.el (eww-bookmark-prepare): Use truncate-string-to-width. - `substring' does not account for full width characters. 2015-10-26 Michael Albinus @@ -683,7 +647,7 @@ 2015-10-26 Artur Malabarba - * src/keyboard.c (post-command-hook): Shorten docstring + * src/keyboard.c (post-command-hook): Shorten docstring. 2015-10-26 Tassilo Horn @@ -694,42 +658,36 @@ 2015-10-25 Artur Malabarba - * lisp/isearch.el (search-default-regexp-mode): Revert to nil - + * lisp/isearch.el (search-default-regexp-mode): Revert to nil. Character-fold search _still_ doesn't play well with lax-whitespace. So disable it by default (again) for now. 2015-10-25 Artur Malabarba - * lisp/isearch.el: No visual feedback for default search mode - + * lisp/isearch.el: No visual feedback for default search mode. During an isearch where character-folding is the default, we don't want to take up minibuffer space just to tell the user that "Char-fold " is on. The same goes for other modes, if the user changes the default. In contrast, if the user toggles OFF the default mode, they should see "Literal", to distinguish it from the default mode. - (isearch--describe-regexp-mode): Return "" if describing the default mode, and return "literal " if describing a plain search and it is not default. 2015-10-25 Artur Malabarba - * test/automated/simple-test.el: New file - + * test/automated/simple-test.el: New file. Define tests for `newline' and `open-line'. 2015-10-25 Artur Malabarba - * lisp/simple.el (open-line): Integrate with electric-indent-mode - + * lisp/simple.el (open-line): Integrate with electric-indent-mode. Also run `post-self-insert-hook' when called interactively. 2015-10-25 Artur Malabarba - * lisp/simple.el (open-line): Fix docstring - + * lisp/simple.el (open-line): Fix docstring. Also explain apparently redundant line. 2015-10-25 Thomas Fitzsimmons @@ -737,111 +695,113 @@ Sync with soap-client repository, version 3.0.1 - * soap-client.el, soap-inspect.el: Bump version to 3.0.1. + * lisp/net/soap-client.el, lisp/net/soap-inspect.el: + Bump version to 3.0.1. - * soap-client.el, soap-inspect.el: Update home page. + * lisp/net/soap-client.el, lisp/net/soap-inspect.el: Update home page. - * soap-client.el, soap-inspect.el: Bump version to 3.0.0. + * lisp/net/soap-client.el, lisp/net/soap-inspect.el: + Bump version to 3.0.0. - * soap-inspect.el: Merge in changes from Emacs master branch. + * lisp/net/soap-inspect.el: Merge in changes from Emacs master branch. - * soap-client.el: Merge in changes from Emacs master branch. + * lisp/net/soap-client.el: Merge in changes from Emacs master branch. - * soap-inspect.el: Shorten first line description. + * lisp/net/soap-inspect.el: Shorten first line description. - * soap-client.el: Make a small whitespace fix. + * lisp/net/soap-client.el: Make a small whitespace fix. - * soap-inspect.el: Update copyright years. + * lisp/net/soap-inspect.el: Update copyright years. - * soap-client.el (soap-encoded-namespaces): Move above first use - in soap-encode-xs-element. + * lisp/net/soap-client.el (soap-encoded-namespaces): Move above + first use in soap-encode-xs-element. - * soap-client.el (soap-type-is-array?): new defun + * lisp/net/soap-client.el (soap-type-is-array?): new defun (soap-encode-xs-element): handle array elements in this function (soap-encode-xs-complex-type): flag error if asked to encode an array type, this is handled in `soap-encode-xs-element' - * soap-inspect.el (soap-inspect-xs-attribute-group): Do not print - type for attribute group. + * lisp/net/soap-inspect.el (soap-inspect-xs-attribute-group): + Do not print type for attribute group. - * soap-inspect.el (soap-sample-value-for-xs-attribute-group): New - function. + * lisp/net/soap-inspect.el (soap-sample-value-for-xs-attribute-group) + New function. (soap-inspect-xs-attribute-group): Likewise. - * soap-inspect.el + * lisp/net/soap-inspect.el (soap-resolve-references-for-xs-attribute-group): Resolve references of attributes in an attribute group. - * soap-client.el (soap-decode-xs-attributes): Process attribute + * lisp/net/soap-client.el (soap-decode-xs-attributes): Process attribute type directly, not through soap-wsdl-get. - * soap-client.el (soap-xs-parse-attribute): Leave reference nil if - reference attribute is nil. + * lisp/net/soap-client.el (soap-xs-parse-attribute): Leave reference + nil if reference attribute is nil. - * soap-client.el (soap-resolve-references-for-xs-attribute): + * lisp/net/soap-client.el (soap-resolve-references-for-xs-attribute): Convert XML schema attributes to xsd:string. - * soap-inspect.el (soap-sample-value-for-xs-attribute): New - function. - (soap-sample-value-for-xs-simple-type): Prepend attributes to - result. + * lisp/net/soap-inspect.el (soap-sample-value-for-xs-attribute): + New function. + (soap-sample-value-for-xs-simple-type): Prepend attributes to result. (soap-sample-value-for-xs-complex-type): Likewise. (soap-inspect-xs-attribute): New function. (soap-inspect-xs-simple-type): Print attributes. (soap-inspect-xs-complex-type): Likewise. - * soap-inspect.el (soap-resolve-references-for-xs-simple-type): + * lisp/net/soap-inspect.el (soap-resolve-references-for-xs-simple-type): Resolve references for attributes. (soap-resolve-references-for-xs-complex-type): Likewise. - * soap-client.el (soap-xml-node-find-matching-child): Rename from - soap-xml-node-first-child. + * lisp/net/soap-client.el (soap-xml-node-find-matching-child): + Rename from soap-xml-node-first-child. (soap-xs-parse-attribute): Call soap-xml-node-find-matching-child. (soap-xs-parse-simple-type): Likewise. - * soap-client.el (soap-invoke-async): Add error checking. + * lisp/net/soap-client.el (soap-invoke-async): Add error checking. - * soap-client.el (soap-invoke-internal): New function. + * lisp/net/soap-client.el (soap-invoke-internal): New function. (soap-invoke-async): Call soap-invoke-internal. (soap-invoke): Likewise. - * soap-client.el (soap-invoke-async): Ensure buffer passed to + * lisp/net/soap-client.el (soap-invoke-async): Ensure buffer passed to url-retrieve callback is killed. - * soap-client.el (soap-parse-wsdl-phase-validate-node): Rename - function. + * lisp/net/soap-client.el (soap-parse-wsdl-phase-validate-node): + Rename function. (soap-parse-wsdl-phase-fetch-imports): Likewise. (soap-parse-wsdl-phase-parse-schema): Likewise. (soap-parse-wsdl-phase-fetch-schema): Likewise. (soap-parse-wsdl-phase-finish-parsing): Likewise. (soap-parse-wsdl): Update calls. - * soap-client.el (soap-invoke-async): Fix callback invocation. + * lisp/net/soap-client.el (soap-invoke-async): Fix callback invocation. - * soap-client.el (soap-invoke-async): New function. + * lisp/net/soap-client.el (soap-invoke-async): New function. (soap-invoke): Reimplement using soap-invoke-async. - * soap-client.el (soap-parse-server-response): Improve docstring. + * lisp/net/soap-client.el (soap-parse-server-response): + Improve docstring. (soap-invoke): Inline call to soap-parse-server-response. - * soap-client.el (soap-decode-xs-complex-type): Prevent incorrect - warning. + * lisp/net/soap-client.el (soap-decode-xs-complex-type): + Prevent incorrect warning. - * soap-client.el (soap-parse-server-response): Rename - soap-process-url-response. Destroy the mime part. + * lisp/net/soap-client.el (soap-parse-server-response): + Rename soap-process-url-response. Destroy the mime part. (soap-invoke): Call soap-parse-server-response. - * soap-client.el: Update copyright date. + * lisp/net/soap-client.el: Update copyright date. - * soap-client.el: Fix checkdoc issues. + * lisp/net/soap-client.el: Fix checkdoc issues. - * soap-client.el: Fix indentation and long lines. + * lisp/net/soap-client.el: Fix indentation and long lines. - * soap-client.el (soap-time-format): Remove variable. + * lisp/net/soap-client.el (soap-time-format): Remove variable. (soap-encode-xs-basic-type): Simplify date-time format detection. (soap-decode-xs-basic-type): Remove soap-time-format support. - * soap-client.el (soap-process-url-response): New function. + * lisp/net/soap-client.el (soap-process-url-response): New function. (soap-fetch-xml-from-url): Call soap-process-url-response. (soap-parse-wsdl-phase-1): New function. (soap-parse-wsdl-phase-2): Likewise. @@ -850,18 +810,18 @@ (soap-parse-wsdl-phase-5): Likewise. (soap-parse-wsdl): Call phase functions. - * soap-client.el (soap-decode-xs-basic-type): Remove one-argument - and call. + * lisp/net/soap-client.el (soap-decode-xs-basic-type): + Remove one-argument and call. - * soap-client.el (soap-decode-date-time): Improve docstring. + * lisp/net/soap-client.el (soap-decode-date-time): Improve docstring. - * soap-client.el (soap-xmlschema-imports): Remove variable. + * lisp/net/soap-client.el (soap-xmlschema-imports): Remove variable. (soap-parse-schema): Add wsdl argument. Look up XML schema imports from wsdl. (soap-load-wsdl): Do not set soap-xmlschema-imports. (soap-parse-wsdl): Get XML schema imports from wsdl. - * soap-client.el (soap-current-file): Remove variable. + * lisp/net/soap-client.el (soap-current-file): Remove variable. (soap-wsdl): Add current-file slot. (soap-fetch-xml-from-url): Add wsdl argument. Look up current file from wsdl. @@ -870,7 +830,7 @@ (soap-load-wsdl): Always create wsdl object first. (soap-parse-wsdl): Pass wsdl to soap-fetch-xml. - * soap-client.el (soap-xs-element): Add is-group slot. + * lisp/net/soap-client.el (soap-xs-element): Add is-group slot. (soap-xs-parse-element): Set is-group slot. (soap-resolve-references-for-xs-element): Skip is-group elements. (soap-xs-complex-type): Add is-group slot. @@ -880,15 +840,17 @@ from referenced xsd:group nodes. (soap-parse-schema): Parse xsd:group nodes. - * soap-client.el (soap-invoke): Don't set url-http-version to 1.0. + * lisp/net/soap-client.el (soap-invoke): + Don't set url-http-version to 1.0. - * soap-client.el (soap-decode-xs-complex-type): Allow choice nodes - to accept multiple values. + * lisp/net/soap-client.el (soap-decode-xs-complex-type): + Allow choice nodes to accept multiple values. - * soap-client.el (soap-encode-body): Check parameters argument for - extra header values. + * lisp/net/soap-client.el (soap-encode-body): Check parameters argument + for extra header values. - * soap-client.el (soap-well-known-xmlns): Add wsa and wsaw tags. + * lisp/net/soap-client.el (soap-well-known-xmlns): + Add wsa and wsaw tags. (soap-operation): Add input-action and output-action slots. (soap-parse-operation): Parse wsaw:Action nodes. (soap-encode-body): Encode service-url for WS-Addressing. @@ -896,67 +858,67 @@ (soap-invoke): Update soap-create-envelope call to provide service-url argument. - * soap-client.el (soap-decode-xs-complex-type): Support xsi:type - override attribute. + * lisp/net/soap-client.el (soap-decode-xs-complex-type): + Support xsi:type override attribute. (soap-decode-array): Likewise. - * soap-client.el (soap-parse-schema): Handle location attribute. + * lisp/net/soap-client.el (soap-parse-schema): + Handle location attribute. - * soap-client.el (soap-decode-type): Check that multiRef matched - validation regexp. + * lisp/net/soap-client.el (soap-decode-type): Check that multiRef + matched validation regexp. - * soap-client.el (soap-encode-xs-simple-type): Encode xsd:list - nodes. + * lisp/net/soap-client.el (soap-encode-xs-simple-type): + Encode xsd:list nodes. (soap-decode-xs-simple-type): Decode xsd:list nodes. - * soap-client.el (soap-get-candidate-elements): Fix reference - handling. + * lisp/net/soap-client.el (soap-get-candidate-elements): + Fix reference handling. - * soap-client.el (soap-xs-simple-type): Add is-list slot. - (soap-xs-parse-simple-type): Call soap-xs-add-list for xsd:list - nodes. + * lisp/net/soap-client.el (soap-xs-simple-type): Add is-list slot. + (soap-xs-parse-simple-type): Call soap-xs-add-list for xsd:list nodes. (soap-xs-add-list): New function. - * soap-client.el (soap-encode-xs-element): When a boolean is + * lisp/net/soap-client.el (soap-encode-xs-element): When a boolean is expected, interpret nil as "false". - * soap-client.el (soap-make-xs-basic-types): Add gYearMonth, + * lisp/net/soap-client.el (soap-make-xs-basic-types): Add gYearMonth, gYear, gMonthDay, gDay and gMonth. - * soap-client.el (soap-time-format): New variable. + * lisp/net/soap-client.el (soap-time-format): New variable. (soap-encode-xs-basic-type): Handle dateTime, time, date, gYearMonth, gYear, gMonthDay, gDay and gMonth. (soap-decode-date-time): New function. (soap-decode-xs-basic-type): Use soap-decode-date-time. - * soap-client.el (soap-encode-xs-basic-type): Validate value after - encoding. + * lisp/net/soap-client.el (soap-encode-xs-basic-type): Validate value + after encoding. (soap-decode-xs-basic-type): Validate value before decoding. - * soap-client.el (soap-validate-xs-basic-type): New function. + * lisp/net/soap-client.el (soap-validate-xs-basic-type): New function. (soap-validate-xs-simple-type): Call soap-validate-xs-basic-type. - * soap-client.el (soap-xs-add-union): Append result to base + * lisp/net/soap-client.el (soap-xs-add-union): Append result to base instead of overwriting it. (soap-validate-xs-simple-type): Add union support. - * soap-client.el (soap-xs-add-restriction): Translate pattern to - Emacs regexp using xsdre-translate. + * lisp/net/soap-client.el (soap-xs-add-restriction): Translate pattern + to Emacs regexp using xsdre-translate. (soap-validate-xs-simple-type): Validate value against pattern. - * soap-client.el (soap-xs-add-union): Preserve WSDL order of + * lisp/net/soap-client.el (soap-xs-add-union): Preserve WSDL order of inline simpleType nodes. (soap-decode-type): Handle union types. - * soap-client.el (soap-decode-xs-attributes): Decode basic-type + * lisp/net/soap-client.el (soap-decode-xs-attributes): Decode basic-type attributes. - * soap-client.el (soap-get-xs-attributes-from-groups): renamed + * lisp/net/soap-client.el (soap-get-xs-attributes-from-groups): Rename from soap-xs-attribute-group-consolidate, all callers updated - (soap-get-xs-attributes): renamed from + (soap-get-xs-attributes): Rename from soap-xs-attributes-consolidate, all callers updated - * soap-client.el (soap-xs-type): Add attribute-group slot. + * lisp/net/soap-client.el (soap-xs-type): Add attribute-group slot. (soap-xs-attribute-group): New type. (soap-xs-parse-attribute-group): New function. (soap-resolve-references-for-xs-attribute-group): Likewise. @@ -969,36 +931,34 @@ (soap-xs-attributes-consolidate): Handle attribute groups. (soap-parse-schema): Likewise. - * soap-client.el (soap-encode-xs-basic-type): Fix boolean - encoding. + * lisp/net/soap-client.el (soap-encode-xs-basic-type): + Fix boolean encoding. - * soap-client.el (soap-encode-xs-complex-type): Print ref element - names in warnings. + * lisp/net/soap-client.el (soap-encode-xs-complex-type): Print ref + element names in warnings. - * soap-client.el (soap-decode-xs-complex-type): Fix splicing. + * lisp/net/soap-client.el (soap-decode-xs-complex-type): Fix splicing. - * soap-client.el (soap-decode-xs-complex-type): Eliminate invalid - warnings for choice types. + * lisp/net/soap-client.el (soap-decode-xs-complex-type): + Eliminate invalid warnings for choice types. - * soap-client.el (soap-encode-xs-complex-type-attributes): Also - encode base type attributes. + * lisp/net/soap-client.el (soap-encode-xs-complex-type-attributes): + Also encode base type attributes. - * soap-client.el (soap-encode-xs-complex-type): Fix compilation + * lisp/net/soap-client.el (soap-encode-xs-complex-type): Fix compilation warning. Print e-name in warnings, or element if e-name is nil. - * soap-client.el (soap-xs-element): Add alternatives slot. + * lisp/net/soap-client.el (soap-xs-element): Add alternatives slot. (soap-xs-parse-element): Set substitution-group. - (soap-resolve-references-for-xs-element): Populate alternatives - slot. + (soap-resolve-references-for-xs-element): Populate alternatives slot. (soap-get-candidate-elements): New function. - (soap-encode-xs-complex-type): Iterate through all candidate - elements. Handle types with nil type indicator. Fix warning - logic. + (soap-encode-xs-complex-type): Iterate through all candidate elements. + Handle types with nil type indicator. Fix warning logic. - * soap-client.el (soap-current-wsdl): moved declaration earlier in - the file to prevent compiler warning. + * lisp/net/soap-client.el (soap-current-wsdl): Move declaration + earlier in the file to prevent compiler warning. - * soap-client.el (soap-node-optional): New function. + * lisp/net/soap-client.el (soap-node-optional): New function. (soap-node-multiple): Likewise. (soap-xs-parse-element): Call soap-node-optional and soap-node-multiple. @@ -1009,44 +969,41 @@ (soap-xs-complex-type-multiple-p): Likewise. (soap-xs-attributes-consolidate): Likewise. (soap-decode-xs-attributes): Likewise. - (soap-decode-xs-complex-type): Decode types with nil type - indicator. Support children that use local namespaces. Decode - attributes. Add type considerations to optional? and multiple? - warnings. - - * soap-client.el (soap-xs-parse-extension-or-restriction): Store - parsed attributes. - (soap-encode-xs-complex-type-attributes): Encode custom - attributes. + (soap-decode-xs-complex-type): Decode types with nil type indicator. + Support children that use local namespaces. Decode attributes. + Add type considerations to optional? and multiple? warnings. + + * lisp/net/soap-client.el (soap-xs-parse-extension-or-restriction): + Store parsed attributes. + (soap-encode-xs-complex-type-attributes): Encode custom attributes. - * soap-client.el (soap-encode-xs-complex-type-attributes): don't - add the xsi:type attribute (Exchange refuses requests which have - this attribute) + * lisp/net/soap-client.el (soap-encode-xs-complex-type-attributes): + Don't add the xsi:type attribute (Exchange refuses requests which have + this attribute). - * soap-client.el, soap-inspect.el: converted to lexical binding, - corrected compiler warnings about unused function arguments and + * lisp/net/soap-client.el, soap-inspect.el: Convert to lexical binding, + correct compiler warnings about unused function arguments and local variables. - * soap-client.el (soap-decode-xs-complex-type): Handle nil type - indicator. + * lisp/net/soap-client.el (soap-decode-xs-complex-type): Handle nil + type indicator. (soap-parse-envelope): Handle response headers. - (soap-parse-response): Likewise. Only return non-nil decoded - values. + (soap-parse-response): Likewise. Only return non-nil decoded values. - * soap-client.el (soap-validate-xs-simple-type): Return validated - value. + * lisp/net/soap-client.el (soap-validate-xs-simple-type): + Return validated value. - * soap-client.el (soap-xs-parse-element) + * lisp/net/soap-client.el (soap-xs-parse-element) (soap-xs-parse-simple-type) (soap-xs-parse-complex-type) (soap-parse-message) - (soap-parse-operation): add the current namespace to the element - being created + (soap-parse-operation): Add the current namespace to the element + being created. (soap-resolve-references-for-xs-element) (soap-resolve-references-for-xs-simple-type) (soap-resolve-references-for-xs-complex-type) - (soap-resolve-references-for-operation): resolve the namespace to - the namespace tag + (soap-resolve-references-for-operation): Resolve the namespace to + the namespace tag. (soap-make-wsdl): specify a namespace tag when creating the xsd and soapenc namespaces (soap-wsdl-resolve-references): don't update namespace tags in @@ -1055,85 +1012,86 @@ (soap-encode-body): don't add nil namespace tags to soap-encoded-namespaces - * soap-inspect.el: use `soap-make-wsdl` to construct the object - for registering the soap-inspect method.Make debbugs tests pass - * soap-client.el (soap-decode-any-type): use soap-l2fq on the type - name, also skip string only nodes when decoding a structure. - (soap-xs-parse-complex-type): (BUG) dispatch parsing for choice - types too - (soap-encode-body): grab the header value from the param table - - * soap-client.el (soap-should-encode-value-for-xs-element): new - function - (soap-encode-xs-element): don't encode nil value unless needed - - * soap-client.el (soap-bound-operation): new slot `soap-body` - (soap-parse-binding): parse the message parts required in the body - (soap-encode-body): encode only the parts that are declared to be - part of the body - - * soap-client.el (soap-encode-xs-element): use the fq name when - writing out the tag. - (soap-encode-body): remove hack that inserts the xmlns in the + * lisp/net/soap-inspect.el: Use `soap-make-wsdl` to construct the object + for registering the soap-inspect method. Make debbugs tests pass. + * lisp/net/soap-client.el (soap-decode-any-type): Use soap-l2fq on the + type name, also skip string only nodes when decoding a structure. + (soap-xs-parse-complex-type): (BUG) Dispatch parsing for choice + types too. + (soap-encode-body): Grab the header value from the param table. + + * lisp/net/soap-client.el (soap-should-encode-value-for-xs-element): + New function. + (soap-encode-xs-element): Don't encode nil value unless needed. + + * lisp/net/soap-client.el (soap-bound-operation): New slot `soap-body`. + (soap-parse-binding): Parse the message parts required in the body. + (soap-encode-body): Encode only the parts that are declared to be + part of the body. + + * lisp/net/soap-client.el (soap-encode-xs-element): use the fq name + when writing out the tag. + (soap-encode-body): Remove hack that inserts the xmlns in the element attributes list. - * soap-client.el (soap-xs-attribute): add "default" slot - (soap-xs-parse-attribute): default slot is set from the XML + * lisp/net/soap-client.el (soap-xs-attribute): Add "default" slot. + (soap-xs-parse-attribute): Default slot is set from the XML "fixed" attribute. - (soap-encode-xs-complex-type-attributes): encode any attributes + (soap-encode-xs-complex-type-attributes): Encode any attributes that have a default value. Also, don't put the xsi:nil attribute when the complex type has no content anyway. - * soap-client.el (soap-well-known-xmlns): add the xml namespace - (soap-local-xmlns): start with the xml namespace - (soap-xml-node-first-child): skip xsd:annotation nodes too - (soap-make-xs-basic-types): more xsd types added - (soap-encode-xs-basic-type, soap-decode-xs-basic-type): handle - "language", "time", "date", "nonNegativeInteger" - (soap-resolve-references-for-xs-element): don't signal an error if + * lisp/net/soap-client.el (soap-well-known-xmlns): + Add the xml namespace. + (soap-local-xmlns): Start with the xml namespace. + (soap-xml-node-first-child): Skip xsd:annotation nodes too. + (soap-make-xs-basic-types): More xsd types added. + (soap-encode-xs-basic-type, soap-decode-xs-basic-type): + Handle "language", "time", "date", "nonNegativeInteger". + (soap-resolve-references-for-xs-element): Don't signal an error if the element does not have a type. - (soap-xs-parse-simple-type): subtypes are handled with ecase, - added stum for xsd:list - (soap-xs-add-union): call soap-l2fq on all union members - (soap-xs-add-extension): call soap-l2fq on the base member - (soap-resolve-references-for-xs-simple-type): don't signal an + (soap-xs-parse-simple-type): Subtypes are handled with ecase, + added stum for xsd:list. + (soap-xs-add-union): Call soap-l2fq on all union members. + (soap-xs-add-extension): Call soap-l2fq on the base member. + (soap-resolve-references-for-xs-simple-type): Don't signal an error if the simple type has no base. - (soap-resolve-references-for-xs-simple-type): bugfix, call - soap-wsdl-get on each type of the base + (soap-resolve-references-for-xs-simple-type): Bugfix, call + soap-wsdl-get on each type of the base. - * soap-client.el (soap-resolve-references-for-xs-attribute): - referenced type can be eiher a simple type or a basic type + * lisp/net/soap-client.el (soap-resolve-references-for-xs-attribute): + Referenced type can be eiher a simple type or a basic type. (soap-xs-add-restriction) - (soap-xs-parse-extension-or-restriction): use `soap-l2fq' on base + (soap-xs-parse-extension-or-restriction): Use `soap-l2fq' on base. (soap-make-xs-basic-types) - (soap-encode-xs-basic-type, soap-decode-xs-basic-type): add - support for more XMLSchema basic types - (soap-current-file, soap-xmlschema-imports): new defvars - (soap-parse-schema): add locations from xsd:import tags to - `soap-xmlschema-imports' - (soap-wsdl): make destructor private - (soap-make-wsdl): new defun, SOAP-WSDL object constructor - (soap-wsdl-add-alias): check if we try to replace aliases + (soap-encode-xs-basic-type, soap-decode-xs-basic-type): + Add support for more XMLSchema basic types. + (soap-current-file, soap-xmlschema-imports): New defvars. + (soap-parse-schema): Add locations from xsd:import tags to + `soap-xmlschema-imports'. + (soap-wsdl): Make destructor private. + (soap-make-wsdl): New defun, SOAP-WSDL object constructor. + (soap-wsdl-add-alias): Check if we try to replace aliases. (soap-fetch-xml-from-url, soap-fetch-xml-from-file) - (soap-fetch-xml): new defuns - (soap-load-wsdl): updated to load the WSDL from either a file or - an url - (soap-load-wsdl-from-url): now an alias to `soap-load-wsdl' - (soap-parse-wsdl): process wsdl:import tags and imports from - `soap-xmlschema-imports' - * soap-client.el (soap-l2wk): bugfix: call symbolp instead of - symbol-name - (soap-l2fq): make the name part always a string - (soap-name-p): new defun, used for name tests - - * soap-inspect.el (soap-sample-value-for-xs-complex-type): supply - sample values for choice types with a special tag - * soap-client.el (soap-encode-xs-complex-type): handle anonymous - elements correctly - (soap-encode-value): accept nodes that have no namespace tag - - * soap-client.el (soap-invoke): encode the string for - `url-request-data' as UTF-8. Fixes issue 16 + (soap-fetch-xml): New defuns. + (soap-load-wsdl): Update to load the WSDL from either a file or + an url. + (soap-load-wsdl-from-url): Now an alias to `soap-load-wsdl'. + (soap-parse-wsdl): Process wsdl:import tags and imports from + `soap-xmlschema-imports'. + * lisp/net/soap-client.el (soap-l2wk): Bugfix: call symbolp instead of + symbol-name. + (soap-l2fq): Make the name part always a string. + (soap-name-p): New defun, used for name tests. + + * lisp/net/soap-inspect.el (soap-sample-value-for-xs-complex-type): + Supply sample values for choice types with a special tag. + * lisp/net/soap-client.el (soap-encode-xs-complex-type): + Handle anonymous elements correctly. + (soap-encode-value): Accept nodes that have no namespace tag. + + * lisp/net/soap-client.el (soap-invoke): Encode the string for + `url-request-data' as UTF-8. Fixes issue 16. 2015-10-25 Eli Zaretskii @@ -1141,25 +1099,20 @@ 2015-10-25 Artur Malabarba - * src/keyboard.c (post-command-hook): Extend the docstring - + * src/keyboard.c (post-command-hook): Extend the docstring. Mainly, explain how to use it without hanging Emacs, or giving the impression that it is hanging. Also mention `pre-command-hook'. - (pre-command-hook): Mention `post-command-hook'. 2015-10-25 Artur Malabarba - * lisp/custom.el (custom-declare-variable): Shorten code again - - Without using pcase this time. We can't use pcase because it is loaded - after custom in loadup.el. Also add a comment explaining this to future - dummies like me. + * lisp/custom.el (custom-declare-variable): Shorten code again. + Without using pcase this time. We can't use pcase because it is + loaded after custom in loadup.el. Also add a comment explaining + this to future dummies like me. 2015-10-25 Michael Albinus - Document file notification `stopped' event - * doc/lispref/os.texi (File Notifications): Document `stopped event'. 2015-10-25 Michael Albinus @@ -1298,8 +1251,8 @@ Update frame title when scrolling the selected window - * src/window.c (wset_update_mode_line): New function, sets either the - window's update_mode_line flag or the global update_mode_lines + * src/window.c (wset_update_mode_line): New function, sets either + the window's update_mode_line flag or the global update_mode_lines variable. (Fset_window_start, set_window_buffer, window_scroll_pixel_based) (window_scroll_line_based): Call it instead of only setting the @@ -1311,7 +1264,7 @@ * src/window.c (set_window_buffer): If the window is the frame's selected window, set update_mode_lines, not the window's - update_mode_line flag. (Bug#21739) + update_mode_line flag. * src/buffer.c (Fkill_buffer): Undo last change. (set_update_modelines_for_buf): Function deleted. @@ -1400,7 +1353,7 @@ 2015-10-23 Michael Albinus - Fix Bug#21669 + Fix bug#21669 * lisp/filenotify.el (file-notify-rm-watch): Improve check for calling low-level functions. commit df660da45bbde075ac8990cdef73128a37413a41 Author: Michael Albinus Date: Sun Nov 1 13:43:35 2015 +0100 Improve completion in tramp-gvfs.el * lisp/net/tramp-gvfs.el (tramp-zeroconf-parse-device-names): Renamed from `tramp-zeroconf-parse-service-device-names'. (tramp-zeroconf-parse-webdav-device-names): Removed. Code merged with `tramp-zeroconf-parse-device-names'. (tramp-gvfs-parse-device-names): New defun. (top): Use it when `tramp-zeroconf-parse-device-names' is not applicable. * lisp/net/tramp.el (tramp-set-completion-function): The argument could also be a zeroconf service type. diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index b93c4cf..8683241 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -1722,14 +1722,7 @@ be used." ;; D-Bus zeroconf functions. -(defun tramp-zeroconf-parse-service-device-names (service) - "Return a list of (user host) tuples allowed to access." - (mapcar - (lambda (x) - (list nil (zeroconf-service-host x))) - (zeroconf-list-services service))) - -(defun tramp-zeroconf-parse-webdav-device-names (_ignore) +(defun tramp-zeroconf-parse-device-names (service) "Return a list of (user host) tuples allowed to access." (mapcar (lambda (x) @@ -1745,22 +1738,64 @@ be used." (setq user (match-string 1 (car text)))) (setq text (cdr text))) (list user host))) - (zeroconf-list-services "_webdav._tcp"))) + (zeroconf-list-services service))) + +(defun tramp-gvfs-parse-device-names (service) + "Return a list of (user host) tuples allowed to access. +This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi." + (let ((result + (split-string + (shell-command-to-string (format "avahi-browse -trkp %s" service)) + "[\n\r]+" 'omit "^\\+;.*$"))) + (tramp-compat-delete-dups + (mapcar + (lambda (x) + (let* ((list (split-string x ";")) + (host (nth 6 list)) + (port (nth 8 list)) + (text (split-string (nth 9 list) "\" \"" 'omit "\"")) + user) +; (when (and port (not (string-equal port "0"))) +; (setq host (format "%s%s%s" host tramp-prefix-port-regexp port))) + ;; A user is marked in a TXT field like "u=guest". + (while text + (when (string-match "u=\\(.+\\)$" (car text)) + (setq user (match-string 1 (car text)))) + (setq text (cdr text))) + (list user host))) + result)))) ;; Add completion functions for AFP, DAV, DAVS, SFTP and SMB methods. -(when (and tramp-gvfs-enabled - (member zeroconf-service-avahi (dbus-list-known-names :system))) +(when tramp-gvfs-enabled (zeroconf-init tramp-gvfs-zeroconf-domain) - (tramp-set-completion-function - "afp" '((tramp-zeroconf-parse-service-device-names "_afpovertcp._tcp"))) - (tramp-set-completion-function - "dav" '((tramp-zeroconf-parse-webdav-device-names ""))) - (tramp-set-completion-function - "davs" '((tramp-zeroconf-parse-webdav-device-names ""))) - (tramp-set-completion-function - "sftp" '((tramp-zeroconf-parse-service-device-names "_workstation._tcp"))) - (tramp-set-completion-function - "smb" '((tramp-zeroconf-parse-service-device-names "_smb._tcp")))) + (if (zeroconf-list-service-types) + (progn + (tramp-set-completion-function + "afp" '((tramp-zeroconf-parse-device-names "_afpovertcp._tcp"))) + (tramp-set-completion-function + "dav" '((tramp-zeroconf-parse-device-names "_webdav._tcp"))) + (tramp-set-completion-function + "davs" '((tramp-zeroconf-parse-device-names "_webdav._tcp"))) + (tramp-set-completion-function + "sftp" '((tramp-zeroconf-parse-device-names "_ssh._tcp") + (tramp-zeroconf-parse-device-names "_workstation._tcp"))) + (when (member "smb" tramp-gvfs-methods) + (tramp-set-completion-function + "smb" '((tramp-zeroconf-parse-device-names "_smb._tcp"))))) + + (when (executable-find "avahi-browse") + (tramp-set-completion-function + "afp" '((tramp-gvfs-parse-device-names "_afpovertcp._tcp"))) + (tramp-set-completion-function + "dav" '((tramp-gvfs-parse-device-names "_webdav._tcp"))) + (tramp-set-completion-function + "davs" '((tramp-gvfs-parse-device-names "_webdav._tcp"))) + (tramp-set-completion-function + "sftp" '((tramp-gvfs-parse-device-names "_ssh._tcp") + (tramp-gvfs-parse-device-names "_workstation._tcp"))) + (when (member "smb" tramp-gvfs-methods) + (tramp-set-completion-function + "smb" '((tramp-gvfs-parse-device-names "_smb._tcp"))))))) ;; D-Bus SYNCE functions. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 2f811bb..89aad07 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1765,14 +1765,18 @@ Example: (setcdr v (delete (car v) (cdr v)))) ;; Check for function and file or registry key. (unless (and (functionp (nth 0 (car v))) - (if (string-match "^HKEY_CURRENT_USER" (nth 1 (car v))) - ;; Windows registry. - (and (memq system-type '(cygwin windows-nt)) - (zerop - (tramp-call-process - v "reg" nil nil nil "query" (nth 1 (car v))))) - ;; Configuration file. - (file-exists-p (nth 1 (car v))))) + (cond + ;; Windows registry. + ((string-match "^HKEY_CURRENT_USER" (nth 1 (car v))) + (and (memq system-type '(cygwin windows-nt)) + (zerop + (tramp-call-process + v "reg" nil nil nil "query" (nth 1 (car v)))))) + ;; Zeroconf service type. + ((string-match + "^_[[:alpha:]]+\\._[[:alpha:]]+$" (nth 1 (car v)))) + ;; Configuration file. + (t (file-exists-p (nth 1 (car v)))))) (setq r (delete (car v) r))) (setq v (cdr v))) commit 150066727c063e2f16ee617947d63ec8ca5793ca Author: Glenn Morris Date: Sun Nov 1 06:34:54 2015 -0500 ; Auto-commit of ChangeLog files. diff --git a/ChangeLog.2 b/ChangeLog.2 index 83798aa..c8c231f 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,3 +1,1182 @@ +2015-10-31 Thomas Fitzsimmons + + ntlm.el: Change version to 2.0.0 + +2015-10-31 Juanma Barranquero + + Fix bug#21762 + + * lisp/progmodes/python.el (python-syntax-closing-paren-p): Check with + `eql' instead of `=' to accommodate the case that (syntax-after (point)) + returns nil. + + * test/automated/python-tests.el (python-indent-inside-paren-7): + New test. + +2015-10-31 Juanma Barranquero + + * test/automated/python-tests.el: Avoid warnings + + (python-tests-with-temp-buffer, python-tests-with-temp-file): + Bind `python-indent-guess-indent-offset' to nil. + # Please enter the commit message for your changes. Lines starting + # with '#' will be ignored, and an empty message aborts the commit. + # On branch master + # Your branch is up-to-date with 'origin/master'. + # + # Changes to be committed: + # modified: test/automated/python-tests.el + # + +2015-10-31 Juanma Barranquero + + * src/alloc.c: Silence compiler warnings + + (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): #ifdef DOUG_LEA_MALLOC. + +2015-10-31 Jackson Ray Hamilton + + * etc/NEWS: Fix js-jsx-mode entry punctuation + +2015-10-31 Jackson Ray Hamilton + + Add JSX indentation via js-jsx-mode. (Bug#21799) + + * progmodes/js.el: Add JSX indentation support. + (js-jsx-indent-line) + (js-jsx-mode): New functions. + +2015-10-31 Michael Albinus + + Minor fix in filenotify.el + + * lisp/filenotify.el (file-notify--event-file-name) + (file-notify--event-file1-name): Normalize result with + `directory-file-name'. + +2015-10-31 Eli Zaretskii + + Avoid errors in redisplay--pre-redisplay-functions + + * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Don't + use 'bobp', instead compare window-point with 1. (Bug#21730) + +2015-10-30 Paul Eggert + + Merge from gnulib. + + This incorporates: + 2015-10-30 intprops: add WRAPV and const flavors for GCC 5 + 2015-10-25 stdalign: port to Sun C 5.9 + * doc/misc/texinfo.tex, lib/intprops.h, lib/stdalign.in.h: + Copy from gnulib. + +2015-10-30 Eli Zaretskii + + Fix a typo in a macro name + + * src/w32proc.c (_NLSCMPERROR): Fix a typo in the name of this macro. + (w32_compare_strings): Adjust for the correction. + +2015-10-30 Michael Albinus + + Add result messages in vc-tests.el + + * test/automated/vc-tests.el (vc-test--state) + (vc-test--working-revision, vc-test--checkout-model): Add result messages. + +2015-10-30 Artur Malabarba + + * test/automated/faces-tests.el: Add another test + +2015-10-30 Artur Malabarba + + * lisp/faces.el (faces--attribute-at-point): Fix bug + + introduced by previous commit. + +2015-10-30 Artur Malabarba + + * test/automated/faces-tests.el: New file + +2015-10-30 Artur Malabarba + + * lisp/faces.el: Refactor common code and fix a bug + + (faces--attribute-at-point): New function. Fix a bug when the + face at point is a list of faces and the desired attribute is not + on the first one. + (foreground-color-at-point, background-color-at-point): Use it. + +2015-10-30 Przemysław Wojnowski + + * etc/tutorials/TUTORIAL.translators: Fix PL names + +2015-10-30 Juanma Barranquero + + * lisp/character-fold.el: Provide `character-fold' + +2015-10-30 Tassilo Horn + + Add more faces for Gnus and ivy + + * etc/themes/tsdh-dark-theme.el (tsdh-dark): add more faces for Gnus and + ivy. + +2015-10-30 Michael Albinus + + Some minor fixes for tramp-gvfs.el + + * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes): + An attribute returned by gvfs-info might be empty. In case of + undetermined uid or gid, return "UNKNOWN" or -1, respectively. + (tramp-zeroconf-parse-service-device-names): New defun. + Derived from `tramp-zeroconf-parse-workstation-device-names'. + (top): Add completion functions for "afp" and "smb" methods. + +2015-10-30 Artur Malabarba + + * test/automated/character-fold-tests.el: New file + +2015-10-30 Artur Malabarba + + * test/automated/sort-tests.el: New file + + Tests in this file are randomly generated and then tested with + regular, reverse, and case-fold sorting. + +2015-10-30 Eli Zaretskii + + Describe known problems with pinning Emacs to taskbar + + * etc/PROBLEMS: Describe the problem with pinning Emacs to taskbar + on Windows 10. For the details, see the discussion starting at + http://lists.gnu.org/archive/html/help-emacs-windows/2015-09/msg00000.html. + +2015-10-30 Artur Malabarba + + * lisp/isearch.el: Avoid an error that blocks isearch + + (isearch-update): Don't error if `isearch--current-buffer' has + been killed. + + * test/automated/isearch-tests.el (isearch--test-update): New + file. + +2015-10-30 Phil Sainty + + Fix documentation of 'beginning/end-of-buffer' + + * lisp/simple.el (beginning-of-buffer, end-of-buffer): Clarify + conditions under which the mark will be pushed at the previous + position. (Bug#21748) + +2015-10-30 Tassilo Horn + + Add RefTeX feature idea: editing RefTeX TOC buffers + + More face defs for ivy, swiper, ace-window, eshell + +2015-10-29 Stefan Monnier + + * lisp/gnus/auth-source.el: Silence lexical-binding warnings + + (auth-source-netrc-use-gpg-tokens): Simplify (symbol-value 'VAR) to + just VAR. + (auth-source-backend-parse): Use make-instance. + (auth-source-search): Remove unused key args. + Remove unused vars `accessor-key' and `backend'. Avoid `eval'. + (auth-source-search-backends): Use slot names rather than their initarg. + (auth-source-netrc-create): + (auth-source-delete): + (auth-source-secrets-create, auth-source-plstore-search) + (auth-source-macos-keychain-create, auth-source-macos-keychain-search) + (auth-source-plstore-create, auth-source-netrc-search) + (auth-source-netrc-parse): Remove unused key args. + (auth-source-forget+): Simplify the arglist. + (auth-source-macos-keychain-search-items) + (auth-source-token-passphrase-callback-function): Mark unused args. + (auth-source-epa-extract-gpg-token): Remove unused var `plain'. + (pp-escape-newlines): Declare. + (auto-source--symbol-keyword): New function. + (auth-source-plstore-create, auth-source-netrc-create) + (auth-source-netrc-normalize): Use it. + (auth-source-netrc-search): Don't pass :delete to + auth-source-netrc-parse since it doesn't use it. + (auth-source-plstore-create, auth-source-netrc-create): Use plist-get + symbol-value to index in keyword args. + (auth-source-macos-keychain-result-append): Avoid setq. + (auth-source-netrc-create): Remove unused vars `file' and `add'. + (auth-source-user-or-password): Remove unused var `cname'. + +2015-10-29 Juri Linkov + + * lisp/dired.el (dired-unmark-all-files-query): Declare. + + (dired-unmark-all-files): Let-bind it and use instead of ‘query’. + (Bug#21746) + +2015-10-29 Juri Linkov + + * lisp/ielm.el (ielm-indent-line): Use non-nil arg of comint-bol + + to go to the beginning of text line instead of command line. + http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02360.html + +2015-10-29 Eli Zaretskii + + Fix encoding of saving *Help* buffers + + * lisp/help-fns.el (describe-function-1): If we use curved quotes, + set help buffer's buffer-file-coding-system to UTF-8. (Bug#21780) + +2015-10-29 Stefan Monnier + + * lisp/emacs-lisp/cl-generic.el: Add (major-mode MODE) context + + (cl--generic-derived-specializers): New function. + (cl--generic-derived-generalizer): New generalizer. + (cl-generic-generalizers): New specializer (derived-mode MODE). + (cl--generic-split-args): Apply the rewriter, if any. + (cl-generic-define-context-rewriter): New macro. + (major-mode): Use it to define a new context-rewriter, so we can write + `(major-mode MODE)' instead of `(major-mode (derived-mode MODE))'. + + * lisp/frame.el (window-system): New context-rewriter so we can write + `(window-system VAL)' instead of (window-system (eql VAL)). + (cl--generic-split-args): Apply the rewriter, if any. + (frame-creation-function): Use the new syntax. + + * lisp/term/x-win.el (window-system-initialization) + (handle-args-function, frame-creation-function) + (gui-backend-set-selection, gui-backend-selection-owner-p) + (gui-backend-selection-exists-p, gui-backend-get-selection): + * lisp/term/w32-win.el (window-system-initialization) + (handle-args-function, frame-creation-function) + (gui-backend-set-selection, gui-backend-get-selection) + (gui-backend-selection-owner-p, gui-backend-selection-exists-p): + * lisp/term/pc-win.el (gui-backend-get-selection) + (gui-backend-selection-exists-p, gui-backend-selection-owner-p) + (gui-backend-set-selection, window-system-initialization) + (frame-creation-function, handle-args-function): + * lisp/term/ns-win.el (window-system-initialization) + (handle-args-function, frame-creation-function) + (gui-backend-set-selection, gui-backend-selection-exists-p) + (gui-backend-get-selection): + * lisp/startup.el (handle-args-function): + * lisp/term/xterm.el (gui-backend-get-selection) + (gui-backend-set-selection): Use the new syntax. + +2015-10-29 Stefan Monnier + + * test/indent/css-mode.css: Add tests for url(...) syntax. + +2015-10-29 Stefan Monnier + + * lisp/emacs-lisp/smie.el: Use `declare' for `pure' + + (smie-precs->prec2, smie-merge-prec2s, smie-bnf->prec2, smie-prec2->grammar): + Use `declare'. + +2015-10-29 Stefan Monnier + + * lisp/emacs-lisp/cl-generic.el: Accomodate future changes + + (cl--generic-generalizer): Add `name' field. + (cl-generic-make-generalizer): Add corresponding `name' argument. + (cl-generic-define-generalizer): New macro. + (cl--generic-head-generalizer, cl--generic-eql-generalizer) + (cl--generic-struct-generalizer, cl--generic-typeof-generalizer) + (cl--generic-t-generalizer): Use it. + (cl-generic-ensure-function): Add `noerror' argument. + (cl-generic-define): Use it so we don't follow aliases. + (cl-generic-define-method): Preserve pre-existing ordering of methods. + (cl--generic-arg-specializer): New function. + (cl--generic-cache-miss): Use it. + (cl-generic-generalizers): Only fset a temporary definition + during bootstrap. + (cl--generic-struct-tag, cl--generic-struct-specializers): + Allow extra arguments. + + * lisp/emacs-lisp/eieio-compat.el (eieio--generic-static-symbol-generalizer) + (eieio--generic-static-object-generalizer): Use cl-generic-define-generalizer. + (eieio--generic-static-symbol-specializers): Allow extra arguments. + + * lisp/emacs-lisp/eieio-core.el (eieio--generic-generalizer) + (eieio--generic-subclass-generalizer): Use cl-generic-define-generalizer. + (eieio--generic-subclass-specializers): Allow extra arguments. + +2015-10-29 Stefan Monnier + + * lisp/emacs-lisp/bytecomp.el (compile-defun): Add defvars in scope. + +2015-10-29 Michael Albinus + + Add "afp" method to Tramp + + * doc/misc/tramp.texi (GVFS based methods): Describe `afp' method. + + * lisp/net/tramp-gvfs.el (tramp-gvfs-methods): Add "afp" method. + (tramp-gvfs-handle-expand-file-name) + (tramp-gvfs-handler-mounted-unmounted) + (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec) + (tramp-gvfs-maybe-open-connection): Support also "afp". + (tramp-gvfs-handle-file-attributes): Handle the case of empty + "owner::user" and "owner::group" entries. + +2015-10-29 Andy Moreton + + Handle negative coordinates in ‘x_calc_absolute_position’ + + * src/w32term.c (x_calc_absolute_position): Find display origin to + allow for negative coordinates. + +2015-10-28 Stefan Monnier + + (internal--syntax-propertize): Save match-data here (bug#21766) + + * lisp/emacs-lisp/syntax.el (internal--syntax-propertize): Save match-data. + * lisp/simple.el (delete-trailing-whitespace): Undo last change. + +2015-10-28 Dmitry Gutov + + Don't require default-directory to end with a slash + + * doc/lispref/files.texi (Magic File Names): Document the change + in unhandled-file-name-directory. + + * lisp/url/url-handlers.el + (url-handler-unhandled-file-name-directory): Update accordingly. + + * src/buffer.c (default-directory): Update the docsting. + + * src/fileio.c (unhandled-file-name-directory): Default to calling + `file-name-as-directory' + (http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02294.html). + +2015-10-28 Artur Malabarba + + * lisp/isearch.el: Delete some outdated comments + +2015-10-28 Vibhav Pant + + Fix eshell/clear not working if the output has a small line count + + * lisp/eshell/esh-mode.el: (eshell/clear): Use (window-size) as the + number of newlines to be inserted. This fixes the issue where + eshell/clear wouldn't work if the prompt was not at the bottom of the + window, and the output wasn't too long. + +2015-10-28 Stefan Monnier + + * lisp/files.el (write-file): Use vc-refresh-state. + + * lisp/autorevert.el (auto-revert-handler): Use vc-refresh-state. + + * lisp/vc/pcvs.el (cvs-revert-if-needed): Use vc-refresh-state. + +2015-10-28 Stefan Monnier + + * lisp/emacs-lisp/macroexp.el: Tweak macroexp-if optimizations + + (macroexp-unprogn): Make sure we never return an empty list. + (macroexp-if): Remove unused (and unsafe) optimization. + Optimize (if A T (if B T E)) into (if (or A B) T E) instead, which does + occur occasionally. + +2015-10-28 Juanma Barranquero + + Fix bug#21766 and add test + + * lisp/simple.el (delete-trailing-whitespace): Save match data when + calling `skip-syntax-backward'. + * test/automated/simple-test.el (simple-delete-trailing-whitespace): + New test. + +2015-10-28 Artur Malabarba + + * doc/lispref/sequences.texi (Sequence Functions): Fix typo + +2015-10-28 Paul Eggert + + * src/dispnew.c (init_display): Simplify overflow checking. + +2015-10-28 Artur Malabarba + + * lisp/character-fold.el (character-fold-to-regexp): Fix case + + where string ends in space + +2015-10-28 Artur Malabarba + + * lisp/emacs-lisp/seq.el (seq-mapn): New function + + * doc/lispref/sequences.texi (Sequence Functions): Document seq-mapn + +2015-10-28 Artur Malabarba + + * lisp/character-fold.el: Make compatible with lax-whitespace + + (character-fold-to-regexp): Rework internals to play nice with + lax-whitespacing. + + When the user types a space, we want to match the table entry for + ?\s, which is generally a regexp like "[ ...]". However, the + `search-spaces-regexp' variable doesn't "see" spaces inside these + regexp constructs, so we need to use "\\( \\|[ ...]\\)" instead (to + manually expose a space). + + Furthermore, the lax search engine acts on a bunch of spaces, not + on individual spaces, so if the string contains sequential spaces + like " ", we need to keep them grouped together like this: + "\\( \\|[ ...][ ...]\\)". + +2015-10-28 Artur Malabarba + + * lisp/isearch.el: Refactor momentary messages + + (isearch--momentary-message): New function. + (isearch-toggle-lax-whitespace, isearch-toggle-case-fold) + (isearch-toggle-invisible): Use it. + +2015-10-28 Artur Malabarba + + * lisp/isearch.el: Define all toggles with `isearch-define-mode-toggle' + + (isearch-define-mode-toggle): New macro. + (isearch-toggle-invisible): Renamed to + `isearch-define-mode-toggle'. + (isearch-toggle-case-fold, isearch-toggle-invisible) + (isearch-toggle-regexp, isearch-toggle-lax-whitespace): Define + with `isearch-define-mode-toggle'. + +2015-10-28 Michael Albinus + + Avoid using `add-to-list' on a let-local var in tramp-smb.el + + * lisp/net/tramp-compat.el (tramp-compat-delete-dups): New defun. + * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Use it. + +2015-10-28 Anders Lindgren + + Merge branch 'master' of /Volumes/HD2/build/emacs-git-ssh + + Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/emacs + + Merge branch 'master' of /Volumes/HD2/build/emacs-git-ssh + +2015-10-28 Michael Albinus + + Revert 692bce5b9eccfae19ae2a5a23a9ccd8d6bf86076 + + * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): + Revert 692bce5b9eccfae19ae2a5a23a9ccd8d6bf86076, `delete-dups' + does not exist in XEmacs 21.4. + +2015-10-28 Anders Lindgren + + Fixed OS X startup crash. + + Input events started to arrive before ns_term_init() was finished. + Solved by blocking input. This also seems to correct the "You + can't open the application "Emacs" because it may be damaged or + incomplete" error issued when double-clicking on the Emacs + application. + + * nsterm.m (ns_constrain_all_frames, ns_init_term): Block input. + * nsterm.m (ns_send_appdefined, EmacsApp): Trace output. + +2015-10-28 Anders Lindgren + + Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/emacs + +2015-10-28 Artur Malabarba + + * src/process.c (Fget_buffer_process): Improve docstring + + Document the fact that it doesn't return dead processes. + +2015-10-28 Anders Lindgren + + Fix incorrect NextStep tool-bar-mode -- wrong number of rows in frame. + + * nsterm.h (struct ns_output): New flag, in_animation. + * nsfns.m (Fx_create_frame): Initialize in_animation flag. + * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar): Set + in_animation flag around call to "setVisible". Set new tool bar + height before call to setVisible. + * nsterm.m (x_set_window_size): Don't call [view setRow: + andColumns:] as this fools the subsequent call to updateFrameSize + from performing the real resize. + (windowDidResize): Don't update anything when in_animation is + non-zero. + + Trace output. + + * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar) + (EmacsToolbar): + * nsterm.m (x_set_window_size, updateFrameSize) + ([EmacsView setRows: andColumns:]) + +2015-10-28 Nicolas Petton + + * lisp/emacs-lisp/thunk.el (thunk-delay): Fix the macro. + +2015-10-28 Tassilo Horn + + Prettify TeX macros not ending in a word char + + * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p): Prettify + macros which don't end in a word character. + +2015-10-27 Dmitry Gutov + + Pipe Hg commit descriptions through 'tabindent' + + * lisp/vc/vc-hg.el (vc-hg-log-format): Pipe commit description + through 'tabindent'. + (vc-hg-log-view-mode): Set tab-width to 2 locally. + (http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02259.html) + +2015-10-27 Stefan Monnier + + * lisp/net/tramp-smb.el: Avoid using `add-to-list' on a let-local var + + * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Use `delete-dups'. + * lisp/net/tramp.el (auto-save-file-name-transforms): Declare. + +2015-10-27 Stefan Monnier + + * lisp/international/ccl.el: Use lexical-binding + + (ccl-compile-if): Remove unused var `false-ic'. + (ccl-compile-write-repeat): Remove unused var `i'. + (ccl-compile-map-single): Remove unused var `id'. + (ccl-dump, ccl-dump-binary): Use explicit let-binding to bind the + dynamic var `ccl-code'. + +2015-10-27 Stefan Monnier + + * lisp/json.el (json-new-object): Optimize trivial `list' call + +2015-10-27 Stefan Monnier + + * lisp/help.el: Fix bug with incorrect arglist string + + (help-add-fundoc-usage): Don't mistake a mis-formatted string for a list. + +2015-10-27 Stefan Monnier + + * lisp/gnus/gnus-topic.el: Silence some warnings + + (gnus-topic-prepare-topic): Remove unused var `topic'. + (gnus-topic-remove-topic): Mark unused arg `hide'. + (gnus-tmp-header): Declare. + (gnus-topic-goto-missing-group): Remove unused var `entry'. + (gnus-topic-unmark-topic): Mark unused arg `dummy'. + (gnus-topic-copy-matching): Mark unused arg `copyp'. + Move initialization of `topic' into its declaration. + +2015-10-27 Stephen Leake + + Minor CEDET fixes + + * lisp/cedet/cedet-global.el (cedet-gnu-global-gtags-call): Handle + warnings from gtags about invalid options. + (cedet-gnu-global-create/update-database): Do incremental update + properly. + + * lisp/cedet/ede/generic.el (ede-enable-generic-projects): Get monotone + root right. + +2015-10-27 Michael Albinus + + Fall back to polling in autorevert when needed + + * lisp/autorevert.el (auto-revert-notify-handler): When a + `stopped' event arrives from file notification, fall back to polling. + + * test/automated/file-notify-tests.el + (file-notify-test03-autorevert): Extend test for polling when file + notification ceases to work. + +2015-10-27 Dmitry Gutov + + Show full commit messages in 'hg log' when appropriate + + * lisp/vc/vc-hg.el (vc-hg-log-format): New variable. + (vc-hg-print-log, vc-hg-expanded-log-entry): Use it. + (http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02191.html) + +2015-10-27 Nicolas Petton + + Use a plain svg file for the icon + + * etc/images/icons/hicolor/scalable/apps/emacs.svg: Use a plain SVG + format instead of the Inkscape SVG format. + +2015-10-27 Michael Albinus + + Fix subtle bug in auto-revert-tests.el + + * test/automated/auto-revert-tests.el + (auto-revert-test02-auto-revert-mode-dired): Narrow *Messages* + buffer where it belongs to. (Bug#21668) + +2015-10-26 Nicolas Petton + + * lisp/emacs-lisp/map.el: Better docstrings. + + * lisp/emacs-lisp/seq.el: Better docstrings. + + * lisp/emacs-lisp/seq.el: Rename all seq argumentss to sequence. + +2015-10-26 Phillip Lord + + * lisp/emacs-lisp/ert.el: Print results without newline escaping + +2015-10-26 Stephen Leake + + Clarify that load-path contents should be directory file names + + * doc/lispref/files.texi (Directory Names): Define and use "directory + file name". Recommend `expand-file-name'. + + * src/lread.c (load-path): Fix doc string; elements are directory file + names. + +2015-10-26 Eli Zaretskii + + Fix simple-test.el test + + * test/automated/simple-test.el (simple-test--dummy-buffer): Make + sure indentation doesn't use TABs, otherwise the 6th test might + fail. + +2015-10-26 Mark Oteiza + + * lisp/net/eww.el (eww-bookmark-prepare): Use truncate-string-to-width. + + `substring' does not account for full width characters. + +2015-10-26 Michael Albinus + + Further work on `stopped' events in filenotify.el + + * doc/lispref/os.texi (File Notifications): Rework examples. + + * lisp/filenotify.el (file-notify--rm-descriptor): Optional parameter. + (file-notify--rm-descriptor, file-notify-callback): Improve check + for sending `stopped' event. + (file-notify-add-watch): Check for more events for `inotify'. + + * test/automated/file-notify-tests.el + (file-notify--test-expected-events): New defvar. + (file-notify--test-with-events): Use it. + (file-notify--test-cleanup): Make it more robust when deleting + directories. + (file-notify--test-event-test): Check also for watched directories. + (file-notify--test-event-handler): Suppress temporary .#files. + (file-notify-test02-events, file-notify-test04-file-validity): + Rework `stopped' events. + (file-notify-test05-dir-validity): Wait for events when appropriate. + +2015-10-26 Artur Malabarba + + * src/keyboard.c (post-command-hook): Shorten docstring + +2015-10-26 Tassilo Horn + + Fix infinite loop in sh-script's SMIE code + + * lisp/progmodes/sh-script.el (sh-smie-sh-forward-token): Fix infinite + loop (bug#21747). + +2015-10-25 Artur Malabarba + + * lisp/isearch.el (search-default-regexp-mode): Revert to nil + + Character-fold search _still_ doesn't play well with + lax-whitespace. So disable it by default (again) for now. + +2015-10-25 Artur Malabarba + + * lisp/isearch.el: No visual feedback for default search mode + + During an isearch where character-folding is the default, we don't + want to take up minibuffer space just to tell the user that + "Char-fold " is on. The same goes for other modes, if the user + changes the default. In contrast, if the user toggles OFF the + default mode, they should see "Literal", to distinguish it from + the default mode. + + (isearch--describe-regexp-mode): Return "" if describing the + default mode, and return "literal " if describing a plain search + and it is not default. + +2015-10-25 Artur Malabarba + + * test/automated/simple-test.el: New file + + Define tests for `newline' and `open-line'. + +2015-10-25 Artur Malabarba + + * lisp/simple.el (open-line): Integrate with electric-indent-mode + + Also run `post-self-insert-hook' when called interactively. + +2015-10-25 Artur Malabarba + + * lisp/simple.el (open-line): Fix docstring + + Also explain apparently redundant line. + +2015-10-25 Thomas Fitzsimmons + Alexandru Harsanyi + + Sync with soap-client repository, version 3.0.1 + + * soap-client.el, soap-inspect.el: Bump version to 3.0.1. + + * soap-client.el, soap-inspect.el: Update home page. + + * soap-client.el, soap-inspect.el: Bump version to 3.0.0. + + * soap-inspect.el: Merge in changes from Emacs master branch. + + * soap-client.el: Merge in changes from Emacs master branch. + + * soap-inspect.el: Shorten first line description. + + * soap-client.el: Make a small whitespace fix. + + * soap-inspect.el: Update copyright years. + + * soap-client.el (soap-encoded-namespaces): Move above first use + in soap-encode-xs-element. + + * soap-client.el (soap-type-is-array?): new defun + (soap-encode-xs-element): handle array elements in this function + (soap-encode-xs-complex-type): flag error if asked to encode an + array type, this is handled in `soap-encode-xs-element' + + * soap-inspect.el (soap-inspect-xs-attribute-group): Do not print + type for attribute group. + + * soap-inspect.el (soap-sample-value-for-xs-attribute-group): New + function. + (soap-inspect-xs-attribute-group): Likewise. + + * soap-inspect.el + (soap-resolve-references-for-xs-attribute-group): Resolve + references of attributes in an attribute group. + + * soap-client.el (soap-decode-xs-attributes): Process attribute + type directly, not through soap-wsdl-get. + + * soap-client.el (soap-xs-parse-attribute): Leave reference nil if + reference attribute is nil. + + * soap-client.el (soap-resolve-references-for-xs-attribute): + Convert XML schema attributes to xsd:string. + + * soap-inspect.el (soap-sample-value-for-xs-attribute): New + function. + (soap-sample-value-for-xs-simple-type): Prepend attributes to + result. + (soap-sample-value-for-xs-complex-type): Likewise. + (soap-inspect-xs-attribute): New function. + (soap-inspect-xs-simple-type): Print attributes. + (soap-inspect-xs-complex-type): Likewise. + + * soap-inspect.el (soap-resolve-references-for-xs-simple-type): + Resolve references for attributes. + (soap-resolve-references-for-xs-complex-type): Likewise. + + * soap-client.el (soap-xml-node-find-matching-child): Rename from + soap-xml-node-first-child. + (soap-xs-parse-attribute): Call soap-xml-node-find-matching-child. + (soap-xs-parse-simple-type): Likewise. + + * soap-client.el (soap-invoke-async): Add error checking. + + * soap-client.el (soap-invoke-internal): New function. + (soap-invoke-async): Call soap-invoke-internal. + (soap-invoke): Likewise. + + * soap-client.el (soap-invoke-async): Ensure buffer passed to + url-retrieve callback is killed. + + * soap-client.el (soap-parse-wsdl-phase-validate-node): Rename + function. + (soap-parse-wsdl-phase-fetch-imports): Likewise. + (soap-parse-wsdl-phase-parse-schema): Likewise. + (soap-parse-wsdl-phase-fetch-schema): Likewise. + (soap-parse-wsdl-phase-finish-parsing): Likewise. + (soap-parse-wsdl): Update calls. + + * soap-client.el (soap-invoke-async): Fix callback invocation. + + * soap-client.el (soap-invoke-async): New function. + (soap-invoke): Reimplement using soap-invoke-async. + + * soap-client.el (soap-parse-server-response): Improve docstring. + (soap-invoke): Inline call to soap-parse-server-response. + + * soap-client.el (soap-decode-xs-complex-type): Prevent incorrect + warning. + + * soap-client.el (soap-parse-server-response): Rename + soap-process-url-response. Destroy the mime part. + (soap-invoke): Call soap-parse-server-response. + + * soap-client.el: Update copyright date. + + * soap-client.el: Fix checkdoc issues. + + * soap-client.el: Fix indentation and long lines. + + * soap-client.el (soap-time-format): Remove variable. + (soap-encode-xs-basic-type): Simplify date-time format detection. + (soap-decode-xs-basic-type): Remove soap-time-format support. + + * soap-client.el (soap-process-url-response): New function. + (soap-fetch-xml-from-url): Call soap-process-url-response. + (soap-parse-wsdl-phase-1): New function. + (soap-parse-wsdl-phase-2): Likewise. + (soap-parse-wsdl-phase-3): Likewise. + (soap-parse-wsdl-phase-4): Likewise. + (soap-parse-wsdl-phase-5): Likewise. + (soap-parse-wsdl): Call phase functions. + + * soap-client.el (soap-decode-xs-basic-type): Remove one-argument + and call. + + * soap-client.el (soap-decode-date-time): Improve docstring. + + * soap-client.el (soap-xmlschema-imports): Remove variable. + (soap-parse-schema): Add wsdl argument. Look up XML schema + imports from wsdl. + (soap-load-wsdl): Do not set soap-xmlschema-imports. + (soap-parse-wsdl): Get XML schema imports from wsdl. + + * soap-client.el (soap-current-file): Remove variable. + (soap-wsdl): Add current-file slot. + (soap-fetch-xml-from-url): Add wsdl argument. Look up current + file from wsdl. + (soap-fetch-xml-from-file): Likewise. + (soap-fetch-xml): Likewise. + (soap-load-wsdl): Always create wsdl object first. + (soap-parse-wsdl): Pass wsdl to soap-fetch-xml. + + * soap-client.el (soap-xs-element): Add is-group slot. + (soap-xs-parse-element): Set is-group slot. + (soap-resolve-references-for-xs-element): Skip is-group elements. + (soap-xs-complex-type): Add is-group slot. + (soap-xs-parse-complex-type): Set is-group slot. + (soap-xs-parse-sequence): Parse xsd:group elements. + (soap-resolve-references-for-xs-complex-type): Inline elements + from referenced xsd:group nodes. + (soap-parse-schema): Parse xsd:group nodes. + + * soap-client.el (soap-invoke): Don't set url-http-version to 1.0. + + * soap-client.el (soap-decode-xs-complex-type): Allow choice nodes + to accept multiple values. + + * soap-client.el (soap-encode-body): Check parameters argument for + extra header values. + + * soap-client.el (soap-well-known-xmlns): Add wsa and wsaw tags. + (soap-operation): Add input-action and output-action slots. + (soap-parse-operation): Parse wsaw:Action nodes. + (soap-encode-body): Encode service-url for WS-Addressing. + (soap-create-envelope): Likewise. + (soap-invoke): Update soap-create-envelope call to provide + service-url argument. + + * soap-client.el (soap-decode-xs-complex-type): Support xsi:type + override attribute. + (soap-decode-array): Likewise. + + * soap-client.el (soap-parse-schema): Handle location attribute. + + * soap-client.el (soap-decode-type): Check that multiRef matched + validation regexp. + + * soap-client.el (soap-encode-xs-simple-type): Encode xsd:list + nodes. + (soap-decode-xs-simple-type): Decode xsd:list nodes. + + * soap-client.el (soap-get-candidate-elements): Fix reference + handling. + + * soap-client.el (soap-xs-simple-type): Add is-list slot. + (soap-xs-parse-simple-type): Call soap-xs-add-list for xsd:list + nodes. + (soap-xs-add-list): New function. + + * soap-client.el (soap-encode-xs-element): When a boolean is + expected, interpret nil as "false". + + * soap-client.el (soap-make-xs-basic-types): Add gYearMonth, + gYear, gMonthDay, gDay and gMonth. + + * soap-client.el (soap-time-format): New variable. + (soap-encode-xs-basic-type): Handle dateTime, time, date, + gYearMonth, gYear, gMonthDay, gDay and gMonth. + (soap-decode-date-time): New function. + (soap-decode-xs-basic-type): Use soap-decode-date-time. + + * soap-client.el (soap-encode-xs-basic-type): Validate value after + encoding. + (soap-decode-xs-basic-type): Validate value before decoding. + + * soap-client.el (soap-validate-xs-basic-type): New function. + (soap-validate-xs-simple-type): Call soap-validate-xs-basic-type. + + * soap-client.el (soap-xs-add-union): Append result to base + instead of overwriting it. + (soap-validate-xs-simple-type): Add union support. + + * soap-client.el (soap-xs-add-restriction): Translate pattern to + Emacs regexp using xsdre-translate. + (soap-validate-xs-simple-type): Validate value against pattern. + + * soap-client.el (soap-xs-add-union): Preserve WSDL order of + inline simpleType nodes. + (soap-decode-type): Handle union types. + + * soap-client.el (soap-decode-xs-attributes): Decode basic-type + attributes. + + * soap-client.el (soap-get-xs-attributes-from-groups): renamed + from soap-xs-attribute-group-consolidate, all callers updated + (soap-get-xs-attributes): renamed from + soap-xs-attributes-consolidate, all callers updated + + * soap-client.el (soap-xs-type): Add attribute-group slot. + (soap-xs-attribute-group): New type. + (soap-xs-parse-attribute-group): New function. + (soap-resolve-references-for-xs-attribute-group): Likewise. + (soap-xs-add-extension): Handle attribute groups. + (soap-resolve-references-for-xs-simple-type): Likewise. + (soap-xs-parse-complex-type): Likewise. + (soap-xs-parse-extension-or-restriction): Likewise. + (soap-resolve-references-for-xs-complex-type): Likewise. + (soap-xs-attribute-group-consolidate): New function. + (soap-xs-attributes-consolidate): Handle attribute groups. + (soap-parse-schema): Likewise. + + * soap-client.el (soap-encode-xs-basic-type): Fix boolean + encoding. + + * soap-client.el (soap-encode-xs-complex-type): Print ref element + names in warnings. + + * soap-client.el (soap-decode-xs-complex-type): Fix splicing. + + * soap-client.el (soap-decode-xs-complex-type): Eliminate invalid + warnings for choice types. + + * soap-client.el (soap-encode-xs-complex-type-attributes): Also + encode base type attributes. + + * soap-client.el (soap-encode-xs-complex-type): Fix compilation + warning. Print e-name in warnings, or element if e-name is nil. + + * soap-client.el (soap-xs-element): Add alternatives slot. + (soap-xs-parse-element): Set substitution-group. + (soap-resolve-references-for-xs-element): Populate alternatives + slot. + (soap-get-candidate-elements): New function. + (soap-encode-xs-complex-type): Iterate through all candidate + elements. Handle types with nil type indicator. Fix warning + logic. + + * soap-client.el (soap-current-wsdl): moved declaration earlier in + the file to prevent compiler warning. + + * soap-client.el (soap-node-optional): New function. + (soap-node-multiple): Likewise. + (soap-xs-parse-element): Call soap-node-optional and + soap-node-multiple. + (soap-xs-complex-type): Add optional? and multiple? slots. + (soap-xml-get-children-fq): New function. + (soap-xs-element-get-fq-name): Likewise. + (soap-xs-complex-type-optional-p): Likewise. + (soap-xs-complex-type-multiple-p): Likewise. + (soap-xs-attributes-consolidate): Likewise. + (soap-decode-xs-attributes): Likewise. + (soap-decode-xs-complex-type): Decode types with nil type + indicator. Support children that use local namespaces. Decode + attributes. Add type considerations to optional? and multiple? + warnings. + + * soap-client.el (soap-xs-parse-extension-or-restriction): Store + parsed attributes. + (soap-encode-xs-complex-type-attributes): Encode custom + attributes. + + * soap-client.el (soap-encode-xs-complex-type-attributes): don't + add the xsi:type attribute (Exchange refuses requests which have + this attribute) + + * soap-client.el, soap-inspect.el: converted to lexical binding, + corrected compiler warnings about unused function arguments and + local variables. + + * soap-client.el (soap-decode-xs-complex-type): Handle nil type + indicator. + (soap-parse-envelope): Handle response headers. + (soap-parse-response): Likewise. Only return non-nil decoded + values. + + * soap-client.el (soap-validate-xs-simple-type): Return validated + value. + + * soap-client.el (soap-xs-parse-element) + (soap-xs-parse-simple-type) + (soap-xs-parse-complex-type) + (soap-parse-message) + (soap-parse-operation): add the current namespace to the element + being created + (soap-resolve-references-for-xs-element) + (soap-resolve-references-for-xs-simple-type) + (soap-resolve-references-for-xs-complex-type) + (soap-resolve-references-for-operation): resolve the namespace to + the namespace tag + (soap-make-wsdl): specify a namespace tag when creating the xsd + and soapenc namespaces + (soap-wsdl-resolve-references): don't update namespace tags in + elements here + (soap-parse-port-type): bind the urn: to soap-target-xmlns + (soap-encode-body): don't add nil namespace tags to + soap-encoded-namespaces + + * soap-inspect.el: use `soap-make-wsdl` to construct the object + for registering the soap-inspect method.Make debbugs tests pass + * soap-client.el (soap-decode-any-type): use soap-l2fq on the type + name, also skip string only nodes when decoding a structure. + (soap-xs-parse-complex-type): (BUG) dispatch parsing for choice + types too + (soap-encode-body): grab the header value from the param table + + * soap-client.el (soap-should-encode-value-for-xs-element): new + function + (soap-encode-xs-element): don't encode nil value unless needed + + * soap-client.el (soap-bound-operation): new slot `soap-body` + (soap-parse-binding): parse the message parts required in the body + (soap-encode-body): encode only the parts that are declared to be + part of the body + + * soap-client.el (soap-encode-xs-element): use the fq name when + writing out the tag. + (soap-encode-body): remove hack that inserts the xmlns in the + element attributes list. + + * soap-client.el (soap-xs-attribute): add "default" slot + (soap-xs-parse-attribute): default slot is set from the XML + "fixed" attribute. + (soap-encode-xs-complex-type-attributes): encode any attributes + that have a default value. Also, don't put the xsi:nil attribute + when the complex type has no content anyway. + + * soap-client.el (soap-well-known-xmlns): add the xml namespace + (soap-local-xmlns): start with the xml namespace + (soap-xml-node-first-child): skip xsd:annotation nodes too + (soap-make-xs-basic-types): more xsd types added + (soap-encode-xs-basic-type, soap-decode-xs-basic-type): handle + "language", "time", "date", "nonNegativeInteger" + (soap-resolve-references-for-xs-element): don't signal an error if + the element does not have a type. + (soap-xs-parse-simple-type): subtypes are handled with ecase, + added stum for xsd:list + (soap-xs-add-union): call soap-l2fq on all union members + (soap-xs-add-extension): call soap-l2fq on the base member + (soap-resolve-references-for-xs-simple-type): don't signal an + error if the simple type has no base. + (soap-resolve-references-for-xs-simple-type): bugfix, call + soap-wsdl-get on each type of the base + + * soap-client.el (soap-resolve-references-for-xs-attribute): + referenced type can be eiher a simple type or a basic type + (soap-xs-add-restriction) + (soap-xs-parse-extension-or-restriction): use `soap-l2fq' on base + (soap-make-xs-basic-types) + (soap-encode-xs-basic-type, soap-decode-xs-basic-type): add + support for more XMLSchema basic types + (soap-current-file, soap-xmlschema-imports): new defvars + (soap-parse-schema): add locations from xsd:import tags to + `soap-xmlschema-imports' + (soap-wsdl): make destructor private + (soap-make-wsdl): new defun, SOAP-WSDL object constructor + (soap-wsdl-add-alias): check if we try to replace aliases + (soap-fetch-xml-from-url, soap-fetch-xml-from-file) + (soap-fetch-xml): new defuns + (soap-load-wsdl): updated to load the WSDL from either a file or + an url + (soap-load-wsdl-from-url): now an alias to `soap-load-wsdl' + (soap-parse-wsdl): process wsdl:import tags and imports from + `soap-xmlschema-imports' + * soap-client.el (soap-l2wk): bugfix: call symbolp instead of + symbol-name + (soap-l2fq): make the name part always a string + (soap-name-p): new defun, used for name tests + + * soap-inspect.el (soap-sample-value-for-xs-complex-type): supply + sample values for choice types with a special tag + * soap-client.el (soap-encode-xs-complex-type): handle anonymous + elements correctly + (soap-encode-value): accept nodes that have no namespace tag + + * soap-client.el (soap-invoke): encode the string for + `url-request-data' as UTF-8. Fixes issue 16 + +2015-10-25 Eli Zaretskii + + * lisp/progmodes/grep.el (grep): Doc fix. (Bug#21754) + +2015-10-25 Artur Malabarba + + * src/keyboard.c (post-command-hook): Extend the docstring + + Mainly, explain how to use it without hanging Emacs, or giving the + impression that it is hanging. Also mention `pre-command-hook'. + + (pre-command-hook): Mention `post-command-hook'. + +2015-10-25 Artur Malabarba + + * lisp/custom.el (custom-declare-variable): Shorten code again + + Without using pcase this time. We can't use pcase because it is loaded + after custom in loadup.el. Also add a comment explaining this to future + dummies like me. + +2015-10-25 Michael Albinus + + Document file notification `stopped' event + + * doc/lispref/os.texi (File Notifications): Document `stopped event'. + +2015-10-25 Michael Albinus + + Introduce `stopped' event in file notification + + * lisp/filenotify.el (file-notify--rm-descriptor): New defun. + (file-notify-rm-watch): Use it. + (file-notify-callback): Implement `stopped' event. + (file-notify-add-watch): Mention `stopped' in the docstring. + Check, that upper directory exists. + + * test/automated/file-notify-tests.el (file-notify-test01-add-watch): + Add two test cases. + (file-notify-test02-events): Handle also `stopped' event. + (file-notify-test04-file-validity): Add another test case. + 2015-10-25 Paul Eggert Revert commit that broke 'make bootstrap' @@ -16476,7 +17655,7 @@ This file records repository revisions from commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to -commit 0afbc5b2a2cda9fe12246bf62567162ae2577160 (inclusive). +commit cb56d4cec80a4da41710e2fa68dcd3d95e2a8e4c (inclusive). See ChangeLog.1 for earlier changes. ;; Local Variables: commit cb56d4cec80a4da41710e2fa68dcd3d95e2a8e4c Author: Glenn Morris Date: Sun Nov 1 06:34:43 2015 -0500 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index e3e620c..d8f627a 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -1480,8 +1480,8 @@ Special commands: ;;;*** -;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (22027 -;;;;;; 46774 676310 591000)) +;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (22067 +;;;;;; 17342 158157 143000)) ;;; Generated autoloads from gnus/auth-source.el (defvar auth-source-cache-expiry 7200 "\ @@ -1656,8 +1656,8 @@ should be non-nil). ;;;*** -;;;### (autoloads nil "autorevert" "autorevert.el" (21980 16567 365544 -;;;;;; 893000)) +;;;### (autoloads nil "autorevert" "autorevert.el" (22065 61995 826407 +;;;;;; 852000)) ;;; Generated autoloads from autorevert.el (autoload 'auto-revert-mode "autorevert" "\ @@ -2742,8 +2742,8 @@ Like `bug-reference-mode', but only buttonize in comments and strings. ;;;*** -;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (22011 -;;;;;; 58553 361858 469000)) +;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (22067 +;;;;;; 17342 138157 143000)) ;;; Generated autoloads from emacs-lisp/bytecomp.el (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) @@ -2898,7 +2898,7 @@ from the cursor position. ;;;*** -;;;### (autoloads nil "calc" "calc/calc.el" (22026 25907 527502 692000)) +;;;### (autoloads nil "calc" "calc/calc.el" (22039 37934 737599 199000)) ;;; Generated autoloads from calc/calc.el (define-key ctl-x-map "*" 'calc-dispatch) @@ -3007,8 +3007,8 @@ See the documentation for `calculator-mode' for more information. ;;;*** -;;;### (autoloads nil "calendar" "calendar/calendar.el" (22026 25907 -;;;;;; 535502 692000)) +;;;### (autoloads nil "calendar" "calendar/calendar.el" (22042 14122 +;;;;;; 205169 136000)) ;;; Generated autoloads from calendar/calendar.el (autoload 'calendar "calendar" "\ @@ -3179,8 +3179,8 @@ the absolute file name of the file if STYLE-NAME is nil. ;;;*** -;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (22021 7991 -;;;;;; 65719 83000)) +;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (22040 58794 +;;;;;; 688259 771000)) ;;; Generated autoloads from progmodes/cc-mode.el (autoload 'c-initialize-cc-mode "cc-mode" "\ @@ -3399,8 +3399,8 @@ and exists only for compatibility reasons. ;;;*** -;;;### (autoloads nil "ccl" "international/ccl.el" (21998 46517 74024 -;;;;;; 649000)) +;;;### (autoloads nil "ccl" "international/ccl.el" (22064 41137 985468 +;;;;;; 395000)) ;;; Generated autoloads from international/ccl.el (autoload 'ccl-compile "ccl" "\ @@ -3409,9 +3409,9 @@ Return the compiled code of CCL-PROGRAM as a vector of integers. \(fn CCL-PROGRAM)" nil nil) (autoload 'ccl-dump "ccl" "\ -Disassemble compiled CCL-CODE. +Disassemble compiled CCL-code CODE. -\(fn CCL-CODE)" nil nil) +\(fn CODE)" nil nil) (autoload 'declare-ccl-program "ccl" "\ Declare NAME as a name of CCL program. @@ -3750,25 +3750,15 @@ Choose `cfengine2-mode' or `cfengine3-mode' by buffer contents. ;;;*** -;;;### (autoloads nil "character-fold" "character-fold.el" (21973 -;;;;;; 43315 242113 285000)) +;;;### (autoloads nil "character-fold" "character-fold.el" (22068 +;;;;;; 38191 905155 451000)) ;;; Generated autoloads from character-fold.el -(defvar character-fold-search nil "\ -Non-nil if searches should fold similar characters. -This means some characters will match entire groups of characters. -For instance, \" will match all variants of double quotes, and -the letter a will match all of its accented versions (and then -some).") - (autoload 'character-fold-to-regexp "character-fold" "\ Return a regexp matching anything that character-folds into STRING. -If `character-fold-search' is nil, `regexp-quote' string. -Otherwise, any character in STRING that has an entry in +Any character in STRING that has an entry in `character-fold-table' is replaced with that entry (which is a regexp) and other characters are `regexp-quote'd. -If LAX is non-nil, any single whitespace character is allowed to -match any number of times. \(fn STRING &optional LAX)" nil nil) @@ -4233,7 +4223,7 @@ is run). ;;;*** -;;;### (autoloads nil "color" "color.el" (22026 25907 555502 692000)) +;;;### (autoloads nil "color" "color.el" (22055 26158 710447 352000)) ;;; Generated autoloads from color.el (autoload 'color-name-to-rgb "color" "\ @@ -4390,8 +4380,8 @@ on third call it again advances points to the next difference and so on. ;;;*** -;;;### (autoloads nil "compile" "progmodes/compile.el" (22015 55603 -;;;;;; 789705 321000)) +;;;### (autoloads nil "compile" "progmodes/compile.el" (22032 64681 +;;;;;; 370838 183000)) ;;; Generated autoloads from progmodes/compile.el (defvar compilation-mode-hook nil "\ @@ -5064,8 +5054,8 @@ with empty strings removed. ;;;*** -;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (22014 34736 -;;;;;; 811840 613000)) +;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (22038 17067 +;;;;;; 867243 731000)) ;;; Generated autoloads from textmodes/css-mode.el (autoload 'css-mode "css-mode" "\ @@ -5140,7 +5130,7 @@ Activates the region if needed. Only lasts until the region is deactivated. ;;;*** ;;;### (autoloads nil "cursor-sensor" "emacs-lisp/cursor-sensor.el" -;;;;;; (21804 59688 154807 989000)) +;;;;;; (22069 62806 562804 836000)) ;;; Generated autoloads from emacs-lisp/cursor-sensor.el (autoload 'cursor-intangible-mode "cursor-sensor" "\ @@ -6421,7 +6411,7 @@ Optional arguments are passed to `dig-invoke'. ;;;*** -;;;### (autoloads nil "dired" "dired.el" (21998 46624 946024 649000)) +;;;### (autoloads nil "dired" "dired.el" (22067 17342 118157 143000)) ;;; Generated autoloads from dired.el (defvar dired-listing-switches (purecopy "-al") "\ @@ -6776,8 +6766,8 @@ Locate SOA record and increment the serial field. ;;;*** -;;;### (autoloads nil "doc-view" "doc-view.el" (21716 41663 456033 -;;;;;; 27000)) +;;;### (autoloads nil "doc-view" "doc-view.el" (22058 2348 742214 +;;;;;; 951000)) ;;; Generated autoloads from doc-view.el (autoload 'doc-view-mode-p "doc-view" "\ @@ -7617,7 +7607,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. ;;;*** -;;;### (autoloads nil "ede" "cedet/ede.el" (21996 4784 796983 429000)) +;;;### (autoloads nil "ede" "cedet/ede.el" (22040 58794 676259 771000)) ;;; Generated autoloads from cedet/ede.el (push (purecopy '(ede 1 2)) package--builtin-versions) @@ -8135,8 +8125,8 @@ BUFFER is put back into its original major mode. ;;;*** -;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (22009 -;;;;;; 58952 307546 645000)) +;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (22067 +;;;;;; 17342 150157 143000)) ;;; Generated autoloads from emacs-lisp/eieio-core.el (push (purecopy '(eieio-core 1 4)) package--builtin-versions) @@ -8210,8 +8200,8 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks. ;;;*** -;;;### (autoloads nil "elint" "emacs-lisp/elint.el" (21998 46516 -;;;;;; 994024 649000)) +;;;### (autoloads nil "elint" "emacs-lisp/elint.el" (22030 22952 +;;;;;; 921158 467000)) ;;; Generated autoloads from emacs-lisp/elint.el (autoload 'elint-file "elint" "\ @@ -8309,8 +8299,8 @@ Other values are interpreted as usual. ;;;*** -;;;### (autoloads nil "emacsbug" "mail/emacsbug.el" (21989 31537 -;;;;;; 887825 721000)) +;;;### (autoloads nil "emacsbug" "mail/emacsbug.el" (22030 22952 +;;;;;; 933158 467000)) ;;; Generated autoloads from mail/emacsbug.el (autoload 'report-emacs-bug "emacsbug" "\ @@ -9272,8 +9262,8 @@ Add a file to `erc-xdcc-files'. ;;;*** -;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (22011 58553 409858 -;;;;;; 469000)) +;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (22063 20273 739891 +;;;;;; 395000)) ;;; Generated autoloads from emacs-lisp/ert.el (autoload 'ert-deftest "ert" "\ @@ -9355,8 +9345,8 @@ Kill all test buffers that are still live. ;;;*** -;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (22003 64432 -;;;;;; 600146 533000)) +;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (22065 61995 +;;;;;; 862407 852000)) ;;; Generated autoloads from eshell/esh-mode.el (autoload 'eshell-mode "esh-mode" "\ @@ -10034,7 +10024,7 @@ fourth arg NOSEP non-nil inhibits this. ;;;*** -;;;### (autoloads nil "eww" "net/eww.el" (22011 58553 761858 469000)) +;;;### (autoloads nil "eww" "net/eww.el" (22063 20273 743891 395000)) ;;; Generated autoloads from net/eww.el (defvar eww-suggest-uris '(eww-links-at-point url-get-url-at-point eww-current-url) "\ @@ -10570,8 +10560,8 @@ the name is considered already unique; only the second substitution ;;;*** -;;;### (autoloads nil "filenotify" "filenotify.el" (22019 52657 867929 -;;;;;; 676000)) +;;;### (autoloads nil "filenotify" "filenotify.el" (22069 62806 562804 +;;;;;; 836000)) ;;; Generated autoloads from filenotify.el (autoload 'file-notify-handle-event "filenotify" "\ @@ -11648,8 +11638,8 @@ Interactively, reads the register using `register-read-with-preview'. ;;;*** -;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (22029 2088 -;;;;;; 514685 339000)) +;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (22030 22952 +;;;;;; 977158 467000)) ;;; Generated autoloads from progmodes/gdb-mi.el (defvar gdb-enable-debug nil "\ @@ -12770,8 +12760,8 @@ Retrieve MAIL-ADDRESS gravatar and returns it. ;;;*** -;;;### (autoloads nil "grep" "progmodes/grep.el" (22027 46774 676310 -;;;;;; 591000)) +;;;### (autoloads nil "grep" "progmodes/grep.el" (22061 64938 520287 +;;;;;; 963000)) ;;; Generated autoloads from progmodes/grep.el (defvar grep-window-height nil "\ @@ -12853,20 +12843,23 @@ Sets `grep-last-buffer' and `compilation-window-height'. \(fn)" nil nil) (autoload 'grep "grep" "\ -Run grep, with user-specified args, and collect output in a buffer. -While grep runs asynchronously, you can use \\[next-error] (M-x next-error), -or \\\\[compile-goto-error] in the *grep* buffer, to go to the lines where grep found -matches. To kill the grep job before it finishes, type \\[kill-compilation]. +Run Grep with user-specified COMMAND-ARGS, collect output in a buffer. +While Grep runs asynchronously, you can use \\[next-error] (M-x next-error), +or \\\\[compile-goto-error] in the *grep* buffer, to go to the lines where Grep found +matches. To kill the Grep job before it finishes, type \\[kill-compilation]. + +Noninteractively, COMMAND-ARGS should specify the Grep command-line +arguments. For doing a recursive `grep', see the `rgrep' command. For running -`grep' in a specific directory, see `lgrep'. +Grep in a specific directory, see `lgrep'. This command uses a special history list for its COMMAND-ARGS, so you can easily repeat a grep command. -A prefix argument says to default the argument based upon the current -tag the cursor is over, substituting it into the last grep command -in the grep command history (or into `grep-command' if that history +A prefix argument says to default the COMMAND-ARGS based on the current +tag the cursor is over, substituting it into the last Grep command +in the Grep command history (or into `grep-command' if that history list is empty). \(fn COMMAND-ARGS)" t nil) @@ -13364,8 +13357,8 @@ different regions. With numeric argument ARG, behaves like ;;;*** -;;;### (autoloads nil "help-fns" "help-fns.el" (22011 58553 601858 -;;;;;; 469000)) +;;;### (autoloads nil "help-fns" "help-fns.el" (22067 17342 162157 +;;;;;; 143000)) ;;; Generated autoloads from help-fns.el (autoload 'describe-function "help-fns" "\ @@ -13582,7 +13575,7 @@ Provide help for current mode. ;;;*** -;;;### (autoloads nil "hexl" "hexl.el" (21985 34484 226705 925000)) +;;;### (autoloads nil "hexl" "hexl.el" (22056 47028 723798 795000)) ;;; Generated autoloads from hexl.el (autoload 'hexl-mode "hexl" "\ @@ -14429,8 +14422,8 @@ bound to the current value of the filter. ;;;*** -;;;### (autoloads nil "ibuffer" "ibuffer.el" (22026 25907 595502 -;;;;;; 692000)) +;;;### (autoloads nil "ibuffer" "ibuffer.el" (22032 64681 350838 +;;;;;; 183000)) ;;; Generated autoloads from ibuffer.el (autoload 'ibuffer-list-buffers "ibuffer" "\ @@ -15022,7 +15015,7 @@ DEF, if non-nil, is the default value. ;;;*** -;;;### (autoloads nil "ielm" "ielm.el" (21980 16567 705544 893000)) +;;;### (autoloads nil "ielm" "ielm.el" (22067 17342 170157 143000)) ;;; Generated autoloads from ielm.el (autoload 'ielm "ielm" "\ @@ -15050,7 +15043,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. ;;;*** -;;;### (autoloads nil "image" "image.el" (22011 58553 641858 469000)) +;;;### (autoloads nil "image" "image.el" (22048 52907 35535 316000)) ;;; Generated autoloads from image.el (autoload 'image-type-from-data "image" "\ @@ -15680,7 +15673,7 @@ of `inferior-lisp-program'). Runs the hooks from ;;;*** -;;;### (autoloads nil "info" "info.el" (22011 58553 645858 469000)) +;;;### (autoloads nil "info" "info.el" (22056 47028 727798 795000)) ;;; Generated autoloads from info.el (defcustom Info-default-directory-list (let* ((config-dir (file-name-as-directory (or (and (featurep 'ns) (let ((dir (expand-file-name "../info" data-directory))) (if (file-directory-p dir) dir))) configure-info-directory))) (prefixes (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) (suffixes '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/" "emacs/" "lib/" "lib/emacs/")) (standard-info-dirs (apply #'nconc (mapcar (lambda (pfx) (let ((dirs (mapcar (lambda (sfx) (concat pfx sfx "info/")) suffixes))) (prune-directory-list dirs))) prefixes))) (dirs (if (member config-dir standard-info-dirs) (nconc standard-info-dirs (list config-dir)) (cons config-dir standard-info-dirs)))) (if (not (eq system-type 'windows-nt)) dirs (let* ((instdir (file-name-directory invocation-directory)) (dir1 (expand-file-name "../info/" instdir)) (dir2 (expand-file-name "../../../info/" instdir))) (cond ((file-exists-p dir1) (append dirs (list dir1))) ((file-exists-p dir2) (append dirs (list dir2))) (t dirs))))) "\ @@ -15940,8 +15933,8 @@ Perform completion on file preceding point. ;;;*** -;;;### (autoloads nil "info-xref" "info-xref.el" (21978 61237 550488 -;;;;;; 269000)) +;;;### (autoloads nil "info-xref" "info-xref.el" (22030 22952 929158 +;;;;;; 467000)) ;;; Generated autoloads from info-xref.el (push (purecopy '(info-xref 3)) package--builtin-versions) @@ -16569,8 +16562,8 @@ by `jka-compr-installed'. ;;;*** -;;;### (autoloads nil "js" "progmodes/js.el" (22026 25907 635502 -;;;;;; 692000)) +;;;### (autoloads nil "js" "progmodes/js.el" (22069 62806 682804 +;;;;;; 836000)) ;;; Generated autoloads from progmodes/js.el (push (purecopy '(js 9)) package--builtin-versions) @@ -16578,13 +16571,26 @@ by `jka-compr-installed'. Major mode for editing JavaScript. \(fn)" t nil) + +(autoload 'js-jsx-mode "js" "\ +Major mode for editing JSX. + +To customize the indentation for this mode, set the SGML offset +variables (`sgml-basic-offset', `sgml-attribute-offset' et al) +locally, like so: + + (defun set-jsx-indentation () + (setq-local sgml-basic-offset js-indent-level)) + (add-hook 'js-jsx-mode-hook #'set-jsx-indentation) + +\(fn)" t nil) (defalias 'javascript-mode 'js-mode) (dolist (name (list "node" "nodejs" "gjs" "rhino")) (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'js-mode))) ;;;*** -;;;### (autoloads nil "json" "json.el" (21998 46517 78024 649000)) +;;;### (autoloads nil "json" "json.el" (22064 41137 993468 395000)) ;;; Generated autoloads from json.el (push (purecopy '(json 1 4)) package--builtin-versions) @@ -17817,8 +17823,8 @@ Default bookmark handler for Man buffers. ;;;*** -;;;### (autoloads nil "map" "emacs-lisp/map.el" (21996 4784 808983 -;;;;;; 429000)) +;;;### (autoloads nil "map" "emacs-lisp/map.el" (22063 20273 739891 +;;;;;; 395000)) ;;; Generated autoloads from emacs-lisp/map.el (push (purecopy '(map 1 0)) package--builtin-versions) @@ -18199,7 +18205,7 @@ delete the draft message. ;;;*** -;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (22011 58553 749858 469000)) +;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (22030 22952 945158 467000)) ;;; Generated autoloads from mh-e/mh-e.el (push (purecopy '(mh-e 8 6)) package--builtin-versions) @@ -18660,8 +18666,8 @@ body) or \"attachment\" (separate from the body). ;;;*** -;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (22011 58553 -;;;;;; 245858 469000)) +;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (22030 22952 +;;;;;; 905158 467000)) ;;; Generated autoloads from cedet/mode-local.el (put 'define-overloadable-function 'doc-string-elt 3) @@ -18776,7 +18782,7 @@ To test this function, evaluate: ;;;*** -;;;### (autoloads nil "mpc" "mpc.el" (22002 43570 536887 749000)) +;;;### (autoloads nil "mpc" "mpc.el" (22050 8240 94934 108000)) ;;; Generated autoloads from mpc.el (autoload 'mpc "mpc" "\ @@ -19384,8 +19390,8 @@ running already. ;;;*** -;;;### (autoloads nil "newst-treeview" "net/newst-treeview.el" (21998 -;;;;;; 46517 110024 649000)) +;;;### (autoloads nil "newst-treeview" "net/newst-treeview.el" (22030 +;;;;;; 22952 973158 467000)) ;;; Generated autoloads from net/newst-treeview.el (autoload 'newsticker-treeview "newst-treeview" "\ @@ -19433,7 +19439,7 @@ This command does not work if you use short group names. ;;;*** -;;;### (autoloads nil "nnml" "gnus/nnml.el" (21948 40114 266686 453000)) +;;;### (autoloads nil "nnml" "gnus/nnml.el" (22054 5291 911134 163000)) ;;; Generated autoloads from gnus/nnml.el (autoload 'nnml-generate-nov-databases "nnml" "\ @@ -19490,9 +19496,9 @@ closing requests for requests that are used in matched pairs. ;;;*** -;;;### (autoloads nil "ntlm" "net/ntlm.el" (21997 25649 666447 325000)) +;;;### (autoloads nil "ntlm" "net/ntlm.el" (22069 62806 678804 836000)) ;;; Generated autoloads from net/ntlm.el -(push (purecopy '(ntlm 2 0)) package--builtin-versions) +(push (purecopy '(ntlm 2 0 0)) package--builtin-versions) ;;;*** @@ -20343,8 +20349,8 @@ See the command `outline-mode' for more information on this mode. ;;;*** -;;;### (autoloads nil "package" "emacs-lisp/package.el" (22000 31493 -;;;;;; 736082 901000)) +;;;### (autoloads nil "package" "emacs-lisp/package.el" (22059 23214 +;;;;;; 33660 839000)) ;;; Generated autoloads from emacs-lisp/package.el (push (purecopy '(package 1 0 1)) package--builtin-versions) @@ -20388,7 +20394,7 @@ downloads in the background. (autoload 'package-install "package" "\ Install the package PKG. -PKG can be a package-desc or the package name of one the available packages +PKG can be a package-desc or a symbol naming one of the available packages in an archive in `package-archives'. Interactively, prompt for its name. If called interactively or if DONT-SELECT nil, add PKG to @@ -20883,7 +20889,7 @@ Setup `shell-mode' to use pcomplete. ;;;*** -;;;### (autoloads nil "pcvs" "vc/pcvs.el" (21985 34484 302705 925000)) +;;;### (autoloads nil "pcvs" "vc/pcvs.el" (22065 61995 886407 852000)) ;;; Generated autoloads from vc/pcvs.el (autoload 'cvs-checkout "pcvs" "\ @@ -21878,8 +21884,8 @@ Return the project instance in DIR or `default-directory'. ;;;*** -;;;### (autoloads nil "prolog" "progmodes/prolog.el" (22027 46774 -;;;;;; 684310 591000)) +;;;### (autoloads nil "prolog" "progmodes/prolog.el" (22040 58794 +;;;;;; 692259 771000)) ;;; Generated autoloads from progmodes/prolog.el (autoload 'prolog-mode "prolog" "\ @@ -22187,8 +22193,8 @@ Optional argument FACE specifies the face to do the highlighting. ;;;*** -;;;### (autoloads nil "python" "progmodes/python.el" (22026 25907 -;;;;;; 639502 692000)) +;;;### (autoloads nil "python" "progmodes/python.el" (22069 62806 +;;;;;; 686804 836000)) ;;; Generated autoloads from progmodes/python.el (push (purecopy '(python 0 25 1)) package--builtin-versions) @@ -22821,8 +22827,8 @@ For true \"word wrap\" behavior, use `visual-line-mode' instead. ;;;*** -;;;### (autoloads nil "reftex" "textmodes/reftex.el" (22026 25907 -;;;;;; 655502 692000)) +;;;### (autoloads nil "reftex" "textmodes/reftex.el" (22056 47028 +;;;;;; 787798 795000)) ;;; Generated autoloads from textmodes/reftex.el (autoload 'reftex-citation "reftex-cite" nil t) (autoload 'reftex-all-document-files "reftex-parse") @@ -23572,8 +23578,8 @@ Toggle the use of ROT13 encoding for the current window. ;;;*** -;;;### (autoloads nil "rst" "textmodes/rst.el" (22026 25907 659502 -;;;;;; 692000)) +;;;### (autoloads nil "rst" "textmodes/rst.el" (22034 20008 325500 +;;;;;; 287000)) ;;; Generated autoloads from textmodes/rst.el (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode))) @@ -24481,14 +24487,14 @@ Like `mail' command, but display mail buffer in another frame. ;;;*** -;;;### (autoloads nil "seq" "emacs-lisp/seq.el" (22026 25907 583502 -;;;;;; 692000)) +;;;### (autoloads nil "seq" "emacs-lisp/seq.el" (22065 61995 842407 +;;;;;; 852000)) ;;; Generated autoloads from emacs-lisp/seq.el -(push (purecopy '(seq 2 0)) package--builtin-versions) +(push (purecopy '(seq 2 2)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "server" "server.el" (21998 46517 270024 649000)) +;;;### (autoloads nil "server" "server.el" (22056 47028 775798 795000)) ;;; Generated autoloads from server.el (put 'server-host 'risky-local-variable t) @@ -24665,8 +24671,8 @@ To work around that, do: ;;;*** -;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (22027 -;;;;;; 46774 688310 591000)) +;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (22061 +;;;;;; 64938 532287 963000)) ;;; Generated autoloads from progmodes/sh-script.el (push (purecopy '(sh-script 2 0 6)) package--builtin-versions) (put 'sh-shell 'safe-local-variable 'symbolp) @@ -24866,7 +24872,7 @@ Otherwise, one argument `-i' is passed to the shell. ;;;*** -;;;### (autoloads nil "shr" "net/shr.el" (22026 25907 631502 692000)) +;;;### (autoloads nil "shr" "net/shr.el" (22047 32042 328736 723000)) ;;; Generated autoloads from net/shr.el (autoload 'shr-render-region "shr" "\ @@ -25210,6 +25216,20 @@ then `snmpv2-mode-hook'. ;;;*** +;;;### (autoloads nil "soap-client" "net/soap-client.el" (22061 64938 +;;;;;; 516287 963000)) +;;; Generated autoloads from net/soap-client.el +(push (purecopy '(soap-client 3 0 1)) package--builtin-versions) + +;;;*** + +;;;### (autoloads nil "soap-inspect" "net/soap-inspect.el" (22061 +;;;;;; 64938 516287 963000)) +;;; Generated autoloads from net/soap-inspect.el +(push (purecopy '(soap-client 3 0 1)) package--builtin-versions) + +;;;*** + ;;;### (autoloads nil "solar" "calendar/solar.el" (21849 48176 337264 ;;;;;; 443000)) ;;; Generated autoloads from calendar/solar.el @@ -27091,7 +27111,7 @@ Normally input is edited in Emacs and sent a line at a time. ;;;*** -;;;### (autoloads nil "term" "term.el" (22011 58553 997858 469000)) +;;;### (autoloads nil "term" "term.el" (22042 14122 209169 136000)) ;;; Generated autoloads from term.el (autoload 'make-term "term" "\ @@ -27170,8 +27190,8 @@ tetris-mode keybindings: ;;;*** -;;;### (autoloads nil "tex-mode" "textmodes/tex-mode.el" (22026 25907 -;;;;;; 663502 692000)) +;;;### (autoloads nil "tex-mode" "textmodes/tex-mode.el" (22064 41138 +;;;;;; 13468 395000)) ;;; Generated autoloads from textmodes/tex-mode.el (defvar tex-shell-file-name nil "\ @@ -27724,6 +27744,13 @@ In dired, call the setroot program on the image at point. ;;;*** +;;;### (autoloads nil "thunk" "emacs-lisp/thunk.el" (22064 41137 +;;;;;; 961468 395000)) +;;; Generated autoloads from emacs-lisp/thunk.el +(push (purecopy '(thunk 1 0)) package--builtin-versions) + +;;;*** + ;;;### (autoloads nil "tibet-util" "language/tibet-util.el" (21670 ;;;;;; 32331 385639 720000)) ;;; Generated autoloads from language/tibet-util.el @@ -28446,8 +28473,7 @@ the output buffer or changing the window configuration. ;;;*** -;;;### (autoloads nil "tramp" "net/tramp.el" (22015 55603 713705 -;;;;;; 321000)) +;;;### (autoloads nil "tramp" "net/tramp.el" (22064 41138 9468 395000)) ;;; Generated autoloads from net/tramp.el (defvar tramp-mode t "\ @@ -29114,8 +29140,8 @@ overriding the value of `url-gateway-method'. ;;;*** -;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (22011 -;;;;;; 58554 85858 469000)) +;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (22065 +;;;;;; 61995 878407 852000)) ;;; Generated autoloads from url/url-handlers.el (defvar url-handler-mode nil "\ @@ -30015,8 +30041,8 @@ should be applied to the background or to the foreground. ;;;*** -;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (22014 34736 819840 -;;;;;; 613000)) +;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (22064 41138 13468 +;;;;;; 395000)) ;;; Generated autoloads from vc/vc-bzr.el (defconst vc-bzr-admin-dirname ".bzr" "\ @@ -30032,8 +30058,8 @@ Name of the format file in a .bzr directory.") ;;;*** -;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (22014 34736 823840 -;;;;;; 613000)) +;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (22064 41138 17468 +;;;;;; 395000)) ;;; Generated autoloads from vc/vc-cvs.el (defun vc-cvs-registered (f) "Return non-nil if file F is registered with CVS." @@ -30044,8 +30070,8 @@ Name of the format file in a .bzr directory.") ;;;*** -;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (21842 40083 319216 -;;;;;; 272000)) +;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (22055 26158 818447 +;;;;;; 352000)) ;;; Generated autoloads from vc/vc-dir.el (autoload 'vc-dir "vc-dir" "\ @@ -30093,8 +30119,8 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-git" "vc/vc-git.el" (22014 34736 835840 -;;;;;; 613000)) +;;;### (autoloads nil "vc-git" "vc/vc-git.el" (22064 41138 17468 +;;;;;; 395000)) ;;; Generated autoloads from vc/vc-git.el (defun vc-git-registered (file) "Return non-nil if FILE is registered with git." @@ -30105,7 +30131,7 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (22014 34736 835840 613000)) +;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (22064 41138 21468 395000)) ;;; Generated autoloads from vc/vc-hg.el (defun vc-hg-registered (file) "Return non-nil if FILE is registered with hg." @@ -30116,8 +30142,8 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (22014 34736 839840 -;;;;;; 613000)) +;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (22064 41138 21468 +;;;;;; 395000)) ;;; Generated autoloads from vc/vc-mtn.el (defconst vc-mtn-admin-dir "_MTN" "\ @@ -30180,8 +30206,8 @@ For a description of possible values, see `vc-check-master-templates'.") ;;;*** -;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (22011 58554 97858 -;;;;;; 469000)) +;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (22064 41138 21468 +;;;;;; 395000)) ;;; Generated autoloads from vc/vc-svn.el (defun vc-svn-registered (f) (let ((admin-dir (cond ((and (eq system-type 'windows-nt) @@ -31918,7 +31944,7 @@ Default MODIFIER is 'shift. ;;;*** -;;;### (autoloads nil "winner" "winner.el" (22009 58952 311546 645000)) +;;;### (autoloads nil "winner" "winner.el" (22030 22953 17158 467000)) ;;; Generated autoloads from winner.el (defvar winner-mode nil "\ @@ -32191,37 +32217,37 @@ Zone out, completely. ;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el" ;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el" ;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el" -;;;;;; "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el" -;;;;;; "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el" -;;;;;; "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el" -;;;;;; "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el" -;;;;;; "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el" -;;;;;; "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el" -;;;;;; "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el" -;;;;;; "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el" -;;;;;; "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el" -;;;;;; "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el" -;;;;;; "calendar/cal-iso.el" "calendar/cal-julian.el" "calendar/cal-loaddefs.el" -;;;;;; "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el" -;;;;;; "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el" -;;;;;; "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "cdl.el" -;;;;;; "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el" -;;;;;; "cedet/cedet-idutils.el" "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" -;;;;;; "cedet/ede/base.el" "cedet/ede/config.el" "cedet/ede/cpp-root.el" -;;;;;; "cedet/ede/custom.el" "cedet/ede/detect.el" "cedet/ede/dired.el" -;;;;;; "cedet/ede/emacs.el" "cedet/ede/files.el" "cedet/ede/generic.el" -;;;;;; "cedet/ede/linux.el" "cedet/ede/loaddefs.el" "cedet/ede/locate.el" -;;;;;; "cedet/ede/make.el" "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el" -;;;;;; "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el" -;;;;;; "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el" -;;;;;; "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el" -;;;;;; "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" "cedet/ede/proj.el" -;;;;;; "cedet/ede/project-am.el" "cedet/ede/shell.el" "cedet/ede/simple.el" -;;;;;; "cedet/ede/source.el" "cedet/ede/speedbar.el" "cedet/ede/srecode.el" -;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/semantic/analyze.el" -;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/debug.el" -;;;;;; "cedet/semantic/analyze/fcn.el" "cedet/semantic/analyze/refs.el" -;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el" +;;;;;; "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el" +;;;;;; "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el" +;;;;;; "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el" +;;;;;; "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el" +;;;;;; "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el" +;;;;;; "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-units.el" +;;;;;; "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el" +;;;;;; "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el" +;;;;;; "calendar/cal-bahai.el" "calendar/cal-coptic.el" "calendar/cal-french.el" +;;;;;; "calendar/cal-html.el" "calendar/cal-islam.el" "calendar/cal-iso.el" +;;;;;; "calendar/cal-julian.el" "calendar/cal-loaddefs.el" "calendar/cal-mayan.el" +;;;;;; "calendar/cal-menu.el" "calendar/cal-move.el" "calendar/cal-persia.el" +;;;;;; "calendar/cal-tex.el" "calendar/cal-x.el" "calendar/diary-loaddefs.el" +;;;;;; "calendar/hol-loaddefs.el" "cdl.el" "cedet/cedet-cscope.el" +;;;;;; "cedet/cedet-files.el" "cedet/cedet-global.el" "cedet/cedet-idutils.el" +;;;;;; "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" "cedet/ede/base.el" +;;;;;; "cedet/ede/config.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el" +;;;;;; "cedet/ede/detect.el" "cedet/ede/dired.el" "cedet/ede/emacs.el" +;;;;;; "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el" +;;;;;; "cedet/ede/locate.el" "cedet/ede/make.el" "cedet/ede/makefile-edit.el" +;;;;;; "cedet/ede/pconf.el" "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" +;;;;;; "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" +;;;;;; "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" +;;;;;; "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" +;;;;;; "cedet/ede/proj.el" "cedet/ede/project-am.el" "cedet/ede/shell.el" +;;;;;; "cedet/ede/simple.el" "cedet/ede/source.el" "cedet/ede/speedbar.el" +;;;;;; "cedet/ede/srecode.el" "cedet/ede/system.el" "cedet/ede/util.el" +;;;;;; "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el" +;;;;;; "cedet/semantic/analyze/debug.el" "cedet/semantic/analyze/fcn.el" +;;;;;; "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el" +;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el" ;;;;;; "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el" ;;;;;; "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm.el" ;;;;;; "cedet/semantic/chart.el" "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" @@ -32236,13 +32262,13 @@ Zone out, completely. ;;;;;; "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el" ;;;;;; "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el" ;;;;;; "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el" -;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/loaddefs.el" -;;;;;; "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" "cedet/semantic/scope.el" -;;;;;; "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el" -;;;;;; "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/filter.el" -;;;;;; "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el" -;;;;;; "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el" -;;;;;; "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" +;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el" +;;;;;; "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el" +;;;;;; "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el" +;;;;;; "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el" +;;;;;; "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el" +;;;;;; "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el" +;;;;;; "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" ;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el" ;;;;;; "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el" ;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el" @@ -32252,56 +32278,55 @@ Zone out, completely. ;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el" ;;;;;; "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el" ;;;;;; "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el" -;;;;;; "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el" -;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt.el" "cedet/srecode/table.el" -;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el" -;;;;;; "dframe.el" "dired-aux.el" "dired-x.el" "dom.el" "dos-fns.el" -;;;;;; "dos-vars.el" "dos-w32.el" "dynamic-setting.el" "emacs-lisp/avl-tree.el" -;;;;;; "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" "emacs-lisp/cl-extra.el" -;;;;;; "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" -;;;;;; "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-compat.el" -;;;;;; "emacs-lisp/eieio-custom.el" "emacs-lisp/eieio-datadebug.el" -;;;;;; "emacs-lisp/eieio-opt.el" "emacs-lisp/eieio-speedbar.el" -;;;;;; "emacs-lisp/generator.el" "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" -;;;;;; "emacs-lisp/smie.el" "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el" -;;;;;; "emacs-lisp/tcover-unsafep.el" "emulation/cua-gmrk.el" "emulation/edt-lk201.el" -;;;;;; "emulation/edt-mapper.el" "emulation/edt-pc.el" "emulation/edt-vt100.el" -;;;;;; "emulation/viper-cmd.el" "emulation/viper-ex.el" "emulation/viper-init.el" -;;;;;; "emulation/viper-keym.el" "emulation/viper-macs.el" "emulation/viper-mous.el" -;;;;;; "emulation/viper-util.el" "erc/erc-backend.el" "erc/erc-goodies.el" -;;;;;; "erc/erc-ibuffer.el" "erc/erc-lang.el" "eshell/em-alias.el" -;;;;;; "eshell/em-banner.el" "eshell/em-basic.el" "eshell/em-cmpl.el" -;;;;;; "eshell/em-dirs.el" "eshell/em-glob.el" "eshell/em-hist.el" -;;;;;; "eshell/em-ls.el" "eshell/em-pred.el" "eshell/em-prompt.el" -;;;;;; "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el" -;;;;;; "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el" -;;;;;; "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el" -;;;;;; "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el" -;;;;;; "eshell/esh-module.el" "eshell/esh-opt.el" "eshell/esh-proc.el" -;;;;;; "eshell/esh-util.el" "eshell/esh-var.el" "ezimage.el" "format-spec.el" -;;;;;; "fringe.el" "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el" -;;;;;; "gnus/gnus-bcklg.el" "gnus/gnus-cite.el" "gnus/gnus-cloud.el" -;;;;;; "gnus/gnus-cus.el" "gnus/gnus-demon.el" "gnus/gnus-dup.el" -;;;;;; "gnus/gnus-eform.el" "gnus/gnus-ems.el" "gnus/gnus-icalendar.el" -;;;;;; "gnus/gnus-int.el" "gnus/gnus-logic.el" "gnus/gnus-mh.el" -;;;;;; "gnus/gnus-salt.el" "gnus/gnus-score.el" "gnus/gnus-srvr.el" -;;;;;; "gnus/gnus-topic.el" "gnus/gnus-undo.el" "gnus/gnus-util.el" -;;;;;; "gnus/gnus-uu.el" "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el" -;;;;;; "gnus/legacy-gnus-agent.el" "gnus/mail-parse.el" "gnus/mail-prsvr.el" -;;;;;; "gnus/mail-source.el" "gnus/mailcap.el" "gnus/messcompat.el" -;;;;;; "gnus/mm-archive.el" "gnus/mm-bodies.el" "gnus/mm-decode.el" -;;;;;; "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el" -;;;;;; "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el" -;;;;;; "gnus/nneething.el" "gnus/nngateway.el" "gnus/nnheader.el" -;;;;;; "gnus/nnimap.el" "gnus/nnir.el" "gnus/nnmail.el" "gnus/nnmaildir.el" -;;;;;; "gnus/nnmairix.el" "gnus/nnmbox.el" "gnus/nnmh.el" "gnus/nnnil.el" -;;;;;; "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el" "gnus/nnspool.el" -;;;;;; "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" "gnus/registry.el" -;;;;;; "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2231.el" -;;;;;; "gnus/rtree.el" "gnus/sieve-manage.el" "gnus/smime.el" "gnus/spam-stat.el" -;;;;;; "gnus/spam-wash.el" "hex-util.el" "hfy-cmap.el" "ibuf-ext.el" -;;;;;; "international/charscript.el" "international/fontset.el" -;;;;;; "international/iso-ascii.el" "international/ja-dic-cnv.el" +;;;;;; "cedet/srecode/map.el" "cedet/srecode/mode.el" "cedet/srecode/semantic.el" +;;;;;; "cedet/srecode/srt.el" "cedet/srecode/table.el" "cedet/srecode/template.el" +;;;;;; "cedet/srecode/texi.el" "cus-dep.el" "dframe.el" "dired-aux.el" +;;;;;; "dired-x.el" "dom.el" "dos-fns.el" "dos-vars.el" "dos-w32.el" +;;;;;; "dynamic-setting.el" "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" +;;;;;; "emacs-lisp/byte-opt.el" "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el" +;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" +;;;;;; "emacs-lisp/eieio-compat.el" "emacs-lisp/eieio-custom.el" +;;;;;; "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-opt.el" +;;;;;; "emacs-lisp/eieio-speedbar.el" "emacs-lisp/generator.el" +;;;;;; "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/smie.el" +;;;;;; "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el" +;;;;;; "emulation/cua-gmrk.el" "emulation/edt-lk201.el" "emulation/edt-mapper.el" +;;;;;; "emulation/edt-pc.el" "emulation/edt-vt100.el" "emulation/viper-cmd.el" +;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el" +;;;;;; "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el" +;;;;;; "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el" +;;;;;; "erc/erc-lang.el" "eshell/em-alias.el" "eshell/em-banner.el" +;;;;;; "eshell/em-basic.el" "eshell/em-cmpl.el" "eshell/em-dirs.el" +;;;;;; "eshell/em-glob.el" "eshell/em-hist.el" "eshell/em-ls.el" +;;;;;; "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el" +;;;;;; "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el" +;;;;;; "eshell/em-tramp.el" "eshell/em-unix.el" "eshell/em-xtra.el" +;;;;;; "eshell/esh-arg.el" "eshell/esh-cmd.el" "eshell/esh-ext.el" +;;;;;; "eshell/esh-io.el" "eshell/esh-module.el" "eshell/esh-opt.el" +;;;;;; "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el" +;;;;;; "ezimage.el" "format-spec.el" "fringe.el" "generic-x.el" +;;;;;; "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el" +;;;;;; "gnus/gnus-cite.el" "gnus/gnus-cloud.el" "gnus/gnus-cus.el" +;;;;;; "gnus/gnus-demon.el" "gnus/gnus-dup.el" "gnus/gnus-eform.el" +;;;;;; "gnus/gnus-ems.el" "gnus/gnus-icalendar.el" "gnus/gnus-int.el" +;;;;;; "gnus/gnus-logic.el" "gnus/gnus-mh.el" "gnus/gnus-salt.el" +;;;;;; "gnus/gnus-score.el" "gnus/gnus-srvr.el" "gnus/gnus-topic.el" +;;;;;; "gnus/gnus-undo.el" "gnus/gnus-util.el" "gnus/gnus-uu.el" +;;;;;; "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el" +;;;;;; "gnus/mail-parse.el" "gnus/mail-prsvr.el" "gnus/mail-source.el" +;;;;;; "gnus/mailcap.el" "gnus/messcompat.el" "gnus/mm-archive.el" +;;;;;; "gnus/mm-bodies.el" "gnus/mm-decode.el" "gnus/mm-util.el" +;;;;;; "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el" "gnus/nnagent.el" +;;;;;; "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el" "gnus/nneething.el" +;;;;;; "gnus/nngateway.el" "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el" +;;;;;; "gnus/nnmail.el" "gnus/nnmaildir.el" "gnus/nnmairix.el" "gnus/nnmbox.el" +;;;;;; "gnus/nnmh.el" "gnus/nnnil.el" "gnus/nnoo.el" "gnus/nnregistry.el" +;;;;;; "gnus/nnrss.el" "gnus/nnspool.el" "gnus/nntp.el" "gnus/nnvirtual.el" +;;;;;; "gnus/nnweb.el" "gnus/registry.el" "gnus/rfc1843.el" "gnus/rfc2045.el" +;;;;;; "gnus/rfc2047.el" "gnus/rfc2231.el" "gnus/rtree.el" "gnus/sieve-manage.el" +;;;;;; "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el" +;;;;;; "hfy-cmap.el" "ibuf-ext.el" "international/charscript.el" +;;;;;; "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el" ;;;;;; "international/ja-dic-utl.el" "international/ogonek.el" "international/uni-bidi.el" ;;;;;; "international/uni-brackets.el" "international/uni-category.el" ;;;;;; "international/uni-combining.el" "international/uni-comment.el" @@ -32340,43 +32365,43 @@ Zone out, completely. ;;;;;; "net/imap.el" "net/ldap.el" "net/mairix.el" "net/newsticker.el" ;;;;;; "net/nsm.el" "net/rfc2104.el" "net/sasl-cram.el" "net/sasl-digest.el" ;;;;;; "net/sasl-scram-rfc.el" "net/sasl.el" "net/shr-color.el" -;;;;;; "net/soap-client.el" "net/soap-inspect.el" "net/socks.el" -;;;;;; "net/tls.el" "net/tramp-adb.el" "net/tramp-cache.el" "net/tramp-cmds.el" -;;;;;; "net/tramp-compat.el" "net/tramp-gvfs.el" "net/tramp-gw.el" -;;;;;; "net/tramp-loaddefs.el" "net/tramp-sh.el" "net/tramp-smb.el" -;;;;;; "net/tramp-uu.el" "net/trampver.el" "net/zeroconf.el" "notifications.el" -;;;;;; "nxml/nxml-enc.el" "nxml/nxml-maint.el" "nxml/nxml-ns.el" -;;;;;; "nxml/nxml-outln.el" "nxml/nxml-parse.el" "nxml/nxml-rap.el" -;;;;;; "nxml/nxml-util.el" "nxml/rng-dt.el" "nxml/rng-loc.el" "nxml/rng-maint.el" -;;;;;; "nxml/rng-match.el" "nxml/rng-parse.el" "nxml/rng-pttrn.el" -;;;;;; "nxml/rng-uri.el" "nxml/rng-util.el" "nxml/xsd-regexp.el" -;;;;;; "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el" "org/ob-awk.el" -;;;;;; "org/ob-calc.el" "org/ob-clojure.el" "org/ob-comint.el" "org/ob-core.el" -;;;;;; "org/ob-css.el" "org/ob-ditaa.el" "org/ob-dot.el" "org/ob-emacs-lisp.el" -;;;;;; "org/ob-eval.el" "org/ob-exp.el" "org/ob-fortran.el" "org/ob-gnuplot.el" -;;;;;; "org/ob-haskell.el" "org/ob-io.el" "org/ob-java.el" "org/ob-js.el" -;;;;;; "org/ob-keys.el" "org/ob-latex.el" "org/ob-ledger.el" "org/ob-lilypond.el" -;;;;;; "org/ob-lisp.el" "org/ob-lob.el" "org/ob-makefile.el" "org/ob-matlab.el" -;;;;;; "org/ob-maxima.el" "org/ob-mscgen.el" "org/ob-ocaml.el" "org/ob-octave.el" -;;;;;; "org/ob-org.el" "org/ob-perl.el" "org/ob-picolisp.el" "org/ob-plantuml.el" -;;;;;; "org/ob-python.el" "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el" -;;;;;; "org/ob-scala.el" "org/ob-scheme.el" "org/ob-screen.el" "org/ob-sh.el" -;;;;;; "org/ob-shen.el" "org/ob-sql.el" "org/ob-sqlite.el" "org/ob-table.el" -;;;;;; "org/ob-tangle.el" "org/ob.el" "org/org-archive.el" "org/org-attach.el" -;;;;;; "org/org-bbdb.el" "org/org-bibtex.el" "org/org-clock.el" -;;;;;; "org/org-crypt.el" "org/org-ctags.el" "org/org-datetree.el" -;;;;;; "org/org-docview.el" "org/org-element.el" "org/org-entities.el" -;;;;;; "org/org-eshell.el" "org/org-faces.el" "org/org-feed.el" -;;;;;; "org/org-footnote.el" "org/org-gnus.el" "org/org-habit.el" -;;;;;; "org/org-id.el" "org/org-indent.el" "org/org-info.el" "org/org-inlinetask.el" -;;;;;; "org/org-install.el" "org/org-irc.el" "org/org-list.el" "org/org-loaddefs.el" -;;;;;; "org/org-macro.el" "org/org-mhe.el" "org/org-mobile.el" "org/org-mouse.el" -;;;;;; "org/org-pcomplete.el" "org/org-plot.el" "org/org-protocol.el" -;;;;;; "org/org-rmail.el" "org/org-src.el" "org/org-table.el" "org/org-timer.el" -;;;;;; "org/org-w3m.el" "org/ox-ascii.el" "org/ox-beamer.el" "org/ox-html.el" -;;;;;; "org/ox-icalendar.el" "org/ox-latex.el" "org/ox-man.el" "org/ox-md.el" -;;;;;; "org/ox-odt.el" "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el" -;;;;;; "org/ox.el" "play/gametree.el" "progmodes/ada-prj.el" "progmodes/cc-align.el" +;;;;;; "net/socks.el" "net/tls.el" "net/tramp-adb.el" "net/tramp-cache.el" +;;;;;; "net/tramp-cmds.el" "net/tramp-compat.el" "net/tramp-gvfs.el" +;;;;;; "net/tramp-gw.el" "net/tramp-loaddefs.el" "net/tramp-sh.el" +;;;;;; "net/tramp-smb.el" "net/tramp-uu.el" "net/trampver.el" "net/zeroconf.el" +;;;;;; "notifications.el" "nxml/nxml-enc.el" "nxml/nxml-maint.el" +;;;;;; "nxml/nxml-ns.el" "nxml/nxml-outln.el" "nxml/nxml-parse.el" +;;;;;; "nxml/nxml-rap.el" "nxml/nxml-util.el" "nxml/rng-dt.el" "nxml/rng-loc.el" +;;;;;; "nxml/rng-maint.el" "nxml/rng-match.el" "nxml/rng-parse.el" +;;;;;; "nxml/rng-pttrn.el" "nxml/rng-uri.el" "nxml/rng-util.el" +;;;;;; "nxml/xsd-regexp.el" "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el" +;;;;;; "org/ob-awk.el" "org/ob-calc.el" "org/ob-clojure.el" "org/ob-comint.el" +;;;;;; "org/ob-core.el" "org/ob-css.el" "org/ob-ditaa.el" "org/ob-dot.el" +;;;;;; "org/ob-emacs-lisp.el" "org/ob-eval.el" "org/ob-exp.el" "org/ob-fortran.el" +;;;;;; "org/ob-gnuplot.el" "org/ob-haskell.el" "org/ob-io.el" "org/ob-java.el" +;;;;;; "org/ob-js.el" "org/ob-keys.el" "org/ob-latex.el" "org/ob-ledger.el" +;;;;;; "org/ob-lilypond.el" "org/ob-lisp.el" "org/ob-lob.el" "org/ob-makefile.el" +;;;;;; "org/ob-matlab.el" "org/ob-maxima.el" "org/ob-mscgen.el" +;;;;;; "org/ob-ocaml.el" "org/ob-octave.el" "org/ob-org.el" "org/ob-perl.el" +;;;;;; "org/ob-picolisp.el" "org/ob-plantuml.el" "org/ob-python.el" +;;;;;; "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el" "org/ob-scala.el" +;;;;;; "org/ob-scheme.el" "org/ob-screen.el" "org/ob-sh.el" "org/ob-shen.el" +;;;;;; "org/ob-sql.el" "org/ob-sqlite.el" "org/ob-table.el" "org/ob-tangle.el" +;;;;;; "org/ob.el" "org/org-archive.el" "org/org-attach.el" "org/org-bbdb.el" +;;;;;; "org/org-bibtex.el" "org/org-clock.el" "org/org-crypt.el" +;;;;;; "org/org-ctags.el" "org/org-datetree.el" "org/org-docview.el" +;;;;;; "org/org-element.el" "org/org-entities.el" "org/org-eshell.el" +;;;;;; "org/org-faces.el" "org/org-feed.el" "org/org-footnote.el" +;;;;;; "org/org-gnus.el" "org/org-habit.el" "org/org-id.el" "org/org-indent.el" +;;;;;; "org/org-info.el" "org/org-inlinetask.el" "org/org-install.el" +;;;;;; "org/org-irc.el" "org/org-list.el" "org/org-macro.el" "org/org-mhe.el" +;;;;;; "org/org-mobile.el" "org/org-mouse.el" "org/org-pcomplete.el" +;;;;;; "org/org-plot.el" "org/org-protocol.el" "org/org-rmail.el" +;;;;;; "org/org-src.el" "org/org-table.el" "org/org-timer.el" "org/org-w3m.el" +;;;;;; "org/ox-ascii.el" "org/ox-beamer.el" "org/ox-html.el" "org/ox-icalendar.el" +;;;;;; "org/ox-latex.el" "org/ox-man.el" "org/ox-md.el" "org/ox-odt.el" +;;;;;; "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el" "org/ox.el" +;;;;;; "play/gametree.el" "progmodes/ada-prj.el" "progmodes/cc-align.el" ;;;;;; "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" "progmodes/cc-cmds.el" ;;;;;; "progmodes/cc-defs.el" "progmodes/cc-fonts.el" "progmodes/cc-langs.el" ;;;;;; "progmodes/cc-menus.el" "progmodes/ebnf-abn.el" "progmodes/ebnf-bnf.el" @@ -32399,7 +32424,7 @@ Zone out, completely. ;;;;;; "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" "vc/pcvs-parse.el" ;;;;;; "vc/pcvs-util.el" "vc/vc-dav.el" "vc/vc-filewise.el" "vcursor.el" ;;;;;; "vt-control.el" "vt100-led.el" "w32-fns.el" "w32-vars.el" -;;;;;; "x-dnd.el") (22026 26004 435502 692000)) +;;;;;; "x-dnd.el") (22069 63623 894804 836000)) ;;;***