diff options
author | Glenn Morris <rgm@gnu.org> | 2018-06-18 12:14:25 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2018-06-18 12:14:25 -0700 |
commit | b455a1b2a8b927d3376e30814954a88f611a17c1 (patch) | |
tree | 9a2ebfc3534cb5d0e54124c62abaa7b7075f3536 | |
parent | 2c335777f78cac0f44df217a48762739533b32db (diff) | |
parent | 63ba73a9f2bdf75363eea678a8c119ed0ffd9799 (diff) | |
download | emacs-b455a1b2a8b927d3376e30814954a88f611a17c1.tar.gz |
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
-rw-r--r-- | doc/lispref/customize.texi | 22 | ||||
-rw-r--r-- | doc/lispref/modes.texi | 9 | ||||
-rw-r--r-- | etc/NEWS.26 | 10 | ||||
-rw-r--r-- | lisp/gnus/mail-source.el | 12 | ||||
-rw-r--r-- | lisp/vc/vc.el | 5 | ||||
-rw-r--r-- | src/character.h | 3 | ||||
-rw-r--r-- | src/coding.c | 5 | ||||
-rw-r--r-- | src/editfns.c | 13 | ||||
-rw-r--r-- | 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 4d88d7c8c98..02fcd80fa33 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}. -@item custom-initialize-safe-set -@itemx 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 -@code{nil} 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 -@code{defcustom}. After startup, if one unsets the value and -reevaluates the @code{defcustom}, the @var{standard} expression can be -evaluated without error. +@item 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. +@xref{Building Emacs}. @end table @item :risky @var{value} diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 8a77745d8f7..d7e217c5287 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1839,10 +1839,13 @@ recursion. @item (:propertize @var{elt} @var{props}@dots{}) 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} -@var{value}. +@var{value}. 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 +@code{: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 f8e54bb5b35..58b4c4a56e9 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 51f76a4a2e8..0e1c0736363 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 cceca717953..b2bedfae939 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 1e420ba54cb..66dfa5526eb 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 a16142a9b41..32a9df1c533 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 3147f9d1466..9501cce20b3 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 2e20c9dd126..1ed0bd5bbaf 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 |