[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f1204e1 1/3: Merge from origin/emacs-26
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master f1204e1 1/3: Merge from origin/emacs-26 |
Date: |
Sun, 3 Dec 2017 00:42:51 -0500 (EST) |
branch: master
commit f1204e1dda84a65d7906949247076c6ba4d4ba40
Merge: bc092fc 8c8b673
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Merge from origin/emacs-26
8c8b673288 Fix backing up remote files in local directories on MS-Win...
8eb6870be6 Fix vertical cursor motion in pixel-scroll.el
625e84f156 Fix typos in doc strings of message.el
9292276a44 Fix a typo in the Emacs manual
42509c0649 Improve the documentation of 'table-insert-sequence'
93dc7ae4a4 Port better to QNX
ad99550610 Make tramp-test42-auto-load more robust
af0ce33d08 ; * lisp/composite.el (find-composition): Fix a typo in la...
bdbcdbac43 Avoid assertions in find-composition
---
configure.ac | 4 +++-
doc/emacs/abbrevs.texi | 4 ++--
doc/emacs/text.texi | 11 ++++++---
lisp/composite.el | 5 ++--
lisp/files.el | 54 ++++++++++++++++++++++++++++----------------
lisp/gnus/message.el | 8 +++----
lisp/pixel-scroll.el | 20 ++++++++--------
src/font.c | 23 ++++++++++++-------
test/lisp/net/tramp-tests.el | 6 ++---
9 files changed, 82 insertions(+), 53 deletions(-)
diff --git a/configure.ac b/configure.ac
index 469ad00..b773e3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -702,7 +702,9 @@ case "${canonical}" in
## QNX Neutrino
*-nto-qnx* )
opsys=qnxnto
+ test -z "$CC" && CC=qcc
CFLAGS="$CFLAGS -D__NO_EXT_QNX"
+ LDFLAGS="-N2MB $LDFLAGS"
;;
## Intel 386 machines where we don't care about the manufacturer.
@@ -2218,7 +2220,7 @@ test "$CANNOT_DUMP" = yes ||
case "$opsys" in
## darwin ld insists on the use of malloc routines in the System framework.
darwin | mingw32 | nacl | sol2-10) ;;
- cygwin | qnxto | freebsd)
+ cygwin | qnxnto | freebsd)
hybrid_malloc=yes
system_malloc= ;;
*) test "$ac_cv_func_sbrk" = yes &&
system_malloc=$emacs_cv_sanitize_address;;
diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi
index 117d07e..5f400a2 100644
--- a/doc/emacs/abbrevs.texi
+++ b/doc/emacs/abbrevs.texi
@@ -62,8 +62,8 @@ definition for the current major mode overrides a global
definition.
You can define abbrevs interactively during the editing session,
irrespective of whether Abbrev mode is enabled. You can also save
-lists of abbrev definitions in files, which you can the reload for use
-in later sessions.
+lists of abbrev definitions in files, which you can then reload for
+use in later sessions.
@node Defining Abbrevs
@section Defining Abbrevs
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index c5967f8..7aa859d 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -2814,9 +2814,14 @@ high, the table is 67 characters wide and 16 lines high
with 2 columns
and 3 rows, and a total of 5 cells.
@findex table-insert-sequence
- @kbd{M-x table-insert-sequence} inserts a string into each cell.
-Each string is a part of a sequence i.e., a series of increasing
-integer numbers.
+ @kbd{M-x table-insert-sequence} traverses the cells of a table
+inserting a sequence of text strings into each cell as it goes. It
+asks for the base string of the sequence, and then produces the
+sequence by ``incrementing'' the base string, either numerically (if
+the base string ends in numerical characters) or in the
address@hidden order. In addition to the base string, the command
+prompts for the number of elements in the sequence, the increment, the
+cell interval, and the justification of the text in each cell.
@cindex table for HTML and LaTeX
@findex table-generate-source
diff --git a/lisp/composite.el b/lisp/composite.el
index 72b0ffc..7293d7c 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -337,8 +337,9 @@ When Automatic Composition mode is on, this function also
finds a
chunk of text that is automatically composed. If such a chunk is
found closer to POS than the position that has `composition'
property, the value is a list of FROM, TO, and a glyph-string
-that specifies how the chunk is to be composed. See the function
-`composition-get-gstring' for the format of the glyph-string."
+that specifies how the chunk is to be composed; DETAIL-P is
+inored in this case. See the function `composition-get-gstring'
+for the format of the glyph-string."
(let ((result (find-composition-internal pos limit string detail-p)))
(if (and detail-p (> (length result) 3) (nth 2 result) (not (nth 3
result)))
;; This is a valid rule-base composition.
diff --git a/lisp/files.el b/lisp/files.el
index 2574609..a5a2681 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4653,25 +4653,41 @@ The function `find-backup-file-name' also uses this."
;; "/drive_x".
(or (file-name-absolute-p file)
(setq file (expand-file-name file))) ; make defaults explicit
- ;; Replace any invalid file-name characters (for the
- ;; case of backing up remote files).
- (setq file (expand-file-name (convert-standard-filename file)))
- (if (eq (aref file 1) ?:)
- (setq file (concat "/"
- "drive_"
- (char-to-string (downcase (aref file 0)))
- (if (eq (aref file 2) ?/)
- ""
- "/")
- (substring file 2)))))
- ;; Make the name unique by substituting directory
- ;; separators. It may not really be worth bothering about
- ;; doubling `!'s in the original name...
- (expand-file-name
- (subst-char-in-string
- ?/ ?!
- (replace-regexp-in-string "!" "!!" file))
- backup-directory))
+ (cond
+ ((file-remote-p file)
+ ;; Remove the leading slash, if any, to prevent
+ ;; expand-file-name from adding a drive letter.
+ (and (memq (aref file 0) '(?/ ?\\))
+ (setq file (substring file 1)))
+ ;; Replace any invalid file-name characters.
+ (setq file (convert-standard-filename file))
+ ;; Replace slashes to make the file name unique, and
+ ;; prepend backup-directory.
+ (expand-file-name
+ (subst-char-in-string
+ ?/ ?!
+ (replace-regexp-in-string "!" "!!"
+ (concat "/" file)))
+ backup-directory))
+ (t
+ ;; Replace any invalid file-name characters.
+ (setq file (expand-file-name (convert-standard-filename file)))
+ (if (eq (aref file 1) ?:)
+ (setq file (concat "/"
+ "drive_"
+ (char-to-string (downcase (aref file 0)))
+ (if (eq (aref file 2) ?/)
+ ""
+ "/")
+ (substring file 2))))
+ ;; Make the name unique by substituting directory
+ ;; separators. It may not really be worth bothering about
+ ;; doubling `!'s in the original name...
+ (expand-file-name
+ (subst-char-in-string
+ ?/ ?!
+ (replace-regexp-in-string "!" "!!" file))
+ backup-directory)))))
(expand-file-name (file-name-nondirectory file)
(file-name-as-directory abs-backup-directory))))))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 8e3d299..0f99cb6 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -1433,7 +1433,7 @@ starting with `not' and followed by regexps."
(:foreground "MidnightBlue" :bold t))
(t
(:bold t :italic t)))
- "Face used for displaying From headers."
+ "Face used for displaying To headers."
:group 'message-faces)
;; backward-compatibility alias
(put 'message-header-to-face 'face-alias 'message-header-to)
@@ -1463,7 +1463,7 @@ starting with `not' and followed by regexps."
(:foreground "navy blue" :bold t))
(t
(:bold t)))
- "Face used for displaying subject headers."
+ "Face used for displaying Subject headers."
:group 'message-faces)
;; backward-compatibility alias
(put 'message-header-subject-face 'face-alias 'message-header-subject)
@@ -1478,7 +1478,7 @@ starting with `not' and followed by regexps."
(:foreground "blue4" :bold t :italic t))
(t
(:bold t :italic t)))
- "Face used for displaying newsgroups headers."
+ "Face used for displaying Newsgroups headers."
:group 'message-faces)
;; backward-compatibility alias
(put 'message-header-newsgroups-face 'face-alias 'message-header-newsgroups)
@@ -1493,7 +1493,7 @@ starting with `not' and followed by regexps."
(:foreground "steel blue"))
(t
(:bold t :italic t)))
- "Face used for displaying newsgroups headers."
+ "Face used for displaying other headers."
:group 'message-faces)
;; backward-compatibility alias
(put 'message-header-other-face 'face-alias 'message-header-other)
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index 9bfe5c9..f64a439 100644
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -110,11 +110,11 @@ This is an alternative of `scroll-up'. Scope moves
downward."
pixel-resolution-fine-flag
(frame-char-height))
(pixel-line-height))))
- (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close
- (scroll-up 1) ; relay on robust method
- (while (pixel-point-at-top-p amt) ; prevent too late (multi tries)
- (vertical-motion 1)) ; move point downward
- (pixel-scroll-pixel-up amt))))) ; move scope downward
+ (while (pixel-point-at-top-p amt) ; prevent too late (multi tries)
+ (vertical-motion 1)) ; move point downward
+ (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close
+ (scroll-up 1) ; relay on robust method
+ (pixel-scroll-pixel-up amt))))) ; move scope downward
(defun pixel-scroll-down (&optional arg)
"Scroll text of selected window down ARG lines.
@@ -127,11 +127,11 @@ This is and alternative of `scroll-down'. Scope moves
upward."
pixel-resolution-fine-flag
(frame-char-height))
(pixel-line-height -1))))
- (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen
- (pixel-eob-at-top-p)) ; for file with a long line
- (scroll-down 1) ; relay on robust method
- (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
- (vertical-motion -1))
+ (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
+ (vertical-motion -1)) ; move point upward
+ (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is
seen
+ (pixel-eob-at-top-p)) ; for file with a long line
+ (scroll-down 1) ; relay on robust method
(pixel-scroll-pixel-down amt)))))
(defun pixel-bob-at-top-p (amt)
diff --git a/src/font.c b/src/font.c
index f7cebdc..441652b 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3794,19 +3794,26 @@ font_range (ptrdiff_t pos, ptrdiff_t pos_byte,
ptrdiff_t *limit,
int c;
Lisp_Object font_object = Qnil;
- if (NILP (string))
+ if (!face)
{
- if (! face)
+ struct frame *f = XFRAME (w->frame);
+ int face_id;
+
+ if (NILP (string))
+ face_id = face_at_buffer_position (w, pos, &ignore, *limit,
+ false, -1);
+ else
{
- int face_id;
+ face_id =
+ NILP (Vface_remapping_alist)
+ ? DEFAULT_FACE_ID
+ : lookup_basic_face (f, DEFAULT_FACE_ID);
- face_id = face_at_buffer_position (w, pos, &ignore,
- *limit, false, -1);
- face = FACE_FROM_ID (XFRAME (w->frame), face_id);
+ face_id = face_at_string_position (w, string, pos, 0, &ignore,
+ face_id, false);
}
+ face = FACE_FROM_ID (f, face_id);
}
- else
- eassert (face);
while (pos < *limit)
{
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 044ab93..5699ab4 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -4624,15 +4624,13 @@ process sentinels. They shall not disturb each other."
(ignore-errors (cancel-timer timer))
(ignore-errors (delete-directory tmp-name 'recursive)))))))
+;; This test is inspired by Bug#29163.
(ert-deftest tramp-test42-auto-load ()
"Check that Tramp autoloads properly."
- (skip-unless (tramp--test-enabled))
- (skip-unless (not (tramp--test-mock-p)))
-
(let ((default-directory (expand-file-name temporary-file-directory))
(code
(format
- "(message \"Tramp loaded: %%s\" (consp (file-attributes %S)))"
+ "(message \"Tramp loaded: %%s\" (and (file-remote-p %S) t))"
tramp-test-temporary-file-directory)))
(should
(string-match