[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master fd0ab0b 2/2: Merge branch 'master' of git+ssh://git
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master fd0ab0b 2/2: Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk |
Date: |
Fri, 15 Feb 2019 18:57:58 -0500 (EST) |
branch: master
commit fd0ab0b9bd5991c1a2c598a7c78ec3f491a783bd
Merge: 3c80bc3 a298a1f
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk
---
admin/notes/emba | 64 ++++++++++++++++++++++++++++++++++
doc/lispref/syntax.texi | 11 +++---
lisp/erc/erc-dcc.el | 11 +++---
lisp/gnus/mm-decode.el | 2 +-
lisp/gnus/mm-view.el | 10 +++---
lisp/gnus/mml.el | 6 ++--
lisp/progmodes/compile.el | 22 ++++++------
lisp/textmodes/ispell.el | 9 ++++-
src/data.c | 10 ++++++
test/lisp/textmodes/conf-mode-tests.el | 2 +-
test/src/data-tests.el | 18 ++++++++++
11 files changed, 135 insertions(+), 30 deletions(-)
diff --git a/admin/notes/emba b/admin/notes/emba
new file mode 100644
index 0000000..cb0dbc4
--- /dev/null
+++ b/admin/notes/emba
@@ -0,0 +1,64 @@
+-*- mode: outline; coding: utf-8 -*-
+
+Copyright (C) 2019 Free Software Foundation, Inc.
+See the end of the file for license conditions.
+
+NOTES FOR EMACS CONTINUOUS BUILD ON EMBA
+
+A continuous build for Emacs can be found at
+<https://emba.gnu.org/emacs/emacs>, a Gitlab instance. It watches the
+Emacs git repository and starts a pipeline (jobset) if there are new
+changes. This happens for all Emacs branches.
+
+* Mail notifications
+
+In addition to the web interface, emba can send notifications by email
+when a job fails. It sends notifications about test status to
+<address@hidden>.
+
+If you want to receive these notifications, please subscribe at
+<https://lists.gnu.org/mailman/listinfo/emacs-buildstatus>.
+
+Alternatively, these notifications can be read via gmane at
+<nntp+news.gmane.org:gmane.emacs.buildstatus>.
+
+The messages contain a URL to the log file of the failed job, like
+<https://emba.gnu.org/emacs/emacs/-/jobs/739/raw>.
+
+* Emacs jobset
+
+The Emacs jobset is defined in the Emacs source tree, file
+'.gitlab-ci.yml'. It could be adapted for every Emacs branch, see
+<https://emba.gnu.org/help/ci/yaml/README.md>.
+
+Every job runs in a Debian docker container. It uses the local clone
+of the Emacs git repository to perform a bootstrap and test of Emacs.
+This could happen for several jobs with changed configuration, compile
+and test parameters.
+
+* Emba configuration
+
+The emba configuration files are hosted on
+<https://gitlab.com/emacs-ci/emba-ansible>.
+
+* Identifying emba
+
+Lisp packages, Makefiles, scripts, and other software could determine
+whether they run on emba by checking for the environment variable
+EMACS_EMBA_CI.
+
+
+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 <https://www.gnu.org/licenses/>.
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index a960eea..25b9b35 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -556,8 +556,8 @@ the current syntax table in the usual way.
@defvar parse-sexp-lookup-properties
If this is address@hidden, the syntax scanning functions, like
address@hidden, pay attention to syntax text properties.
-Otherwise they use only the current syntax table.
address@hidden, pay attention to @code{syntax-table} text
+properties. Otherwise they use only the current syntax table.
@end defvar
@defvar syntax-propertize-function
@@ -927,9 +927,9 @@ nicely.
@defvar multibyte-syntax-as-symbol
If this variable is address@hidden, @code{scan-sexps} treats all
address@hidden characters as symbol constituents regardless
-of what the syntax table says about them. (However, text properties
-can still override the syntax.)
address@hidden characters as symbol constituents regardless of
+what the syntax table says about them. (However, @code{syntax-table
+}text properties can still override the syntax.)
@end defvar
@defopt parse-sexp-ignore-comments
@@ -939,7 +939,6 @@ whitespace by the functions in this section and by
@code{forward-sexp},
@code{scan-lists} and @code{scan-sexps}.
@end defopt
address@hidden parse-sexp-lookup-properties
The behavior of @code{parse-partial-sexp} is also affected by
@code{parse-sexp-lookup-properties} (@pxref{Syntax Properties}).
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index 8a40b14..2849e25 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -979,17 +979,20 @@ rather than every 1024 byte block, but nobody seems to
care."
(let ((inhibit-read-only t)
received-bytes)
(goto-char (point-max))
- (insert (string-make-unibyte str))
+ (if str
+ (insert (string-make-unibyte str)))
(when (> (point-max) erc-dcc-receive-cache)
(erc-dcc-append-contents (current-buffer) erc-dcc-file-name))
- (setq received-bytes (+ (buffer-size) erc-dcc-byte-count))
+ (setq received-bytes (buffer-size))
+ (if erc-dcc-byte-count
+ (setq received-bytes (+ received-bytes erc-dcc-byte-count)))
(and erc-dcc-verbose
(erc-display-message
nil 'notice erc-server-process
'dcc-get-bytes-received
- ?f (file-name-nondirectory buffer-file-name)
+ ?f (file-name-nondirectory (buffer-name))
?b (number-to-string received-bytes)))
(cond
((and (> (plist-get erc-dcc-entry-data :size) 0)
@@ -997,7 +1000,7 @@ rather than every 1024 byte block, but nobody seems to
care."
(erc-display-message
nil '(notice error) 'active
'dcc-get-file-too-long
- ?f (file-name-nondirectory buffer-file-name))
+ ?f (file-name-nondirectory (buffer-name)))
(delete-process proc))
(t
(process-send-string
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 80a2e50..2a769fc 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -763,7 +763,7 @@ MIME-Version header before proceeding."
(mb enable-multibyte-characters)
beg)
(goto-char (point-min))
- (search-forward-regexp "^\n" nil t)
+ (search-forward-regexp "^\n" nil 'move) ;; There might be no body.
(setq beg (point))
(with-current-buffer
(generate-new-buffer " *mm*")
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index cf41c45..b0d88d8 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -370,10 +370,12 @@
(enriched-decode (point-min) (point-max))))
(mm-handle-set-undisplayer
handle
- `(lambda ()
- (let ((inhibit-read-only t))
- (delete-region ,(copy-marker (point-min) t)
- ,(point-max-marker))))))))
+ (if (= (point-min) (point-max))
+ #'ignore
+ `(lambda ()
+ (let ((inhibit-read-only t))
+ (delete-region ,(copy-marker (point-min) t)
+ ,(point-max-marker)))))))))
(defun mm-insert-inline (handle text)
"Insert TEXT inline from HANDLE."
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index cf79ca1..be62685 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -982,8 +982,10 @@ If HANDLES is non-nil, use it instead reparsing the
buffer."
(unless handles
(setq handles (mm-dissect-buffer t)))
(goto-char (point-min))
- (search-forward "\n\n" nil t)
- (delete-region (point) (point-max))
+ (if (search-forward "\n\n" nil 'move)
+ (delete-region (point) (point-max))
+ ;; No content in the part that is the sole part of this message.
+ (insert (if (bolp) "\n" "\n\n")))
(if (stringp (car handles))
(mml-insert-mime handles)
(mml-insert-mime handles t))
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 9fbe361..c3ff576 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1401,17 +1401,17 @@ to `compilation-error-regexp-alist' if RULES is nil."
file line end-line col end-col (or type 2) fmt))
(when (integerp file)
- (setq type (if (consp type)
- (compilation-type type)
- (or type 2)))
- (compilation--note-type type)
-
- (compilation--put-prop
- file 'font-lock-face
- (symbol-value (aref [compilation-info-face
- compilation-warning-face
- compilation-error-face]
- type))))
+ (let ((this-type (if (consp type)
+ (compilation-type type)
+ (or type 2))))
+ (compilation--note-type type)
+
+ (compilation--put-prop
+ file 'font-lock-face
+ (symbol-value (aref [compilation-info-face
+ compilation-warning-face
+ compilation-error-face]
+ this-type)))))
(compilation--put-prop
line 'font-lock-face compilation-line-face)
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index f3436c6..cc8ec26 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1107,12 +1107,19 @@ dictionary from that list was found."
null-device
t
nil
+ "-D"
+ ;; Use -a to prevent Hunspell from
+ ;; trying to initialize its
+ ;; curses/termcap UI, which causes it
+ ;; to crash or fail to start in some
+ ;; MS-Windows ports.
+ "-a"
;; Hunspell 1.7.0 (and later?) won't
;; show LOADED DICTIONARY unless
;; there's at least one file argument
;; on the command line. So we feed
;; it with the null device.
- "-D" null-device)
+ null-device)
(buffer-string))
"[\n\r]+"
t))
diff --git a/src/data.c b/src/data.c
index 92a1062..65f2b0f 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1958,6 +1958,16 @@ Instead, use `add-hook' and specify t for the LOCAL
argument. */)
(current_buffer,
Fcons (Fcons (variable, XCDR (blv->defcell)),
BVAR (current_buffer, local_var_alist)));
+
+ /* If the symbol forwards into a C variable, then load the binding
+ for this buffer now, to preserve the invariant that forwarded
+ variables must always hold the value corresponding to the
+ current buffer (they are swapped eagerly).
+ Otherwise, if C code modifies the variable before we load the
+ binding in, then that new value would clobber the default binding
+ the next time we unload it. See bug#34318. */
+ if (blv->fwd)
+ swap_in_symval_forwarding (sym, blv);
}
return variable;
diff --git a/test/lisp/textmodes/conf-mode-tests.el
b/test/lisp/textmodes/conf-mode-tests.el
index 5d79cee..3eefc8f 100644
--- a/test/lisp/textmodes/conf-mode-tests.el
+++ b/test/lisp/textmodes/conf-mode-tests.el
@@ -33,7 +33,7 @@
(conf-colon-mode)
(conf-align-assignments)
(should (equal (buffer-string)
- "foo: bar\nbar:
baz"))))
+ "foo: bar\nbar:
baz"))))
(ert-deftest conf-test-font-lock ()
(with-temp-buffer
diff --git a/test/src/data-tests.el b/test/src/data-tests.el
index bc77a7b..a9d48e2 100644
--- a/test/src/data-tests.el
+++ b/test/src/data-tests.el
@@ -669,4 +669,22 @@ comparing the subr with a much slower lisp implementation."
(should (= (lsh -1 -1) most-positive-fixnum))
(should-error (lsh (1- most-negative-fixnum) -1)))
+(ert-deftest data-tests-make-local-forwarded-var () ;bug#34318
+ ;; Boy, this bug is tricky to trigger. You need to:
+ ;; - call make-local-variable on a forwarded var (i.e. one that
+ ;; has a corresponding C var linked via DEFVAR_(LISP|INT|BOOL))
+ ;; - cause the C code to modify this variable from the C side of the
+ ;; forwarding, but this needs to happen before the var is accessed
+ ;; from the Lisp side and before we switch to another buffer.
+ ;; The trigger in bug#34318 doesn't exist any more because the C code has
+ ;; changes. Instead I found the trigger below.
+ (with-temp-buffer
+ (setq last-coding-system-used 'bug34318)
+ (make-local-variable 'last-coding-system-used)
+ ;; This should set last-coding-system-used to `no-conversion'.
+ (decode-coding-string "hello" nil)
+ (should (equal (list last-coding-system-used
+ (default-value 'last-coding-system-used))
+ '(no-conversion bug34318)))))
+
;;; data-tests.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master fd0ab0b 2/2: Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk,
Stefan Monnier <=