[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b455a1b 07/11: Merge from origin/emacs-26
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master b455a1b 07/11: Merge from origin/emacs-26 |
Date: |
Mon, 18 Jun 2018 15:18:55 -0400 (EDT) |
branch: master
commit b455a1b2a8b927d3376e30814954a88f611a17c1
Merge: 2c33577 63ba73a
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
Merge from origin/emacs-26
63ba73a Fix documentation of ':propertize' in mode-line-format
22aa665 Reject invalid 5-byte sequences when detecting UTF-8 encoding
0d3c358 Fix 'replace-buffer-contents' in multibyte buffers
c79a627 Update etc/NEWS for mail-source-movemail-program change
63f1dc4 Improve movemail default
0b1a2ae Delete description of deleted Customize functions
fcd66d0 Keep vc-print-log from putting point at buffer end (Bug#31764)
Conflicts:
etc/NEWS
---
doc/lispref/customize.texi | 22 ++++++++--------------
doc/lispref/modes.texi | 9 ++++++---
etc/NEWS.26 | 10 ++++++++++
lisp/gnus/mail-source.el | 12 ++++++++----
lisp/vc/vc.el | 5 +++--
src/character.h | 3 ++-
src/coding.c | 5 ++++-
src/editfns.c | 13 +++++++++++--
test/src/editfns-tests.el | 11 +++++++++++
9 files changed, 63 insertions(+), 27 deletions(-)
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index 4d88d7c..02fcd80 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -416,20 +416,14 @@ Use the @code{:set} function to initialize the variable,
if it is
already set or has been customized; otherwise, just use
@code{set-default}.
address@hidden custom-initialize-safe-set
address@hidden custom-initialize-safe-default
-These functions behave like @code{custom-initialize-set}
-(@code{custom-initialize-default}, respectively), but catch errors.
-If an error occurs during initialization, they set the variable to
address@hidden using @code{set-default}, and signal no error.
-
-These functions are meant for options defined in pre-loaded files,
-where the @var{standard} expression may signal an error because some
-required variable or function is not yet defined. The value normally
-gets updated in @file{startup.el}, ignoring the value computed by
address@hidden After startup, if one unsets the value and
-reevaluates the @code{defcustom}, the @var{standard} expression can be
-evaluated without error.
address@hidden custom-initialize-delay
+This functions behaves like @code{custom-initialize-set}, but it
+delays the actual initialization to the next Emacs start. This should
+be used in files that are preloaded (or for autoloaded variables), so
+that the initialization is done in the run-time context rather than
+the build-time context. This also has the side-effect that the
+(delayed) initialization is performed with the @code{:set} function.
address@hidden Emacs}.
@end table
@item :risky @var{value}
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 8a77745..d7e217c 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1839,10 +1839,13 @@ recursion.
@item (:propertize @var{elt} @address@hidden)
A list whose first element is the symbol @code{:propertize} says to
-process the mode line construct @var{elt} recursively, then add the text
-properties specified by @var{props} to the result. The argument
+process the mode line construct @var{elt} recursively, then add the
+text properties specified by @var{props} to the result. The argument
@var{props} should consist of zero or more pairs @var{text-property}
address@hidden
address@hidden If @var{elt} is or produces a string with text
+properties, all the characters of that string should have the same
+properties, or else some of them might be removed by
address@hidden:propertize}.
@item (@var{symbol} @var{then} @var{else})
A list whose first element is a symbol that is not a keyword specifies
diff --git a/etc/NEWS.26 b/etc/NEWS.26
index f8e54bb..58b4c4a 100644
--- a/etc/NEWS.26
+++ b/etc/NEWS.26
@@ -37,6 +37,16 @@ in its NEWS.)
* Changes in Specialized Modes and Packages in Emacs 26.2
+** Gnus
+
+---
+*** Mailutils movemail will now be used if found at runtime.
+The default value of mail-source-movemail-program is now "movemail".
+This ensures that the movemail program from GNU Mailutils will be used
+if found in 'exec-path', even if it was not found at build time. To
+use a different program, customize mail-source-movemail-program to the
+absolute file name of the desired executable.
+
** Shell mode
---
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 51f76a4..0e1c073 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -301,9 +301,9 @@ number."
:group 'mail-source
:type 'number)
-(defcustom mail-source-movemail-program nil
+(defcustom mail-source-movemail-program "movemail"
"If non-nil, name of program for fetching new mail."
- :version "22.1"
+ :version "26.2"
:group 'mail-source
:type '(choice (const nil) string))
@@ -682,12 +682,16 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff
bfile)
(setq errors (generate-new-buffer " *mail source loss*"))
(let ((default-directory "/"))
(setq result
+ ;; call-process looks in exec-path, which
+ ;; contains exec-directory, so will find
+ ;; Mailutils movemail if it exists, else it will
+ ;; find "our" movemail in exec-directory.
+ ;; Bug#31737
(apply
'call-process
(append
(list
- (or mail-source-movemail-program
- (expand-file-name "movemail" exec-directory))
+ mail-source-movemail-program
nil errors nil from to)))))
(when (file-exists-p to)
(set-file-modes to mail-source-default-file-modes))
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index cceca71..b2bedfa 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2244,8 +2244,9 @@ earlier revisions. Show up to LIMIT entries (non-nil
means unlimited)."
(vc-call-backend bk 'print-log files-arg buf shortlog
(when is-start-revision working-revision) limit))
(lambda (_bk _files-arg ret)
- (vc-print-log-setup-buttons working-revision
- is-start-revision limit ret))
+ (save-excursion
+ (vc-print-log-setup-buttons working-revision
+ is-start-revision limit ret)))
;; When it's nil, point really shouldn't move (bug#15322).
(when working-revision
(lambda (bk)
diff --git a/src/character.h b/src/character.h
index 1e420ba..66dfa55 100644
--- a/src/character.h
+++ b/src/character.h
@@ -57,7 +57,8 @@ INLINE_HEADER_BEGIN
/* Minimum leading code of multibyte characters. */
#define MIN_MULTIBYTE_LEADING_CODE 0xC0
-/* Maximum leading code of multibyte characters. */
+/* Maximum leading code of multibyte characters. Note: this must be
+ updated if we ever increase MAX_CHAR above. */
#define MAX_MULTIBYTE_LEADING_CODE 0xF8
/* Unicode character values. */
diff --git a/src/coding.c b/src/coding.c
index a16142a..32a9df1 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1225,7 +1225,10 @@ detect_coding_utf_8 (struct coding_system *coding,
ONE_MORE_BYTE (c4);
if (c4 < 0 || ! UTF_8_EXTRA_OCTET_P (c4))
break;
- if (UTF_8_5_OCTET_LEADING_P (c))
+ if (UTF_8_5_OCTET_LEADING_P (c)
+ /* If we ever need to increase MAX_CHAR, the below may need
+ to be reviewed. */
+ && c < MAX_MULTIBYTE_LEADING_CODE)
{
nchars++;
continue;
diff --git a/src/editfns.c b/src/editfns.c
index 3147f9d..9501cce 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3315,8 +3315,17 @@ buffer_chars_equal (struct context *ctx,
eassert (pos_b >= BUF_BEGV (ctx->buffer_b));
eassert (pos_b < BUF_ZV (ctx->buffer_b));
- return BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_a, pos_a)
- == BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_b, pos_b);
+ ptrdiff_t bpos_a =
+ NILP (BVAR (ctx->buffer_a, enable_multibyte_characters))
+ ? pos_a
+ : buf_charpos_to_bytepos (ctx->buffer_a, pos_a);
+ ptrdiff_t bpos_b =
+ NILP (BVAR (ctx->buffer_b, enable_multibyte_characters))
+ ? pos_b
+ : buf_charpos_to_bytepos (ctx->buffer_b, pos_b);
+
+ return BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_a, bpos_a)
+ == BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_b, bpos_b);
}
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el
index 2e20c9d..1ed0bd5 100644
--- a/test/src/editfns-tests.el
+++ b/test/src/editfns-tests.el
@@ -288,6 +288,17 @@
(buffer-string)
"foo bar baz qux"))))))
+(ert-deftest replace-buffer-contents-bug31837 ()
+ (switch-to-buffer "a")
+ (insert-char (char-from-name "SMILE"))
+ (insert "1234")
+ (switch-to-buffer "b")
+ (insert-char (char-from-name "SMILE"))
+ (insert "5678")
+ (replace-buffer-contents "a")
+ (should (equal (buffer-substring-no-properties (point-min) (point-max))
+ (concat (string (char-from-name "SMILE")) "1234"))))
+
(ert-deftest delete-region-undo-markers-1 ()
"Make sure we don't end up with freed markers reachable from Lisp."
;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30931#40
- [Emacs-diffs] master 012338f 01/11: Merge from origin/emacs-26, (continued)
- [Emacs-diffs] master 012338f 01/11: Merge from origin/emacs-26, Glenn Morris, 2018/06/18
- [Emacs-diffs] master 0f7c3ba 04/11: ; Merge from origin/emacs-26, Glenn Morris, 2018/06/18
- [Emacs-diffs] master 2c33577 06/11: ; Merge from origin/emacs-26, Glenn Morris, 2018/06/18
- [Emacs-diffs] master 96dd452 10/11: ; Merge from origin/emacs-26, Glenn Morris, 2018/06/18
- [Emacs-diffs] master 988b53e 09/11: Merge from origin/emacs-26, Glenn Morris, 2018/06/18
- [Emacs-diffs] master e347754 02/11: ; Merge from origin/emacs-26, Glenn Morris, 2018/06/18
- [Emacs-diffs] master ef02c9f 03/11: Merge from origin/emacs-26, Glenn Morris, 2018/06/18
- [Emacs-diffs] master 72b20dd 05/11: Merge from origin/emacs-26, Glenn Morris, 2018/06/18
- [Emacs-diffs] master 2f477cb 08/11: ; Merge from origin/emacs-26, Glenn Morris, 2018/06/18
- [Emacs-diffs] master 1d9d35a 11/11: Merge from origin/emacs-26, Glenn Morris, 2018/06/18
- [Emacs-diffs] master b455a1b 07/11: Merge from origin/emacs-26,
Glenn Morris <=