emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master e6fd84d 06/17: Merge from origin/emacs-25


From: Paul Eggert
Subject: [Emacs-diffs] master e6fd84d 06/17: Merge from origin/emacs-25
Date: Sun, 19 Mar 2017 15:41:41 -0400 (EDT)

branch: master
commit e6fd84d2d5ca256797ff210c915a2fa773d4d742
Merge: d86bced ab0a60a
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Merge from origin/emacs-25
    
    ab0a60a ; * CONTRIBUTE (Generating ChangeLog entries): Drop duplicate...
    7e02a47 Index byte-compile-debug
    7c1e598 Document `byte-compile-debug' in the ELisp manual
    4d81eb4 Document variable `byte-compile-debug'
    72ef710 Fix call to debugger on assertion failure
    ae8264c Call modification hooks in org-src fontify buffers
    b3139da ; Fix last change in doc/lispref/strings.texi
    c331f39 Improve documentation of 'format' conversions
    9f52f67 Remove stale functions from ert manual
    c416b14 Fix a typo in Eshell manual
    06695a0 ; Fix a typo in ediff-merg.el
    954e9e9 Improve documentation of hooks related to saving buffers
    9fcab85 Improve documentation of auto-save-visited-file-name
    2236c53 fix typo in mailcap-mime-extensions
    85a3e4e Fix typos in flymake.el
    a1ef10e More NEWS checking for admin.el's set-version
    
    # Conflicts:
    #   lisp/emacs-lisp/bytecomp.el
---
 CONTRIBUTE                      |  2 +-
 admin/admin.el                  |  7 +++++++
 doc/emacs/files.texi            |  6 ++++--
 doc/lispref/backups.texi        |  5 +++++
 doc/lispref/compile.texi        | 10 +++++++---
 doc/lispref/files.texi          |  6 +++++-
 doc/lispref/strings.texi        | 35 +++++++++++++++++++++++------------
 doc/misc/ert.texi               | 14 +++++++-------
 doc/misc/eshell.texi            |  2 +-
 lisp/emacs-lisp/bytecomp.el     |  3 ++-
 lisp/emacs-lisp/cl-preloaded.el |  2 +-
 lisp/files.el                   | 10 +++++++---
 lisp/net/mailcap.el             |  2 +-
 lisp/org/org-src.el             | 24 ++++++++++++++----------
 lisp/progmodes/flymake.el       |  2 +-
 lisp/vc/ediff-merg.el           |  2 +-
 src/editfns.c                   | 24 +++++++++++++++---------
 17 files changed, 102 insertions(+), 54 deletions(-)

diff --git a/CONTRIBUTE b/CONTRIBUTE
index 8aba424..8e45b67 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -162,7 +162,7 @@ them right the first time, so here are guidelines for 
formatting them:
 - If you use Emacs VC, one way to format ChangeLog entries is to create
   a top-level ChangeLog file manually, and update it with 'C-x 4 a' as
   usual.  Do not register the ChangeLog file under git; instead, use
-  'C-c C-a' to insert its contents into into your *vc-log* buffer.
+  'C-c C-a' to insert its contents into your *vc-log* buffer.
   Or if 'log-edit-hook' includes 'log-edit-insert-changelog' (which it
   does by default), they will be filled in for you automatically.
 
diff --git a/admin/admin.el b/admin/admin.el
index a6ef19c..5428e3a 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -141,6 +141,13 @@ Root must be the root of an Emacs source tree."
                          (not (equal (cadr oldversion) (cadr newversion)))))
          (newsfile (expand-file-name "etc/NEWS" root))
          (oldnewsfile (expand-file-name (format "etc/NEWS.%s" oldmajor) root)))
