diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-12-02 21:38:05 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-12-02 21:38:05 -0800 |
commit | f1204e1dda84a65d7906949247076c6ba4d4ba40 (patch) | |
tree | 634603e56c040597c1f11fbe39fda9d6a4ba14a4 /lisp | |
parent | bc092fcaea7268f2339f0e92720a37e62cdca5b2 (diff) | |
parent | 8c8b6732882248df4ca3b687e0a4b4e5e4ab3777 (diff) | |
download | emacs-f1204e1dda84a65d7906949247076c6ba4d4ba40.tar.gz |
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
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/composite.el | 5 | ||||
-rw-r--r-- | lisp/files.el | 54 | ||||
-rw-r--r-- | lisp/gnus/message.el | 8 | ||||
-rw-r--r-- | lisp/pixel-scroll.el | 20 |
4 files changed, 52 insertions, 35 deletions
diff --git a/lisp/composite.el b/lisp/composite.el index 72b0ffc8f48..7293d7c15cd 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 25746094d2a..a5a268195f5 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 8e3d299ee80..0f99cb697dc 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 9bfe5c91f57..f64a4392b49 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) |