[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master fee9e3f 13/15: Merge from origin/emacs-25
From: |
John Wiegley |
Subject: |
[Emacs-diffs] master fee9e3f 13/15: Merge from origin/emacs-25 |
Date: |
Tue, 12 Jan 2016 07:08:55 +0000 |
branch: master
commit fee9e3ff5e3181e5e477849b5db94e7e39a4e0c4
Merge: 2d7f4d9 ce4a052
Author: John Wiegley <address@hidden>
Commit: John Wiegley <address@hidden>
Merge from origin/emacs-25
ce4a052 Add defvar-local to lisp-imenu-generic-expression
a0121bc Revert commit b1e3d14845517bfa9fa5d6d3840f3ab3160306fd
76fe2d5 * lisp/emacs-lisp/autoload.el (autoload-find-destination): Doc fix.
1ae088f * lisp/emacs-lisp/autoload.el (autoload-find-destination):
b6b47af Properly encode/decode base64Binary data in SOAP
c632466 Obey coding-system-for-write when writing stdout/stderr in batch
2f32cb5 * doc/misc/efaq.texi (Packages that do not come with Emacs):
Update the URI of MELPA and marmalade-repo.
Reported by CHENG Goa <address@hidden> in
https://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00390.html.
d2937aa * lisp/progmodes/opascal.el (opascal-mode-syntax-table):
5330c25 * lisp/progmodes/xscheme.el (xscheme-prompt-for-expression-exit):
7380990 Remove function wrongly on AWK Mode value of context
fontification hook.
d400753 * src/buffer.c: Stick with ASCII in doc string.
221240c Reword transient-mark-mode doc string
977d3ea Update doc string of 'selective-display'
229c3fa Make C++ buffers writeable when writing their initial text
properties.
f5c762c Additional changes for "make check-expensive"
1729cf3 ; * admin/MAINTAINERS: Remove myself.
33219d3 Apply text properties for <, > in new after-change function
(C++ Java Modes).
---
CONTRIBUTE | 8 ++++
admin/MAINTAINERS | 3 -
doc/lispref/os.texi | 24 ++++++++---
doc/misc/efaq.texi | 8 ++--
etc/NEWS | 4 ++
lisp/emacs-lisp/autoload.el | 5 +-
lisp/emacs-lisp/easy-mmode.el | 11 ++---
lisp/emacs-lisp/lisp-mode.el | 5 +-
lisp/net/soap-client.el | 4 +-
lisp/progmodes/cc-cmds.el | 38 ++++---------------
lisp/progmodes/cc-engine.el | 83 ++++++++++++++++++++++++++--------------
lisp/progmodes/cc-fonts.el | 25 ++++++++++++
lisp/progmodes/cc-langs.el | 13 ++++--
lisp/progmodes/cc-mode.el | 20 +++++++---
lisp/progmodes/opascal.el | 1 +
lisp/progmodes/xscheme.el | 5 +-
src/buffer.c | 11 +++--
src/print.c | 12 +++++-
src/xdisp.c | 11 +++++-
test/Makefile.in | 3 +-
20 files changed, 189 insertions(+), 105 deletions(-)
diff --git a/CONTRIBUTE b/CONTRIBUTE
index 19ec682..323f9b9 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -262,12 +262,20 @@ Emacs uses ERT, Emacs Lisp Regression Testing, for
testing. See (info
"(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/
for more information on writing and running tests.
+If your test lasts longer than some few seconds, mark it in its
+`ert-deftest' definition with ":tags '(:expensive-test)".
+
To run tests on the entire Emacs tree, run "make check" from the
top-level directory. Most tests are in the directory
"test/". From the "test/" directory, run "make
<filename>" to run the tests for <filename>.el(c). See
"test/Makefile" for more information.
+Tests which are tagged ":expensive-test" are enabled additionally, if
+you run "make check-expensive" from the top-level directory. "make
+<filename>" as mentioned above incorporates expensive tests for
+<filename>.el(c).
+
** Understanding Emacs Internals.
The best way to understand Emacs Internals is to read the code,
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index dc6c0d2..859046a 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -218,9 +218,6 @@ Nicolas Petton
lisp/emacs-lisp/subr-x.el
lisp/arc-mode.el
-Xue Fuqiao
- doc/lispref/*
-
Tassilo Horn
lisp/doc-view.el
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 9db5e9e..8e3720e 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -2085,6 +2085,8 @@ than optimal. To fix the problem, set @code{baud-rate}.
@defun send-string-to-terminal string &optional terminal
This function sends @var{string} to @var{terminal} without alteration.
Control characters in @var{string} have terminal-dependent effects.
+(If you need to display non-ASCII text on the terminal, encode it
+using one of the functions described in @ref{Explicit Encoding}.)
This function operates only on text terminals. @var{terminal} may be
a terminal object, a frame, or @code{nil} for the selected frame's
terminal. In batch mode, @var{string} is sent to @code{stdout} when
@@ -2252,13 +2254,21 @@ loads the library named @var{file}, or @samp{-f
@var{function}}, which
calls @var{function} with no arguments, or @samp{--eval @var{form}}.
Any Lisp program output that would normally go to the echo area,
-either using @code{message}, or using @code{prin1}, etc., with @code{t}
-as the stream, goes instead to Emacs's standard error descriptor when
-in batch mode. Similarly, input that would normally come from the
-minibuffer is read from the standard input descriptor.
-Thus, Emacs behaves much like a noninteractive
-application program. (The echo area output that Emacs itself normally
-generates, such as command echoing, is suppressed entirely.)
+either using @code{message}, or using @code{prin1}, etc., with
address@hidden as the stream, goes instead to Emacs's standard descriptors
+when in batch mode: @code{message} writes to the standard error
+descriptor, while @code{prin1} and other print functions write to the
+standard output. Similarly, input that would normally come from the
+minibuffer is read from the standard input descriptor. Thus, Emacs
+behaves much like a noninteractive application program. (The echo
+area output that Emacs itself normally generates, such as command
+echoing, is suppressed entirely.)
+
+Non-ASCII text written to the standard output or error descriptors is
+by default encoded using @code{locale-coding-system} (@pxref{Locales})
+if it is address@hidden; this can be overridden by binding
address@hidden to a coding system of you choice
+(@pxref{Explicit Encoding}).
@defvar noninteractive
This variable is address@hidden when Emacs is running in batch mode.
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index bbd9354..5008db3 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -3308,10 +3308,10 @@ available, and then Emacs can automatically download
and install the
packages that you select. @xref{Packages,,, emacs, The GNU Emacs Manual}.
There are other, non-GNU, Emacs Lisp package servers, including:
address@hidden://melpa.milkbox.net, MELPA}; and
address@hidden://marmalade-repo.org, Marmalade}. To use additional
-package servers, customize the @code{package-archives} variable.
-Be aware that installing a package can run arbitrary code, so only add
address@hidden://melpa.org/, MELPA}; and
address@hidden://marmalade-repo.org/, Marmalade}. To use additional
+package servers, customize the @code{package-archives} variable. Be
+aware that installing a package can run arbitrary code, so only add
sources that you trust.
The @uref{https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources,
diff --git a/etc/NEWS b/etc/NEWS
index 0566ff2..2c6f6fc 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -148,6 +148,10 @@ so if you want to use it, you can always take a copy from
an older Emacs.
Various resolutions are available as etc/images/icons/hicolor/*/apps/emacs.png.
The old Emacs logo icons are available as `emacs23.png' in the same location.
+** New make target `check-expensive' to run additional tests.
+This includes all tests which run via "make check", plus additional
+tests which take more time to perform.
+
* Startup Changes in Emacs 25.1
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 401b419..3405b09 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -701,8 +701,9 @@ Return FILE if there was no autoload cookie in it, else
nil."
(defun autoload-find-destination (file load-name)
"Find the destination point of the current buffer's autoloads.
FILE is the file name of the current buffer.
+LOAD-NAME is the name as it appears in the output.
Returns a buffer whose point is placed at the requested location.
-Returns nil if the file's autoloads are uptodate, otherwise
+Returns nil if the file's autoloads are up-to-date, otherwise
removes any prior now out-of-date autoload entries."
(catch 'up-to-date
(let* ((buf (current-buffer))
@@ -738,7 +739,7 @@ removes any prior now out-of-date autoload entries."
;; last-time is the time-stamp (specifying
;; the last time we looked at the file) and
;; the file hasn't been changed since.
- ((listp last-time)
+ ((listp last-time) (= (length last-time) 2)
(not (time-less-p last-time file-time)))
;; FIXME? Arguably we should throw a
;; user error, or some kind of warning,
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 5543e92..f29f64f 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -152,12 +152,11 @@ For example, you could write
...BODY CODE...)"
(declare (doc-string 2)
(debug (&define name string-or-null-p
- [&optional [¬ keywordp] sexp
- &optional [¬ keywordp] sexp
- &optional [¬ keywordp] sexp]
- [&rest [keywordp sexp]]
- def-body))
- (indent 1))
+ [&optional [¬ keywordp] sexp
+ &optional [¬ keywordp] sexp
+ &optional [¬ keywordp] sexp]
+ [&rest [keywordp sexp]]
+ def-body)))
;; Allow skipping the first three args.
(cond
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 574ecef..cb8abde 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -131,9 +131,10 @@
t))
"\\s-+\\(" lisp-mode-symbol-regexp "\\)"))
2)
- ;; For `defvar', we ignore (defvar FOO) constructs.
+ ;; For `defvar'/`defvar-local', we ignore (defvar FOO) constructs.
(list (purecopy "Variables")
- (purecopy (concat "^\\s-*(defvar\\s-+\\(" lisp-mode-symbol-regexp "\\)"
+ (purecopy (concat "^\\s-*(defvar\\(?:-local\\)?\\s-+\\("
+ lisp-mode-symbol-regexp "\\)"
"[[:space:]\n]+[^)]"))
1)
(list (purecopy "Types")
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index f8cdaa9..7402464 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -538,7 +538,7 @@ This is a specialization of `soap-encode-value' for
(base64Binary
(unless (stringp value)
(error "Not a string value for base64Binary"))
- (base64-encode-string value))
+ (base64-encode-string (encode-coding-string value 'utf-8)))
(otherwise
(error "Don't know how to encode %s for type %s"
@@ -682,7 +682,7 @@ This is a specialization of `soap-decode-type' for
decimal byte float double duration)
(string-to-number (car contents)))
(boolean (string= (downcase (car contents)) "true"))
- (base64Binary (base64-decode-string (car contents)))
+ (base64Binary (decode-coding-string (base64-decode-string (car
contents)) 'utf-8))
(anyType (soap-decode-any-type node))
(Array (soap-decode-array node))))))
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index a46f048..6761de1 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1121,35 +1121,15 @@ numeric argument is supplied, or the point is inside a
literal."
(looking-at "<<"))
(>= (match-end 0) final-pos)))
- ;; It's a >. Either a C++ >> operator. ......
- (or (and (c-major-mode-is 'c++-mode)
+ ;; It's a >. Either a template/generic terminator ...
+ (or (c-get-char-property (1- final-pos) 'syntax-table)
+ ;; or a C++ >> operator.
+ (and (c-major-mode-is 'c++-mode)
(progn
(goto-char (1- final-pos))
(c-beginning-of-current-token)
(looking-at ">>"))
- (>= (match-end 0) final-pos))
- ;; ...., or search back for a < which isn't already marked as
an
- ;; opening template delimiter.
- (save-restriction
- (widen)
- ;; Narrow to avoid `c-forward-<>-arglist' below searching
past
- ;; our position.
- (narrow-to-region (point-min) final-pos)
- (goto-char final-pos)
- (while
- (and
- (progn
- (c-syntactic-skip-backward "^<;}" nil t)
- (eq (char-before) ?<))
- (progn
- (backward-char)
- (looking-at "\\s("))))
- (and (eq (char-after) ?<)
- (not (looking-at "\\s("))
- (progn (c-backward-syntactic-ws)
- (c-simple-skip-symbol-backward))
- (or (looking-at c-opt-<>-sexp-key)
- (not (looking-at c-keywords-regexp)))))))))
+ (>= (match-end 0) final-pos))))))
(goto-char final-pos)
(when found-delim
@@ -1157,11 +1137,9 @@ numeric argument is supplied, or the point is inside a
literal."
(when (and (eq (char-before) ?>)
(not executing-kbd-macro)
blink-paren-function)
- ;; Currently (2014-10-19), the syntax-table text properties on < and >
- ;; are only applied in code called during Emacs redisplay. We thus
- ;; explicitly cause a redisplay so that these properties have been
- ;; applied when `blink-paren-function' gets called.
- (sit-for 0)
+ ;; From now (2016-01-01), the syntax-table text properties on < and >
+ ;; are applied in an after-change function, not during redisplay. Hence
+ ;; we no longer need to call (sit-for 0) for blink paren to work.
(funcall blink-paren-function)))))
(defun c-electric-paren (arg)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 617c94a..3301d41 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -5577,8 +5577,9 @@ comment at the start of cc-engine.el for more info."
(defun c-before-change-check-<>-operators (beg end)
;; Unmark certain pairs of "< .... >" which are currently marked as
- ;; template/generic delimiters. (This marking is via syntax-table
- ;; text properties).
+ ;; template/generic delimiters. (This marking is via syntax-table text
+ ;; properties), and expand the (c-new-BEG c-new-END) region to include all
+ ;; unmarked < and > operators within the certain bounds (see below).
;;
;; These pairs are those which are in the current "statement" (i.e.,
;; the region between the {, }, or ; before BEG and the one after
@@ -5595,40 +5596,43 @@ comment at the start of cc-engine.el for more info."
;; FIXME!!! This routine ignores the possibility of macros entirely.
;; 2010-01-29.
(save-excursion
- (let ((beg-lit-limits (progn (goto-char beg) (c-literal-limits)))
- (end-lit-limits (progn (goto-char end) (c-literal-limits)))
- new-beg new-end need-new-beg need-new-end)
- ;; Locate the barrier before the changed region
+ (c-save-buffer-state
+ ((beg-lit-limits (progn (goto-char beg) (c-literal-limits)))
+ (end-lit-limits (progn (goto-char end) (c-literal-limits)))
+ new-beg new-end beg-limit end-limit)
+ ;; Locate the earliest < after the barrier before the changed region,
+ ;; which isn't already marked as a paren.
(goto-char (if beg-lit-limits (car beg-lit-limits) beg))
- (c-syntactic-skip-backward "^;{}" (c-determine-limit 512))
- (setq new-beg (point))
+ (setq beg-limit (c-determine-limit 512))
;; Remove the syntax-table/category properties from each pertinent <...>
- ;; pair. Firsly, the ones with the < before beg and > after beg.
- (while
- (c-search-forward-char-property 'syntax-table c-<-as-paren-syntax beg)
- (if (c-clear-<-pair-props-if-match-after beg (1- (point)))
- (setq need-new-beg t)))
+ ;; pair. Firstly, the ones with the < before beg and > after beg....
+ (while (progn (c-syntactic-skip-backward "^;{}<" beg-limit)
+ (eq (char-before) ?<))
+ (c-backward-token-2)
+ (when (eq (char-after) ?<)
+ (c-clear-<-pair-props-if-match-after beg)))
+ (c-forward-syntactic-ws)
+ (setq new-beg (point))
- ;; Locate the barrier after END.
+ ;; ...Then the ones with < before end and > after end.
(goto-char (if end-lit-limits (cdr end-lit-limits) end))
- (c-syntactic-re-search-forward "[;{}]" (c-determine-+ve-limit 512) 'end)
+ (setq end-limit (c-determine-+ve-limit 512))
+ (while (and (c-syntactic-re-search-forward "[;{}>]" end-limit 'end)
+ (eq (char-before) ?>))
+ (c-end-of-current-token)
+ (when (eq (char-before) ?>)
+ (c-clear->-pair-props-if-match-before end (1- (point)))))
+ (c-backward-syntactic-ws)
(setq new-end (point))
- ;; Remove syntax-table properties from the remaining pertinent <...>
- ;; pairs, those with a > after end and < before end.
- (while (c-search-backward-char-property 'syntax-table
c->-as-paren-syntax end)
- (if (c-clear->-pair-props-if-match-before end)
- (setq need-new-end t)))
-
;; Extend the fontification region, if needed.
- (when need-new-beg
- (goto-char new-beg)
- (c-forward-syntactic-ws)
- (and (< (point) c-new-BEG) (setq c-new-BEG (point))))
-
- (when need-new-end
- (and (> new-end c-new-END) (setq c-new-END new-end))))))
+ (and new-beg
+ (< new-beg c-new-BEG)
+ (setq c-new-BEG new-beg))
+ (and new-end
+ (> new-end c-new-END)
+ (setq c-new-END new-end)))))
(defun c-after-change-check-<>-operators (beg end)
;; This is called from `after-change-functions' when
@@ -5668,7 +5672,28 @@ comment at the start of cc-engine.el for more info."
(c-clear-<>-pair-props)
(forward-char)))))))
-
+(defun c-restore-<>-properties (_beg _end _old-len)
+ ;; This function is called as an after-change function. It restores the
+ ;; category/syntax-table properties on template/generic <..> pairs between
+ ;; c-new-BEG and c-new-END. It may do hidden buffer changes.
+ (c-save-buffer-state ((c-parse-and-markup-<>-arglists t)
+ c-restricted-<>-arglists lit-limits)
+ (goto-char c-new-BEG)
+ (if (setq lit-limits (c-literal-limits))
+ (goto-char (cdr lit-limits)))
+ (while (and (< (point) c-new-END)
+ (c-syntactic-re-search-forward "<" c-new-END 'bound))
+ (backward-char)
+ (save-excursion
+ (c-backward-token-2)
+ (setq c-restricted-<>-arglists
+ (and (not (looking-at c-opt-<>-sexp-key))
+ (progn (c-backward-syntactic-ws) ; to < or ,
+ (and (memq (char-before) '(?< ?,))
+ (not (eq (c-get-char-property (point) 'c-type)
+ 'c-decl-arg-start)))))))
+ (or (c-forward-<>-arglist nil)
+ (forward-char)))))
;; Handling of small scale constructs like types and names.
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index c2b2d72..f74e5cb 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1205,6 +1205,9 @@ casts and declarations are fontified. Used on level 2
and higher."
;; Same as `max-type-decl-*', but used when we're before
;; `token-pos'.
(max-type-decl-end-before-token 0)
+ ;; End of <..> construct which has had c-<>-arg-sep c-type
+ ;; properties set within it.
+ (max-<>-end 0)
;; Set according to the context to direct the heuristics for
;; recognizing C++ templates.
c-restricted-<>-arglists
@@ -1347,6 +1350,28 @@ casts and declarations are fontified. Used on level 2
and higher."
(setq decl-or-cast (c-forward-decl-or-cast-1
match-pos context last-cast-end))
+ ;; Ensure that c-<>-arg-sep c-type properties are in place on the
+ ;; commas separating the arguments inside template/generic <..>s.
+ (when (and (eq (char-before match-pos) ?<)
+ (> match-pos max-<>-end))
+ (save-excursion
+ (goto-char match-pos)
+ (c-backward-token-2)
+ (if (and
+ (eq (char-after) ?<)
+ (let ((c-restricted-<>-arglists
+ (save-excursion
+ (c-backward-token-2)
+ (and
+ (not (looking-at c-opt-<>-sexp-key))
+ (progn (c-backward-syntactic-ws)
+ (memq (char-before) '(?\( ?,)))
+ (not (eq (c-get-char-property (1- (point))
+ 'c-type)
+ 'c-decl-arg-start))))))
+ (c-forward-<>-arglist nil)))
+ (setq max-<>-end (point)))))
+
(cond
((eq decl-or-cast 'cast)
;; Save the position after the previous cast so we can feed
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 8ae7527..08d84fb 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -499,8 +499,13 @@ parameters \(point-min) and \(point-max).")
;; For documentation see the following c-lang-defvar of the same name.
;; The value here may be a list of functions or a single function.
t 'c-change-expand-fl-region
- (c c++ objc) '(c-neutralize-syntax-in-and-mark-CPP
- c-change-expand-fl-region)
+ (c objc) '(c-neutralize-syntax-in-and-mark-CPP
+ c-change-expand-fl-region)
+ c++ '(c-neutralize-syntax-in-and-mark-CPP
+ c-restore-<>-properties
+ c-change-expand-fl-region)
+ java '(c-restore-<>-properties
+ c-change-expand-fl-region)
awk 'c-awk-extend-and-syntax-tablify-region)
(c-lang-defvar c-before-font-lock-functions
(let ((fs (c-lang-const c-before-font-lock-functions)))
@@ -526,8 +531,8 @@ When the mode is initialized, these functions are called
with
parameters \(point-min), \(point-max) and <buffer size>.")
(c-lang-defconst c-before-context-fontification-functions
- awk nil
- t 'c-context-expand-fl-region)
+ t 'c-context-expand-fl-region
+ awk nil)
;; For documentation see the following c-lang-defvar of the same name.
;; The value here may be a list of functions or a single function.
(c-lang-defvar c-before-context-fontification-functions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 7f71700..6440659 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -631,8 +631,11 @@ that requires a literal mode spec at compile time."
(font-lock-mode 1)))
;; Buffer local variables defining the region to be fontified by a font lock
-;; after-change function. They are set in c-after-change to
-;; after-change-functions' BEG and END, and may be modified by functions in
+;; after-change function. They are initialized in c-before-change to
+;; before-change-functions' BEG and END. `c-new-END' is amended in
+;; c-after-change with after-change-functions' BEG, END, and OLD-LEN. These
+;; variables may be modified by any before/after-change function, in
+;; particular by functions in `c-get-state-before-change-functions' and
;; `c-before-font-lock-functions'.
(defvar c-new-BEG 0)
(make-variable-buffer-local 'c-new-BEG)
@@ -671,8 +674,9 @@ compatible with old code; callers should always specify it."
(funcall fn (point-min) (point-max)))
c-get-state-before-change-functions)
(mapc (lambda (fn)
- (funcall fn (point-min) (point-max)
- (- (point-max) (point-min))))
+ (if (not (eq fn 'c-restore-<>-properties))
+ (funcall fn (point-min) (point-max)
+ (- (point-max) (point-min)))))
c-before-font-lock-functions))))
(set (make-local-variable 'outline-regexp) "[^#\n\^M]")
@@ -1032,6 +1036,8 @@ Note that the style variables are always made local to
the buffer."
c-just-done-before-change) ; guard against a spurious second
; invocation of before-change-functions.
(setq c-just-done-before-change t)
+ ;; (c-new-BEG c-new-END) will be the region to fontify.
+ (setq c-new-BEG beg c-new-END end)
(setq c-maybe-stale-found-type nil)
(save-restriction
(save-match-data
@@ -1126,7 +1132,8 @@ Note that the style variables are always made local to
the buffer."
;; (c-new-BEG c-new-END) will be the region to fontify. It may become
;; larger than (beg end).
- (setq c-new-BEG beg c-new-END end)
+ ;; (setq c-new-BEG beg c-new-END end)
+ (setq c-new-END (- (+ c-new-END (- end beg)) old-len))
(unless (c-called-from-text-property-change-p)
(setq c-just-done-before-change nil)
@@ -1245,7 +1252,8 @@ Note that the style variables are always made local to
the buffer."
(save-restriction
(widen)
(save-excursion
- (let ((new-beg beg) (new-end end) new-region)
+ (let ((new-beg beg) (new-end end)
+ (new-region (cons beg end)))
(mapc (lambda (fn)
(setq new-region (funcall fn new-beg new-end))
(setq new-beg (car new-region) new-end (cdr new-region)))
diff --git a/lisp/progmodes/opascal.el b/lisp/progmodes/opascal.el
index 72c09fe..6a02280 100644
--- a/lisp/progmodes/opascal.el
+++ b/lisp/progmodes/opascal.el
@@ -257,6 +257,7 @@ routine.")
(defvar opascal-mode-syntax-table
(let ((st (make-syntax-table)))
+ (modify-syntax-entry ?\\ "." st) ; bug#22224
;; Strings.
(modify-syntax-entry ?\" "\"" st)
(modify-syntax-entry ?\' "\"" st)
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index 6efc0b1..214f381 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -1174,9 +1174,10 @@ the remaining input.")
(defun xscheme-prompt-for-expression-exit ()
(interactive)
- (if (eq (xscheme-region-expression-p (point-min) (point-max)) 'one)
+ (if (eq (xscheme-region-expression-p (minibuffer-prompt-end) (point-max))
+ 'one)
(exit-minibuffer)
- (error "input must be a single, complete expression")))
+ (error "Input must be a single, complete expression")))
(defun xscheme-region-expression-p (start end)
(save-excursion
diff --git a/src/buffer.c b/src/buffer.c
index 51c36de..3f93716 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5803,11 +5803,14 @@ you probably should set this to -2 in that buffer. */);
DEFVAR_PER_BUFFER ("selective-display", &BVAR (current_buffer,
selective_display),
Qnil,
doc: /* Non-nil enables selective display.
+
An integer N as value means display only lines
that start with less than N columns of space.
+
A value of t means that the character ^M makes itself and
all the rest of the line invisible; also, when saving the buffer
-in a file, save the ^M as a newline. */);
+in a file, save the ^M as a newline. This usage is obsolete; use
+overlays or text properties instead. */);
DEFVAR_PER_BUFFER ("selective-display-ellipses",
&BVAR (current_buffer, selective_display_ellipses),
@@ -6201,11 +6204,11 @@ all windows or just the selected window.
Lisp programs may give this variable certain special values:
-- A value of \\='lambda (literally) enables Transient Mark mode temporarily.
- It is disabled again after any subsequent action that would
+- The symbol `lambda' enables Transient Mark mode temporarily.
+ The mode is disabled again after any subsequent action that would
normally deactivate the mark (e.g. buffer modification).
-- A value of (only . OLDVAL) enables Transient Mark mode
+- The pair (only . OLDVAL) enables Transient Mark mode
temporarily. After any subsequent point motion command that is
not shift-translated, or any other action that would normally
deactivate the mark (e.g. buffer modification), the value of
diff --git a/src/print.c b/src/print.c
index 9756750..269d8f2 100644
--- a/src/print.c
+++ b/src/print.c
@@ -200,6 +200,13 @@ printchar_to_stream (unsigned int ch, FILE *stream)
{
Lisp_Object dv IF_LINT (= Qnil);
ptrdiff_t i = 0, n = 1;
+ Lisp_Object coding_system = Vlocale_coding_system;
+ bool encode_p = false;
+
+ if (!NILP (Vcoding_system_for_write))
+ coding_system = Vcoding_system_for_write;
+ if (!NILP (coding_system))
+ encode_p = true;
if (CHAR_VALID_P (ch) && DISP_TABLE_P (Vstandard_display_table))
{
@@ -228,8 +235,11 @@ printchar_to_stream (unsigned int ch, FILE *stream)
unsigned char mbstr[MAX_MULTIBYTE_LENGTH];
int len = CHAR_STRING (ch, mbstr);
Lisp_Object encoded_ch =
- ENCODE_SYSTEM (make_multibyte_string ((char *) mbstr, 1, len));
+ make_multibyte_string ((char *) mbstr, 1, len);
+ if (encode_p)
+ encoded_ch = code_convert_string_norecord (encoded_ch,
+ coding_system, true);
fwrite (SSDATA (encoded_ch), 1, SBYTES (encoded_ch), stream);
#ifdef WINDOWSNT
if (print_output_debug_flag && stream == stderr)
diff --git a/src/xdisp.c b/src/xdisp.c
index b18bfd0..ee748bd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10206,7 +10206,16 @@ message_to_stderr (Lisp_Object m)
}
if (STRINGP (m))
{
- Lisp_Object s = ENCODE_SYSTEM (m);
+ Lisp_Object coding_system = Vlocale_coding_system;
+ Lisp_Object s;
+
+ if (!NILP (Vcoding_system_for_write))
+ coding_system = Vcoding_system_for_write;
+ if (!NILP (coding_system))
+ s = code_convert_string_norecord (m, coding_system, true);
+ else
+ s = m;
+
fwrite (SDATA (s), SBYTES (s), 1, stderr);
}
if (!cursor_in_echo_area)
diff --git a/test/Makefile.in b/test/Makefile.in
index db386ce..62443a1 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -133,8 +133,7 @@ $(foreach test,${TESTS},$(eval $(call
test_template,${test})))
## have to run Emacs for every make invocation, and it might not be
## available during clean.
-include make-test-deps.mk
-
-## Re-run all the tests every time.
+## Rerun default tests.
check:
address@hidden f in $(LOGFILES); do test ! -f $$f || mv $$f $$f~; done
@${MAKE} check-maybe
- [Emacs-diffs] master 9278e97 01/15: Merge from origin/emacs-25, (continued)
- [Emacs-diffs] master 9278e97 01/15: Merge from origin/emacs-25, John Wiegley, 2016/01/12
- [Emacs-diffs] master 8d7128c 03/15: Merge from origin/emacs-25, John Wiegley, 2016/01/12
- [Emacs-diffs] master 540bfa7 06/15: ; Merge from origin/emacs-25, John Wiegley, 2016/01/12
- [Emacs-diffs] master 70f3e4e 08/15: ; Merge from origin/emacs-25, John Wiegley, 2016/01/12
- [Emacs-diffs] master 91b263e 10/15: ; Merge from origin/emacs-25, John Wiegley, 2016/01/12
- [Emacs-diffs] master 2d7f4d9 12/15: ; Merge from origin/emacs-25, John Wiegley, 2016/01/12
- [Emacs-diffs] master f5d90b5 14/15: ; Merge from origin/emacs-25, John Wiegley, 2016/01/12
- [Emacs-diffs] master fb74bee 09/15: Merge from origin/emacs-25, John Wiegley, 2016/01/12
- [Emacs-diffs] master a8dd976 11/15: Merge from origin/emacs-25, John Wiegley, 2016/01/12
- [Emacs-diffs] master 4b739f7 07/15: Merge from origin/emacs-25, John Wiegley, 2016/01/12
- [Emacs-diffs] master fee9e3f 13/15: Merge from origin/emacs-25,
John Wiegley <=
- [Emacs-diffs] master c7bef6a 15/15: Merge from origin/emacs-25, John Wiegley, 2016/01/12
- [Emacs-diffs] master 1dd4f26 05/15: Merge from origin/emacs-25, John Wiegley, 2016/01/12