+    (unless (> (length newversion) 2)   ; pretest or release candidate?
+      (with-temp-buffer
+        (insert-file-contents newsfile)
+        (if (re-search-forward "^\\(+++ *\\|--- *\\)$" nil t)
+            (display-warning 'admin
+                             "NEWS file still contains temporary markup.
+Documentation changes might not have been completed!"))))
     (when (and majorbump
                (not (file-exists-p oldnewsfile)))
       (rename-file newsfile oldnewsfile)
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 1a85f96..0b730e2 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1044,8 +1044,10 @@ auto-save-mode}.
   If you want auto-saving to be done in the visited file rather than
 in a separate auto-save file, set the variable
 @code{auto-save-visited-file-name} to a address@hidden value.  In this
-mode, there is no real difference between auto-saving and explicit
-saving.
+mode, auto-saving is very similar to explicit saving.  However,
+differences still exist, in particular for modes which modify the
+buffer-saving process in non-trivial ways via various hooks
+(@pxref{Saving Buffers,,, elisp, The Emacs Lisp Reference Manual}).
 
 @vindex delete-auto-save-files
   A buffer's auto-save file is deleted when you save the buffer in its
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi
index 7b6f084..3e2d1f6 100644
--- a/doc/lispref/backups.texi
+++ b/doc/lispref/backups.texi
@@ -550,6 +550,11 @@ effect in an existing buffer until the next time auto-save 
mode is
 reenabled in it.  If auto-save mode is already enabled, auto-saves
 continue to go in the same file name until @code{auto-save-mode} is
 called again.
+
+Note that setting this variable to a address@hidden value does not
+change the fact that auto-saving is different from saving the buffer;
+e.g., the hooks described in @ref{Saving Buffers} are @emph{not} run
+when a buffer is auto-saved.
 @end defopt
 
 @defun recent-auto-save-p
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index b1cc04b..201d9fc 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -88,10 +88,14 @@ the @code{byte-compile} function.  You can compile a whole 
file with
 @code{byte-compile-file}, or several files with
 @code{byte-recompile-directory} or @code{batch-byte-compile}.
 
address@hidden byte-compile-debug
   Sometimes, the byte compiler produces warning and/or error messages
-(@pxref{Compiler Errors}, for details).  These messages are recorded
-in a buffer called @file{*Compile-Log*}, which uses Compilation mode.
address@hidden Mode,,,emacs, The GNU Emacs Manual}.
+(@pxref{Compiler Errors}, for details).  These messages are normally
+recorded in a buffer called @file{*Compile-Log*}, which uses
+Compilation mode.  @xref{Compilation Mode,,,emacs, The GNU Emacs
+Manual}.  However, if the variable @code{byte-compile-debug} is
+non-nil, error message will be signaled as Lisp errors instead
+(@pxref{Errors}).
 
 @cindex macro compilation
   Be careful when writing macro calls in files that you intend to
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index ef37321..2b692db 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -408,7 +408,11 @@ buffer name instead.
 @end deffn
 
   Saving a buffer runs several hooks.  It also performs format
-conversion (@pxref{Format Conversion}).
+conversion (@pxref{Format Conversion}).  Note that these hooks,
+described below, are only run by @code{save-buffer}, they are not run
+by other primitives and functions that write buffer text to files, and
+in particular auto-saving (@pxref{Auto-Saving}) doesn't run these
+hooks.
 
 @defvar write-file-functions
 The value of this variable is a list of functions to be called before
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index cf47db4..ae2b31c 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -901,17 +901,18 @@ Functions}).  Thus, strings are enclosed in @samp{"} 
characters, and
 @item %o
 @cindex integer to octal
 Replace the specification with the base-eight representation of an
-integer.
+unsigned integer.
 
 @item %d
-Replace the specification with the base-ten representation of an
+Replace the specification with the base-ten representation of a signed
 integer.
 
 @item %x
 @itemx %X
 @cindex integer to hexadecimal
 Replace the specification with the base-sixteen representation of an
-integer.  @samp{%x} uses lower case and @samp{%X} uses upper case.
+unsigned integer.  @samp{%x} uses lower case and @samp{%X} uses upper
+case.
 
 @item %c
 Replace the specification with the character which is the value given.
@@ -926,8 +927,12 @@ floating-point number.
 
 @item %g
 Replace the specification with notation for a floating-point number,
-using either exponential notation or decimal-point notation, whichever
-is shorter.
+using either exponential notation or decimal-point notation.  The
+exponential notation is used if the exponent would be less than -4 or
+greater than or equal to the precision (default: 6).  By default,
+trailing zeros are removed from the fractional portion of the result
+and a decimal-point character appears only if it is followed by a
+digit.
 
 @item %%
 Replace the specification with a single @samp{%}.  This format
@@ -1008,9 +1013,11 @@ both flags are used, @samp{+} takes precedence.
   The flag @samp{#} specifies an alternate form which depends on
 the format in use.  For @samp{%o}, it ensures that the result begins
 with a @samp{0}.  For @samp{%x} and @samp{%X}, it prefixes the result
-with @samp{0x} or @samp{0X}.  For @samp{%e}, @samp{%f}, and @samp{%g},
-the @samp{#} flag means include a decimal point even if the precision
-is zero.
+with @samp{0x} or @samp{0X}.  For @samp{%e} and @samp{%f}, the
address@hidden flag means include a decimal point even if the precision is
+zero.  For @samp{%g}, it always includes a decimal point, and also
+forces any trailing zeros after the decimal point to be left in place
+where they would otherwise be removed.
 
   The flag @samp{0} ensures that the padding consists of @samp{0}
 characters instead of spaces.  This flag is ignored for non-numerical
@@ -1041,10 +1048,14 @@ ignored.
   All the specification characters allow an optional @dfn{precision}
 before the character (after the width, if present).  The precision is
 a decimal-point @samp{.} followed by a digit-string.  For the
-floating-point specifications (@samp{%e}, @samp{%f}, @samp{%g}), the
-precision specifies how many decimal places to show; if zero, the
-decimal-point itself is also omitted.  For @samp{%s} and @samp{%S},
-the precision truncates the string to the given width, so @samp{%.3s}
+floating-point specifications (@samp{%e} and @samp{%f}), the
+precision specifies how many digits following the decimal point to
+show; if zero, the decimal-point itself is also omitted.  For
address@hidden, the precision specifies how many significant digits to show
+(significant digits are the first digit before the decimal point and
+all the digits after it).  If the precision of %g is zero or
+unspecified, it is treated as 1.  For @samp{%s} and @samp{%S}, the
+precision truncates the string to the given width, so @samp{%.3s}
 shows only the first three characters of the representation for
 @var{object}.  For other specification characters, the effect of
 precision is what the local library functions of the @code{printf}
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index b07cb0b..4a2c29d 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -551,15 +551,15 @@ on their environment is easy.  Such tests often look like 
this:
 
 @lisp
 (ert-deftest ert-test-mismatch ()
-  (should (eql (ert--mismatch "" "") nil))
-  (should (eql (ert--mismatch "" "a") 0))
-  (should (eql (ert--mismatch "a" "a") nil))
-  (should (eql (ert--mismatch "ab" "a") 1))
-  (should (eql (ert--mismatch "Aa" "aA") 0))
-  (should (eql (ert--mismatch '(a b c) '(a b d)) 2)))
+  (should (eql (cl-mismatch "" "") nil))
+  (should (eql (cl-mismatch "" "a") 0))
+  (should (eql (cl-mismatch "a" "a") nil))
+  (should (eql (cl-mismatch "ab" "a") 1))
+  (should (eql (cl-mismatch "Aa" "aA") 0))
+  (should (eql (cl-mismatch '(a b c) '(a b d)) 2)))
 @end lisp
 
-This test calls the function @code{ert--mismatch} several times with
+This test calls the function @code{cl-mismatch} several times with
 various combinations of arguments and compares the return value to the
 expected return value.  (Some programmers prefer @code{(should (eql
 EXPECTED ACTUAL))} over the @code{(should (eql ACTUAL EXPECTED))}
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index bd89b9c..a7651b2 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -493,7 +493,7 @@ History I-search.
 @itemx M-n
 Previous and next history line.  If there is anything on the input
 line when you run these commands, they will instead jump to the
-precious or next line that begins with that string.
+previous or next line that begins with that string.
 @end table
 
 @node Completion
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 7cbef8e..f45ae35 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -416,7 +416,8 @@ specify different fields to sort on."
   :type '(choice (const name) (const callers) (const calls)
                 (const calls+callers) (const nil)))
 
-(defvar byte-compile-debug nil)
+(defvar byte-compile-debug nil
+  "If non-nil, byte compile errors will be raised as signals instead of 
logged.")
 (defvar byte-compile-jump-tables nil
   "List of all jump tables used during compilation of this form.")
 (defvar byte-compile-constants nil
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el
index bba7b83..482b579 100644
--- a/lisp/emacs-lisp/cl-preloaded.el
+++ b/lisp/emacs-lisp/cl-preloaded.el
@@ -45,7 +45,7 @@
 
 (defun cl--assertion-failed (form &optional string sargs args)
   (if debug-on-error
-      (funcall debugger `(cl-assertion-failed ,form ,string ,@sargs))
+      (funcall debugger 'error `(cl-assertion-failed (,form ,string ,@sargs)))
     (if string
         (apply #'error string (append sargs args))
       (signal 'cl-assertion-failed `(,form ,@sargs)))))
diff --git a/lisp/files.el b/lisp/files.el
index c7de445..0a023a8 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -439,7 +439,8 @@ functions are called."
 
 (define-obsolete-variable-alias 'write-file-hooks 'write-file-functions "22.1")
 (defvar write-file-functions nil
-  "List of functions to be called before writing out a buffer to a file.
+  "List of functions to be called before saving a buffer to a file.
+Only used by `save-buffer'.
 If one of them returns non-nil, the file is considered already written
 and the rest are not called.
 These hooks are considered to pertain to the visited file.
@@ -464,6 +465,7 @@ updates before the buffer is saved, use 
`before-save-hook'.")
     'write-contents-functions "22.1")
 (defvar write-contents-functions nil
   "List of functions to be called before writing out a buffer to a file.
+Only used by `save-buffer'.
 If one of them returns non-nil, the file is considered already written
 and the rest are not called and neither are the functions in
 `write-file-functions'.
@@ -4855,13 +4857,15 @@ the last real save, but optional arg FORCE non-nil 
means delete anyway."
   "Normal hook run just before auto-saving.")
 
 (defcustom before-save-hook nil
-  "Normal hook that is run before a buffer is saved to its file."
+  "Normal hook that is run before a buffer is saved to its file.
+Only used by `save-buffer'."
   :options '(copyright-update time-stamp)
   :type 'hook
   :group 'files)
 
 (defcustom after-save-hook nil
-  "Normal hook that is run after a buffer is saved to its file."
+  "Normal hook that is run after a buffer is saved to its file.
+Only used by `save-buffer'."
   :options '(executable-make-buffer-file-executable-if-script-p)
   :type 'hook
   :group 'files)
diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
index 4e53b5a..89f6c91 100644
--- a/lisp/net/mailcap.el
+++ b/lisp/net/mailcap.el
@@ -853,7 +853,7 @@ If NO-DECODE is non-nil, don't decode STRING."
     (".css"   . "text/css")
     (".dvi"   . "application/x-dvi")
     (".diff"  . "text/x-patch")
-    (".dpatch". "test/x-patch")
+    (".dpatch". "text/x-patch")
     (".el"    . "application/emacs-lisp")
     (".eps"   . "application/postscript")
     (".etx"   . "text/x-setext")
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el
index 0e82cfd..caa6526 100644
--- a/lisp/org/org-src.el
+++ b/lisp/org/org-src.el
@@ -914,16 +914,20 @@ fontification of code blocks see `org-src-fontify-block' 
and
          (with-current-buffer
              (get-buffer-create
               (concat " org-src-fontification:" (symbol-name lang-mode)))
-           (delete-region (point-min) (point-max))
-           (insert string " ") ;; so there's a final property change
-           (unless (eq major-mode lang-mode) (funcall lang-mode))
-            (org-font-lock-ensure)
-           (setq pos (point-min))
-           (while (setq next (next-single-property-change pos 'face))
-             (put-text-property
-              (+ start (1- pos)) (1- (+ start next)) 'face
-              (get-text-property pos 'face) org-buffer)
-             (setq pos next)))
+            ;; Make sure that modification hooks are not inhibited in
+            ;; the org-src-fontification buffer in case we're called
+            ;; from `jit-lock-function' (Bug#25132).
+            (let ((inhibit-modification-hooks nil))
+              (delete-region (point-min) (point-max))
+              (insert string " ") ;; so there's a final property change
+              (unless (eq major-mode lang-mode) (funcall lang-mode))
+              (org-font-lock-ensure)
+              (setq pos (point-min))
+              (while (setq next (next-single-property-change pos 'face))
+                (put-text-property
+                 (+ start (1- pos)) (1- (+ start next)) 'face
+                 (get-text-property pos 'face) org-buffer)
+                (setq pos next))))
          (add-text-properties
           start end
           '(font-lock-fontified t fontified t font-lock-multiline t))
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index e488c19..ed34d9a 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -363,7 +363,7 @@ instead of SOURCE-FILE-NAME.
 
 For example, foo.cpp is a master file if it includes foo.h.
 
-Whether a buffer for MATER-FILE-NAME exists, use it as a source
+When a buffer for MASTER-FILE-NAME exists, use it as a source
 instead of reading master file from disk."
   (let* ((source-file-nondir (file-name-nondirectory source-file-name))
          (source-file-extension (file-name-extension source-file-nondir))
diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el
index 2567818..d7fa74f 100644
--- a/lisp/vc/ediff-merg.el
+++ b/lisp/vc/ediff-merg.el
@@ -84,7 +84,7 @@ A region is considered to have been changed if it is 
different from the current
 default (`default-A', `default-B', `combined') and it hasn't been marked as
 `prefer-A' or `prefer-B'.
 A region is considered to have been changed also when it is marked as
-as `prefer-A', but is different from the corresponding difference region in
+`prefer-A', but is different from the corresponding difference region in
 Buffer A or if it is marked as `prefer-B' and is different from the region in
 Buffer B."
   :type 'boolean
diff --git a/src/editfns.c b/src/editfns.c
index 612893c..65c0c72 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3865,12 +3865,14 @@ The format control string may contain %-sequences 
meaning to substitute
 the next available argument:
 
 %s means print a string argument.  Actually, prints any object, with `princ'.
-%d means print as number in decimal (%o octal, %x hex).
+%d means print as signed number in decimal.
+%o means print as unsigned number in octal, %x as unsigned number in hex.
 %X is like %x, but uses upper case.
 %e means print a number in exponential notation.
 %f means print a number in decimal-point notation.
-%g means print a number in exponential notation
-  or decimal-point notation, whichever uses fewer characters.
+%g means print a number in exponential notation if the exponent would be
+   less than -4 or greater than or equal to the precision (default: 6);
+   otherwise it prints in decimal-point notation.
 %c means print a number as a single character.
 %S means print any object as an s-expression (using `prin1').
 
@@ -3893,8 +3895,10 @@ The - and 0 flags affect the width specifier, as 
described below.
 The # flag means to use an alternate display form for %o, %x, %X, %e,
 %f, and %g sequences: for %o, it ensures that the result begins with
 \"0\"; for %x and %X, it prefixes the result with \"0x\" or \"0X\";
-for %e, %f, and %g, it causes a decimal point to be included even if
-the precision is zero.
+for %e and %f, it causes a decimal point to be included even if the
+the precision is zero; for %g, it causes a decimal point to be
+included even if the the precision is zero, and also forces trailing
+zeros after the decimal point to be left in place.
 
 The width specifier supplies a lower limit for the length of the
 printed representation.  The padding, if any, normally goes on the
@@ -3903,10 +3907,12 @@ character is normally a space, but it is 0 if the 0 
flag is present.
 The 0 flag is ignored if the - flag is present, or the format sequence
 is something other than %d, %e, %f, and %g.
 
-For %e, %f, and %g sequences, the number after the "." in the
-precision specifier says how many decimal places to show; if zero, the
-decimal point itself is omitted.  For %s and %S, the precision
-specifier truncates the string to the given width.
+For %e and %f sequences, the number after the "." in the precision
+specifier says how many decimal places to show; if zero, the decimal
+point itself is omitted.  For %g, the precision specifies how many
+significant digits to print; zero or omitted are treated as 1.
+For %s and %S, the precision specifier truncates the string to the
+given width.
 
 Text properties, if any, are copied from the format-string to the
 produced text.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]