aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2017-10-20 22:44:13 -0700
committerPaul Eggert2017-10-20 22:44:13 -0700
commit3155cb1585da7235145d76791feaf6170d8be0f1 (patch)
tree19b655867f27bb630b182f4bdb00a2e2d5ee6427 /lisp
parentcb29f41624e5163a0aea4bfc98591e683807a2f8 (diff)
parent11bd8aa24b347f75e674528dd1a94b0a4037105e (diff)
downloademacs-3155cb1585da7235145d76791feaf6170d8be0f1.tar.gz
emacs-3155cb1585da7235145d76791feaf6170d8be0f1.zip
Merge from origin/emacs-26
11bd8aa24b Fix flymake's loading of subr-x b500e06f4d Fix Bug#28896 d815de017b Skip a Flymake test for old gcc versions fd3d8610b2 Make :align-to account for display-line-numbers 831eafc8ae Augment Flymake API for third-party extensions ddd547fada Improve treatment of Fortran's "class default" 234b1e3864 Flymake backends must check proc obsoleteness in source bu... 3ea6a4d4ba Skip an rsync test in tramp-tests.el 25f83fa7c5 ; Indentation fixes 4d578d432d On Windows default a frame's border width to zero (Bug#28873) 6f1dea5c74 Spelling fixes b8433b0954 Use pop-to-buffer-same-window instead of switch-to-buffer 2f7163fb72 Fix the MSDOS build. 2551d28fe8 Fix line number display after 'widen' dc8812829b Remove resizable attribute on macOS undecorated frames (bu... b970a4a52a Fix handling of `border-width' in `frameset--restore-frame... 445e92658f Mention how to send CC to > 1 address in a bug report 8ca6fa585a Improve format-time-string doc 2e1b3522b8 Improve documentation of 'line-number-display-width' 5b6e59cfdb Implement vc-default-dir-extra-headers for vc-rcs 22adeca42a In NEWS give advice on use of `switch-to-buffer' (Bug#28645) 2c3e6f1ddc Dont update primary selection with winner-undo b38724ab67 Work around ImageMagick bug 825 20cc68e871 Document rectangle-preview option more (Bug#27974) a0b7b301dd Do not reject https://gnu.org in commit messages fb4200a875 Fix Edebug spec for cl-defun (bug#24255) db68cefe72 Fix errors in kmacro.el post-command-hook c63b344c3d Fix range-error in image-dired.el 081d2187c4 Fix 'line-number-display-width' in hscrolled windows 16e85456e7 Fix error in tramp-smb-handle-insert-directory 613db8d35c Don't reject PBM header whitespace unnecessarily 3205b12a78 Fix regression in display of PPM images 1ca9ae7069 Require subr-x when compiling nnimap.el de60992053 Fix ert-test finding by symbol (Bug#28849) 51615a8082 Don't remember old debugger window (Bug#17882) 5980de3727 Disable python native completion on w32 (Bug#28580) 616b4c5956 Let select-frame-by-name choose any frame when called from... 8eb3c01dbd * lisp/dired-aux.el (dired-create-directory): Doc fix. 325dfdae13 Avoid compilation warnings in optimized builds f79382819c ; * src/composite.c (Fclear_composition_cache): Fix last c... f95cd5cd70 Improve customization of arabic-shaper-ZWNJ-handling. a7f154688d Improve customization type of 'mouse-drag-and-drop-region' 864734d112 ; Prefer https: to http: in GNU URLs 3c78960a47 Encourage https: in commit messages def9715282 ; Cleanup of etc/NEWS 4e59ecc646 Fix wording in Elisp manual's child frames section (Bug#28... eda9f5018c Another fix for C mode fontification of w32 source files 05aadd8990 Fix fontification of ALIGN_STACK functions aa0c38f358 Make sure thread stack is properly aligned on MS-Windows d7038020aa Do not under-align pseudovectors ff33053012 Fix indentation bug in multi-line CSS selectors 8968be822e ; * etc/NEWS: Grammar and spelling fixes 716b84034d gnutls_mac_get_nonce_size has been added in gnutls 3.3 55e313f7be ; * CONTRIBUTE: More suggestions for using US English. 622c675648 * CONTRIBUTE: Suggest American English. # Conflicts: # etc/NEWS # msdos/sed2v2.inp
Diffstat (limited to 'lisp')
-rw-r--r--lisp/cedet/semantic/analyze/refs.el2
-rw-r--r--lisp/cedet/semantic/complete.el2
-rw-r--r--lisp/cedet/semantic/decorate/include.el2
-rw-r--r--lisp/cedet/semantic/mru-bookmark.el2
-rw-r--r--lisp/cedet/semantic/senator.el4
-rw-r--r--lisp/dired-aux.el1
-rw-r--r--lisp/emacs-lisp/cl-macs.el32
-rw-r--r--lisp/emacs-lisp/debug.el4
-rw-r--r--lisp/emacs-lisp/ert.el4
-rw-r--r--lisp/emacs-lisp/rmc.el2
-rw-r--r--lisp/emacs-lisp/tabulated-list.el25
-rw-r--r--lisp/frame.el16
-rw-r--r--lisp/frameset.el6
-rw-r--r--lisp/gnus/nnimap.el3
-rw-r--r--lisp/image-dired.el5
-rw-r--r--lisp/image.el4
-rw-r--r--lisp/kmacro.el2
-rw-r--r--lisp/language/misc-lang.el5
-rw-r--r--lisp/mouse.el10
-rw-r--r--lisp/net/tramp-adb.el69
-rw-r--r--lisp/net/tramp-gvfs.el7
-rw-r--r--lisp/net/tramp-sh.el174
-rw-r--r--lisp/net/tramp-smb.el9
-rw-r--r--lisp/proced.el3
-rw-r--r--lisp/progmodes/elisp-mode.el3
-rw-r--r--lisp/progmodes/f90.el12
-rw-r--r--lisp/progmodes/flymake-proc.el2
-rw-r--r--lisp/progmodes/flymake.el61
-rw-r--r--lisp/progmodes/python.el5
-rw-r--r--lisp/rect.el4
-rw-r--r--lisp/ruler-mode.el16
-rw-r--r--lisp/textmodes/css-mode.el2
-rw-r--r--lisp/textmodes/rst.el16
-rw-r--r--lisp/vc/vc-rcs.el2
-rw-r--r--lisp/winner.el15
35 files changed, 315 insertions, 216 deletions
diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el
index e7a4424d6ff..84c60e2dae8 100644
--- a/lisp/cedet/semantic/analyze/refs.el
+++ b/lisp/cedet/semantic/analyze/refs.el
@@ -347,7 +347,7 @@ Only works for tags in the global namespace."
347 347
348 (push-mark) 348 (push-mark)
349 (semantic-go-to-tag target) 349 (semantic-go-to-tag target)
350 (switch-to-buffer (current-buffer)) 350 (pop-to-buffer-same-window (current-buffer))
351 (semantic-momentary-highlight-tag target)) 351 (semantic-momentary-highlight-tag target))
352 ) 352 )
353 353
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index ff8e61e54dc..325ca1f4414 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -2120,7 +2120,7 @@ completion works."
2120 (when (semantic-tag-p tag) 2120 (when (semantic-tag-p tag)
2121 (push-mark) 2121 (push-mark)
2122 (semantic-go-to-tag tag) 2122 (semantic-go-to-tag tag)
2123 (switch-to-buffer (current-buffer)) 2123 (pop-to-buffer-same-window (current-buffer))
2124 (semantic-momentary-highlight-tag tag) 2124 (semantic-momentary-highlight-tag tag)
2125 (message "%S: %s " 2125 (message "%S: %s "
2126 (semantic-tag-class tag) 2126 (semantic-tag-class tag)
diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el
index 6876e5f3a46..975ba343469 100644
--- a/lisp/cedet/semantic/decorate/include.el
+++ b/lisp/cedet/semantic/decorate/include.el
@@ -467,7 +467,7 @@ its contents.
467 (error "Could not location include %s" 467 (error "Could not location include %s"
468 (semantic-tag-name tag))) 468 (semantic-tag-name tag)))
469 ((get-file-buffer file) 469 ((get-file-buffer file)
470 (switch-to-buffer (get-file-buffer file))) 470 (pop-to-buffer-same-window (get-file-buffer file)))
471 ((stringp file) 471 ((stringp file)
472 (find-file file)) 472 (find-file file))
473 )))) 473 ))))
diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el
index 5fa58e08ea6..24863de01b1 100644
--- a/lisp/cedet/semantic/mru-bookmark.el
+++ b/lisp/cedet/semantic/mru-bookmark.el
@@ -113,7 +113,7 @@ Uses `semantic-go-to-tag' and highlighting."
113 (forward-char o)) 113 (forward-char o))
114 (error nil)) 114 (error nil))
115 ;; make it visible 115 ;; make it visible
116 (switch-to-buffer (current-buffer)) 116 (pop-to-buffer-same-window (current-buffer))
117 (semantic-momentary-highlight-tag tag) 117 (semantic-momentary-highlight-tag tag)
118 )) 118 ))
119 119
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index e86658628b5..ea796dd19f9 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -530,11 +530,11 @@ Some tags such as includes have other reference features."
530 ;; A tag 530 ;; A tag
531 ((semantic-tag-p result) 531 ((semantic-tag-p result)
532 (semantic-go-to-tag result) 532 (semantic-go-to-tag result)
533 (switch-to-buffer (current-buffer)) 533 (pop-to-buffer-same-window (current-buffer))
534 (semantic-momentary-highlight-tag result)) 534 (semantic-momentary-highlight-tag result))
535 ;; Buffers 535 ;; Buffers
536 ((bufferp result) 536 ((bufferp result)
537 (switch-to-buffer result) 537 (pop-to-buffer-same-window result)
538 (pulse-momentary-highlight-one-line (point))) 538 (pulse-momentary-highlight-one-line (point)))
539 ;; Files 539 ;; Files
540 ((and (stringp result) (file-exists-p result)) 540 ((and (stringp result) (file-exists-p result))
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 7813b20b78d..94938cf679e 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1985,6 +1985,7 @@ Optional arg HOW-TO determines how to treat the target.
1985;;;###autoload 1985;;;###autoload
1986(defun dired-create-directory (directory) 1986(defun dired-create-directory (directory)
1987 "Create a directory called DIRECTORY. 1987 "Create a directory called DIRECTORY.
1988Parent directories of DIRECTORY are created as needed.
1988If DIRECTORY already exists, signal an error." 1989If DIRECTORY already exists, signal an error."
1989 (interactive 1990 (interactive
1990 (list (read-file-name "Create directory: " (dired-current-directory)))) 1991 (list (read-file-name "Create directory: " (dired-current-directory))))
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 40eda1e0d65..e313af24975 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -193,20 +193,34 @@ The name is made by appending a number to PREFIX, default \"T\"."
193 (&or lambda-doc cl-declarations)) 193 (&or lambda-doc cl-declarations))
194 194
195(def-edebug-spec cl-lambda-list 195(def-edebug-spec cl-lambda-list
196 (([&rest arg] 196 (([&rest cl-lambda-arg]
197 [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] 197 [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
198 [&optional ["&rest" arg]] 198 [&optional ["&rest" cl-lambda-arg]]
199 [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] 199 [&optional ["&key" [cl-&key-arg &rest cl-&key-arg]
200 &optional "&allow-other-keys"]] 200 &optional "&allow-other-keys"]]
201 [&optional ["&aux" &rest 201 [&optional ["&aux" &rest
202 &or (symbolp &optional def-form) symbolp]] 202 &or (symbolp &optional def-form) symbolp]]
203 ))) 203 . [&or arg nil])))
204 204
205(def-edebug-spec cl-&optional-arg 205(def-edebug-spec cl-&optional-arg
206 (&or (arg &optional def-form arg) arg)) 206 (&or (cl-lambda-arg &optional def-form arg) arg))
207 207
208(def-edebug-spec cl-&key-arg 208(def-edebug-spec cl-&key-arg
209 (&or ([&or (symbolp arg) arg] &optional def-form arg) arg)) 209 (&or ([&or (symbolp cl-lambda-arg) arg] &optional def-form arg) arg))
210
211(def-edebug-spec cl-lambda-arg
212 (&or arg cl-lambda-list1))
213
214(def-edebug-spec cl-lambda-list1
215 (([&optional ["&whole" arg]] ;; only allowed at lower levels
216 [&rest cl-lambda-arg]
217 [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
218 [&optional ["&rest" cl-lambda-arg]]
219 [&optional ["&key" cl-&key-arg &rest cl-&key-arg
220 &optional "&allow-other-keys"]]
221 [&optional ["&aux" &rest
222 &or (symbolp &optional def-form) symbolp]]
223 . [&or arg nil])))
210 224
211(def-edebug-spec cl-type-spec sexp) 225(def-edebug-spec cl-type-spec sexp)
212 226
@@ -336,8 +350,8 @@ The full form of a Common Lisp function argument list is
336 [&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]] 350 [&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]]
337 [&aux (VAR [INITFORM])...]) 351 [&aux (VAR [INITFORM])...])
338 352
339VAR maybe be replaced recursively with an argument list for 353VAR may be replaced recursively with an argument list for
340destructing, `&whole' is supported within these sublists. If 354destructuring, `&whole' is supported within these sublists. If
341SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be 355SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be
342written simply `VAR'. See the Info node `(cl)Argument Lists' for 356written simply `VAR'. See the Info node `(cl)Argument Lists' for
343more details. 357more details.
@@ -430,8 +444,8 @@ The full form of a Common Lisp macro argument list is
430 [&aux (VAR [INITFORM])...] 444 [&aux (VAR [INITFORM])...]
431 [&environment VAR]) 445 [&environment VAR])
432 446
433VAR maybe be replaced recursively with an argument list for 447VAR may be replaced recursively with an argument list for
434destructing, `&whole' is supported within these sublists. If 448destructuring, `&whole' is supported within these sublists. If
435SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be 449SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be
436written simply `VAR'. See the Info node `(cl)Argument Lists' for 450written simply `VAR'. See the Info node `(cl)Argument Lists' for
437more details. 451more details.
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 192333252a1..53b8db81321 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -253,7 +253,9 @@ first will be printed into the backtrace buffer."
253 ;; Unshow debugger-buffer. 253 ;; Unshow debugger-buffer.
254 (quit-restore-window debugger-window debugger-bury-or-kill) 254 (quit-restore-window debugger-window debugger-bury-or-kill)
255 ;; Restore current buffer (Bug#12502). 255 ;; Restore current buffer (Bug#12502).
256 (set-buffer debugger-old-buffer)))) 256 (set-buffer debugger-old-buffer)))
257 ;; Forget debugger window, it won't be back (Bug#17882).
258 (setq debugger-previous-window nil))
257 ;; Restore previous state of debugger-buffer in case we were 259 ;; Restore previous state of debugger-buffer in case we were
258 ;; in a recursive invocation of the debugger, otherwise just 260 ;; in a recursive invocation of the debugger, otherwise just
259 ;; erase the buffer and put it into fundamental mode. 261 ;; erase the buffer and put it into fundamental mode.
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 83acbacb883..3a3979e81f0 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -1625,7 +1625,7 @@ default (if any)."
1625(defun ert-find-test-other-window (test-name) 1625(defun ert-find-test-other-window (test-name)
1626 "Find, in another window, the definition of TEST-NAME." 1626 "Find, in another window, the definition of TEST-NAME."
1627 (interactive (list (ert-read-test-name-at-point "Find test definition: "))) 1627 (interactive (list (ert-read-test-name-at-point "Find test definition: ")))
1628 (find-function-do-it test-name 'ert-deftest 'switch-to-buffer-other-window)) 1628 (find-function-do-it test-name 'ert--test 'switch-to-buffer-other-window))
1629 1629
1630(defun ert-delete-test (test-name) 1630(defun ert-delete-test (test-name)
1631 "Make the test TEST-NAME unbound. 1631 "Make the test TEST-NAME unbound.
@@ -2594,7 +2594,7 @@ To be used in the ERT results buffer."
2594 2594
2595;;; Actions on load/unload. 2595;;; Actions on load/unload.
2596 2596
2597(add-to-list 'find-function-regexp-alist '(ert-deftest . ert--find-test-regexp)) 2597(add-to-list 'find-function-regexp-alist '(ert--test . ert--find-test-regexp))
2598(add-to-list 'minor-mode-alist '(ert--current-run-stats 2598(add-to-list 'minor-mode-alist '(ert--current-run-stats
2599 (:eval 2599 (:eval
2600 (ert--tests-running-mode-line-indicator)))) 2600 (ert--tests-running-mode-line-indicator))))
diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
index 57bc6d9b591..0be6971992c 100644
--- a/lisp/emacs-lisp/rmc.el
+++ b/lisp/emacs-lisp/rmc.el
@@ -17,7 +17,7 @@
17;; GNU General Public License for more details. 17;; GNU General Public License for more details.
18 18
19;; You should have received a copy of the GNU General Public License 19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 20;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
21 21
22;;; Commentary: 22;;; Commentary:
23 23
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index d1d7c0a8042..73ddadfb805 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -193,10 +193,10 @@ Populated by `tabulated-list-init-header'.")
193 ;; is displayed. 193 ;; is displayed.
194 (if (not display-line-numbers) 194 (if (not display-line-numbers)
195 0 195 0
196 (let ((cbuf-window (get-buffer-window (current-buffer)))) 196 (let ((cbuf-window (get-buffer-window (current-buffer) t)))
197 (if (window-live-p cbuf-window) 197 (if (window-live-p cbuf-window)
198 (with-selected-window cbuf-window 198 (with-selected-window cbuf-window
199 (+ (line-number-display-width) 2)) 199 (line-number-display-width 'columns))
200 4)))) 200 4))))
201 201
202(defun tabulated-list-init-header () 202(defun tabulated-list-init-header ()
@@ -329,8 +329,6 @@ Check the current row, the previous one and the next row."
329 (string-width (if (stringp nt) nt (car nt))))) 329 (string-width (if (stringp nt) nt (car nt)))))
330 tabulated-list--near-rows))) 330 tabulated-list--near-rows)))
331 331
332(defvar tabulated-list-entry-lnum-width nil)
333
334(defun tabulated-list-print (&optional remember-pos update) 332(defun tabulated-list-print (&optional remember-pos update)
335 "Populate the current Tabulated List mode buffer. 333 "Populate the current Tabulated List mode buffer.
336This sorts the `tabulated-list-entries' list if sorting is 334This sorts the `tabulated-list-entries' list if sorting is
@@ -373,7 +371,6 @@ changing `tabulated-list-sort-key'."
373 (unless tabulated-list-use-header-line 371 (unless tabulated-list-use-header-line
374 (tabulated-list-print-fake-header))) 372 (tabulated-list-print-fake-header)))
375 ;; Finally, print the resulting list. 373 ;; Finally, print the resulting list.
376 (setq tabulated-list-entry-lnum-width (tabulated-list-line-number-width))
377 (while entries 374 (while entries
378 (let* ((elt (car entries)) 375 (let* ((elt (car entries))
379 (tabulated-list--near-rows 376 (tabulated-list--near-rows
@@ -428,9 +425,8 @@ of column descriptors."
428 (x (max tabulated-list-padding 0)) 425 (x (max tabulated-list-padding 0))
429 (ncols (length tabulated-list-format)) 426 (ncols (length tabulated-list-format))
430 (inhibit-read-only t)) 427 (inhibit-read-only t))
431 (setq x (+ x tabulated-list-entry-lnum-width))
432 (if (> tabulated-list-padding 0) 428 (if (> tabulated-list-padding 0)
433 (insert (make-string (- x tabulated-list-entry-lnum-width) ?\s))) 429 (insert (make-string x ?\s)))
434 (let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506). 430 (let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506).
435 (or (bound-and-true-p tabulated-list--near-rows) 431 (or (bound-and-true-p tabulated-list--near-rows)
436 (list (or (tabulated-list-get-entry (point-at-bol 0)) 432 (list (or (tabulated-list-get-entry (point-at-bol 0))
@@ -601,6 +597,14 @@ With a numeric prefix argument N, sort the Nth column."
601 (tabulated-list-init-header) 597 (tabulated-list-init-header)
602 (tabulated-list-print t))) 598 (tabulated-list-print t)))
603 599
600(defvar tabulated-list--current-lnum-width nil)
601(defun tabulated-list-watch-line-number-width (_window)
602 (if display-line-numbers
603 (let ((lnum-width (tabulated-list-line-number-width)))
604 (when (not (= tabulated-list--current-lnum-width lnum-width))
605 (setq-local tabulated-list--current-lnum-width lnum-width)
606 (tabulated-list-revert)))))
607
604;;; The mode definition: 608;;; The mode definition:
605 609
606(define-derived-mode tabulated-list-mode special-mode "Tabulated" 610(define-derived-mode tabulated-list-mode special-mode "Tabulated"
@@ -645,7 +649,12 @@ as the ewoc pretty-printer."
645 ;; column of the first entry happens to begin with a R2L letter. 649 ;; column of the first entry happens to begin with a R2L letter.
646 (setq bidi-paragraph-direction 'left-to-right) 650 (setq bidi-paragraph-direction 'left-to-right)
647 ;; This is for if/when they turn on display-line-numbers 651 ;; This is for if/when they turn on display-line-numbers
648 (add-hook 'display-line-numbers-mode-hook #'tabulated-list-revert nil t)) 652 (add-hook 'display-line-numbers-mode-hook #'tabulated-list-revert nil t)
653 ;; This is for if/when they customize the line-number face or when
654 ;; the line-number width needs to change due to scrolling.
655 (setq-local tabulated-list--current-lnum-width 0)
656 (add-hook 'pre-redisplay-functions
657 #'tabulated-list-watch-line-number-width nil t))
649 658
650(put 'tabulated-list-mode 'mode-class 'special) 659(put 'tabulated-list-mode 'mode-class 'special)
651 660
diff --git a/lisp/frame.el b/lisp/frame.el
index f8aa5c6e523..b6c066462b0 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -892,7 +892,8 @@ Calls `suspend-emacs' if invoked from the controlling tty device,
892 892
893(defvar frame-name-history nil) 893(defvar frame-name-history nil)
894(defun select-frame-by-name (name) 894(defun select-frame-by-name (name)
895 "Select the frame on the current terminal whose name is NAME and raise it. 895 "Select the frame whose name is NAME and raise it.
896Frames on the current terminal are checked first.
896If there is no frame by that name, signal an error." 897If there is no frame by that name, signal an error."
897 (interactive 898 (interactive
898 (let* ((frame-names-alist (make-frame-names-alist)) 899 (let* ((frame-names-alist (make-frame-names-alist))
@@ -903,11 +904,14 @@ If there is no frame by that name, signal an error."
903 (if (= (length input) 0) 904 (if (= (length input) 0)
904 (list default) 905 (list default)
905 (list input)))) 906 (list input))))
906 (let* ((frame-names-alist (make-frame-names-alist)) 907 (select-frame-set-input-focus
907 (frame (cdr (assoc name frame-names-alist)))) 908 ;; Prefer frames on the current display.
908 (if frame 909 (or (cdr (assoc name (make-frame-names-alist)))
909 (select-frame-set-input-focus frame) 910 (catch 'done
910 (error "There is no frame named `%s'" name)))) 911 (dolist (frame (frame-list))
912 (when (equal (frame-parameter frame 'name) name)
913 (throw 'done frame))))
914 (error "There is no frame named `%s'" name))))
911 915
912 916
913;;;; Background mode. 917;;;; Background mode.
diff --git a/lisp/frameset.el b/lisp/frameset.el
index bda21a8b8d7..d826f7fcdce 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -1035,6 +1035,12 @@ Internal use only."
1035 (frameset--initial-params filtered-cfg)))) 1035 (frameset--initial-params filtered-cfg))))
1036 (puthash frame :created frameset--action-map)) 1036 (puthash frame :created frameset--action-map))
1037 1037
1038 ;; Remove `border-width' from the list of parameters. If it has not
1039 ;; been assigned via `make-frame-on-display', any attempt to assign
1040 ;; it now via `modify-frame-parameters' may result in an error on X
1041 ;; (Bug#28873).
1042 (setq filtered-cfg (assq-delete-all 'border-width filtered-cfg))
1043
1038 ;; Try to assign parent-frame right here - it will improve things 1044 ;; Try to assign parent-frame right here - it will improve things
1039 ;; for minibuffer-less child frames. 1045 ;; for minibuffer-less child frames.
1040 (let* ((frame-id (frame-parameter frame 'frameset--parent-frame)) 1046 (let* ((frame-id (frame-parameter frame 'frameset--parent-frame))
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 6e2a735233a..297e2923ee6 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -27,7 +27,8 @@
27;;; Code: 27;;; Code:
28 28
29(eval-when-compile 29(eval-when-compile
30 (require 'cl)) 30 (require 'cl)
31 (require 'subr-x))
31 32
32(require 'nnheader) 33(require 'nnheader)
33(require 'gnus-util) 34(require 'gnus-util)
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index f48f1a1b874..30ecc2befc7 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -748,7 +748,10 @@ Increase at own risk.")
748 'image-dired-cmd-create-thumbnail-program) 748 'image-dired-cmd-create-thumbnail-program)
749 (let* ((width (int-to-string (image-dired-thumb-size 'width))) 749 (let* ((width (int-to-string (image-dired-thumb-size 'width)))
750 (height (int-to-string (image-dired-thumb-size 'height))) 750 (height (int-to-string (image-dired-thumb-size 'height)))
751 (modif-time (floor (float-time (nth 5 (file-attributes original-file))))) 751 (modif-time
752 (format "%.0f"
753 (ffloor (float-time
754 (nth 5 (file-attributes original-file))))))
752 (thumbnail-nq8-file (replace-regexp-in-string ".png\\'" "-nq8.png" 755 (thumbnail-nq8-file (replace-regexp-in-string ".png\\'" "-nq8.png"
753 thumbnail-file)) 756 thumbnail-file))
754 (spec 757 (spec
diff --git a/lisp/image.el b/lisp/image.el
index 1d0776180b2..32df508bc8d 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -34,8 +34,8 @@
34(defconst image-type-header-regexps 34(defconst image-type-header-regexps
35 `(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm) 35 `(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm)
36 ("\\`P[1-6]\\(?:\ 36 ("\\`P[1-6]\\(?:\
37\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[[:space:]]\\)+\ 37\\(?:\\(?:#[^\r\n]*[\r\n]\\)*[[:space:]]\\)+\
38\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[0-9]\\)+\ 38\\(?:\\(?:#[^\r\n]*[\r\n]\\)*[0-9]\\)+\
39\\)\\{2\\}" . pbm) 39\\)\\{2\\}" . pbm)
40 ("\\`GIF8[79]a" . gif) 40 ("\\`GIF8[79]a" . gif)
41 ("\\`\x89PNG\r\n\x1a\n" . png) 41 ("\\`\x89PNG\r\n\x1a\n" . png)
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 582a58eda1c..4abc571db44 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -937,7 +937,7 @@ without repeating the prefix."
937 937
938;;; Single-step editing of keyboard macros 938;;; Single-step editing of keyboard macros
939 939
940(defvar kmacro-step-edit-active) ;; step-editing active 940(defvar kmacro-step-edit-active nil) ;; step-editing active
941(defvar kmacro-step-edit-new-macro) ;; storage for new macro 941(defvar kmacro-step-edit-new-macro) ;; storage for new macro
942(defvar kmacro-step-edit-inserting) ;; inserting into macro 942(defvar kmacro-step-edit-inserting) ;; inserting into macro
943(defvar kmacro-step-edit-appending) ;; append to end of macro 943(defvar kmacro-step-edit-appending) ;; append to end of macro
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index a63c3a21091..cbb581fd19f 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -95,7 +95,10 @@ Customizing the value takes effect when you start Emacs next time."
95 :type '(choice 95 :type '(choice
96 (const :tag "default" nil) 96 (const :tag "default" nil)
97 (const :tag "as space" as-space) 97 (const :tag "as space" as-space)
98 (const :tag "absorb" absorb))) 98 (const :tag "absorb" absorb))
99 :set (lambda (sym val)
100 (set-default sym val)
101 (clear-composition-cache)))
99 102
100;; Record error in arabic-change-gstring. 103;; Record error in arabic-change-gstring.
101(defvar arabic-shape-log nil) 104(defvar arabic-shape-log nil)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 169d2632f4f..5eeee1ec52c 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -2349,7 +2349,15 @@ choose a font."
2349If the value is a modifier, such as `control' or `shift' or `meta', 2349If the value is a modifier, such as `control' or `shift' or `meta',
2350then if that modifier key is pressed when dropping the region, region 2350then if that modifier key is pressed when dropping the region, region
2351text is copied instead of being cut." 2351text is copied instead of being cut."
2352 :type 'symbol 2352 :type `(choice
2353 (const :tag "Disable dragging the region" nil)
2354 ,@(mapcar
2355 (lambda (modifier)
2356 `(const :tag ,(format "Enable, but copy with the %s modifier"
2357 modifier)
2358 modifier))
2359 '(alt super hyper shift control meta))
2360 (other :tag "Enable dragging the region" t))
2353 :version "26.1" 2361 :version "26.1"
2354 :group 'mouse) 2362 :group 'mouse)
2355 2363
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index e75efcf483f..bf21db2e8d8 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -802,38 +802,43 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
802 (setq filename (expand-file-name filename) 802 (setq filename (expand-file-name filename)
803 newname (expand-file-name newname)) 803 newname (expand-file-name newname))
804 804
805 (let ((t1 (tramp-tramp-file-p filename)) 805 (if (file-directory-p filename)
806 (t2 (tramp-tramp-file-p newname))) 806 (progn
807 (with-parsed-tramp-file-name (if t1 filename newname) nil 807 (copy-directory filename newname t t)
808 (with-tramp-progress-reporter 808 (delete-directory filename 'recursive))
809 v 0 (format "Renaming %s to %s" filename newname) 809
810 810 (let ((t1 (tramp-tramp-file-p filename))
811 (if (and t1 t2 811 (t2 (tramp-tramp-file-p newname)))
812 (tramp-equal-remote filename newname) 812 (with-parsed-tramp-file-name (if t1 filename newname) nil
813 (not (file-directory-p filename))) 813 (with-tramp-progress-reporter
814 (let ((l1 (file-remote-p filename 'localname)) 814 v 0 (format "Renaming %s to %s" filename newname)
815 (l2 (file-remote-p newname 'localname))) 815
816 (when (and (not ok-if-already-exists) 816 (if (and t1 t2
817 (file-exists-p newname)) 817 (tramp-equal-remote filename newname)
818 (tramp-error v 'file-already-exists newname)) 818 (not (file-directory-p filename)))
819 ;; We must also flush the cache of the directory, because 819 (let ((l1 (file-remote-p filename 'localname))
820 ;; `file-attributes' reads the values from there. 820 (l2 (file-remote-p newname 'localname)))
821 (tramp-flush-file-property v (file-name-directory l1)) 821 (when (and (not ok-if-already-exists)
822 (tramp-flush-file-property v l1) 822 (file-exists-p newname))
823 (tramp-flush-file-property v (file-name-directory l2)) 823 (tramp-error v 'file-already-exists newname))
824 (tramp-flush-file-property v l2) 824 ;; We must also flush the cache of the directory, because
825 ;; Short track. 825 ;; `file-attributes' reads the values from there.
826 (tramp-adb-barf-unless-okay 826 (tramp-flush-file-property v (file-name-directory l1))
827 v (format 827 (tramp-flush-file-property v l1)
828 "mv -f %s %s" 828 (tramp-flush-file-property v (file-name-directory l2))
829 (tramp-shell-quote-argument l1) 829 (tramp-flush-file-property v l2)
830 (tramp-shell-quote-argument l2)) 830 ;; Short track.
831 "Error renaming %s to %s" filename newname)) 831 (tramp-adb-barf-unless-okay
832 832 v (format
833 ;; Rename by copy. 833 "mv -f %s %s"
834 (copy-file 834 (tramp-shell-quote-argument l1)
835 filename newname ok-if-already-exists 'keep-time 'preserve-uid-gid) 835 (tramp-shell-quote-argument l2))
836 (delete-file filename)))))) 836 "Error renaming %s to %s" filename newname))
837
838 ;; Rename by copy.
839 (copy-file
840 filename newname ok-if-already-exists 'keep-time 'preserve-uid-gid)
841 (delete-file filename)))))))
837 842
838(defun tramp-adb-handle-process-file 843(defun tramp-adb-handle-process-file
839 (program &optional infile destination display &rest args) 844 (program &optional infile destination display &rest args)
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 2b29a1b55f5..51d24cbc1b0 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -675,6 +675,11 @@ file names."
675 (unless (memq op '(copy rename)) 675 (unless (memq op '(copy rename))
676 (error "Unknown operation `%s', must be `copy' or `rename'" op)) 676 (error "Unknown operation `%s', must be `copy' or `rename'" op))
677 677
678 (if (file-directory-p filename)
679 (progn
680 (copy-directory filename newname keep-date t)
681 (when (eq op 'rename) (delete-directory filename 'recursive)))
682
678 (let ((t1 (tramp-tramp-file-p filename)) 683 (let ((t1 (tramp-tramp-file-p filename))
679 (t2 (tramp-tramp-file-p newname)) 684 (t2 (tramp-tramp-file-p newname))
680 (equal-remote (tramp-equal-remote filename newname)) 685 (equal-remote (tramp-equal-remote filename newname))
@@ -738,7 +743,7 @@ file names."
738 (when t2 743 (when t2
739 (with-parsed-tramp-file-name newname nil 744 (with-parsed-tramp-file-name newname nil
740 (tramp-flush-file-property v (file-name-directory localname)) 745 (tramp-flush-file-property v (file-name-directory localname))
741 (tramp-flush-file-property v localname))))))) 746 (tramp-flush-file-property v localname))))))))
742 747
743(defun tramp-gvfs-handle-copy-file 748(defun tramp-gvfs-handle-copy-file
744 (filename newname &optional ok-if-already-exists keep-date 749 (filename newname &optional ok-if-already-exists keep-date
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index bdb7a132408..52a6b8fac0b 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2039,96 +2039,102 @@ of `copy' and `rename'. FILENAME and NEWNAME must be absolute
2039file names." 2039file names."
2040 (unless (memq op '(copy rename)) 2040 (unless (memq op '(copy rename))
2041 (error "Unknown operation `%s', must be `copy' or `rename'" op)) 2041 (error "Unknown operation `%s', must be `copy' or `rename'" op))
2042 (let ((t1 (tramp-tramp-file-p filename))
2043 (t2 (tramp-tramp-file-p newname))
2044 (length (tramp-compat-file-attribute-size
2045 (file-attributes (file-truename filename))))
2046 (attributes (and preserve-extended-attributes
2047 (apply 'file-extended-attributes (list filename)))))
2048 2042
2049 (with-parsed-tramp-file-name (if t1 filename newname) nil 2043 (if (file-directory-p filename)
2050 (when (and (not ok-if-already-exists) (file-exists-p newname)) 2044 (progn
2051 (tramp-error v 'file-already-exists newname)) 2045 (copy-directory filename newname keep-date t)
2052 2046 (when (eq op 'rename) (delete-directory filename 'recursive)))
2053 (with-tramp-progress-reporter
2054 v 0 (format "%s %s to %s"
2055 (if (eq op 'copy) "Copying" "Renaming")
2056 filename newname)
2057 2047
2058 (cond 2048 (let ((t1 (tramp-tramp-file-p filename))
2059 ;; Both are Tramp files. 2049 (t2 (tramp-tramp-file-p newname))
2060 ((and t1 t2) 2050 (length (tramp-compat-file-attribute-size
2061 (with-parsed-tramp-file-name filename v1 2051 (file-attributes (file-truename filename))))
2062 (with-parsed-tramp-file-name newname v2 2052 (attributes (and preserve-extended-attributes
2063 (cond 2053 (apply 'file-extended-attributes (list filename)))))
2064 ;; Shortcut: if method, host, user are the same for
2065 ;; both files, we invoke `cp' or `mv' on the remote
2066 ;; host directly.
2067 ((tramp-equal-remote filename newname)
2068 (tramp-do-copy-or-rename-file-directly
2069 op filename newname
2070 ok-if-already-exists keep-date preserve-uid-gid))
2071
2072 ;; Try out-of-band operation.
2073 ((and
2074 (tramp-method-out-of-band-p v1 length)
2075 (tramp-method-out-of-band-p v2 length))
2076 (tramp-do-copy-or-rename-file-out-of-band
2077 op filename newname keep-date))
2078
2079 ;; No shortcut was possible. So we copy the file
2080 ;; first. If the operation was `rename', we go back
2081 ;; and delete the original file (if the copy was
2082 ;; successful). The approach is simple-minded: we
2083 ;; create a new buffer, insert the contents of the
2084 ;; source file into it, then write out the buffer to
2085 ;; the target file. The advantage is that it doesn't
2086 ;; matter which file name handlers are used for the
2087 ;; source and target file.
2088 (t
2089 (tramp-do-copy-or-rename-file-via-buffer
2090 op filename newname keep-date))))))
2091
2092 ;; One file is a Tramp file, the other one is local.
2093 ((or t1 t2)
2094 (cond
2095 ;; Fast track on local machine.
2096 ((tramp-local-host-p v)
2097 (tramp-do-copy-or-rename-file-directly
2098 op filename newname
2099 ok-if-already-exists keep-date preserve-uid-gid))
2100 2054
2101 ;; If the Tramp file has an out-of-band method, the 2055 (with-parsed-tramp-file-name (if t1 filename newname) nil
2102 ;; corresponding copy-program can be invoked. 2056 (when (and (not ok-if-already-exists) (file-exists-p newname))
2103 ((tramp-method-out-of-band-p v length) 2057 (tramp-error v 'file-already-exists newname))
2104 (tramp-do-copy-or-rename-file-out-of-band
2105 op filename newname keep-date))
2106 2058
2107 ;; Use the inline method via a Tramp buffer. 2059 (with-tramp-progress-reporter
2108 (t (tramp-do-copy-or-rename-file-via-buffer 2060 v 0 (format "%s %s to %s"
2109 op filename newname keep-date)))) 2061 (if (eq op 'copy) "Copying" "Renaming")
2062 filename newname)
2110 2063
2111 (t 2064 (cond
2112 ;; One of them must be a Tramp file. 2065 ;; Both are Tramp files.
2113 (error "Tramp implementation says this cannot happen"))) 2066 ((and t1 t2)
2067 (with-parsed-tramp-file-name filename v1
2068 (with-parsed-tramp-file-name newname v2
2069 (cond
2070 ;; Shortcut: if method, host, user are the same for
2071 ;; both files, we invoke `cp' or `mv' on the remote
2072 ;; host directly.
2073 ((tramp-equal-remote filename newname)
2074 (tramp-do-copy-or-rename-file-directly
2075 op filename newname
2076 ok-if-already-exists keep-date preserve-uid-gid))
2077
2078 ;; Try out-of-band operation.
2079 ((and
2080 (tramp-method-out-of-band-p v1 length)
2081 (tramp-method-out-of-band-p v2 length))
2082 (tramp-do-copy-or-rename-file-out-of-band
2083 op filename newname keep-date))
2084
2085 ;; No shortcut was possible. So we copy the file
2086 ;; first. If the operation was `rename', we go back
2087 ;; and delete the original file (if the copy was
2088 ;; successful). The approach is simple-minded: we
2089 ;; create a new buffer, insert the contents of the
2090 ;; source file into it, then write out the buffer to
2091 ;; the target file. The advantage is that it doesn't
2092 ;; matter which file name handlers are used for the
2093 ;; source and target file.
2094 (t
2095 (tramp-do-copy-or-rename-file-via-buffer
2096 op filename newname keep-date))))))
2097
2098 ;; One file is a Tramp file, the other one is local.
2099 ((or t1 t2)
2100 (cond
2101 ;; Fast track on local machine.
2102 ((tramp-local-host-p v)
2103 (tramp-do-copy-or-rename-file-directly
2104 op filename newname
2105 ok-if-already-exists keep-date preserve-uid-gid))
2106
2107 ;; If the Tramp file has an out-of-band method, the
2108 ;; corresponding copy-program can be invoked.
2109 ((tramp-method-out-of-band-p v length)
2110 (tramp-do-copy-or-rename-file-out-of-band
2111 op filename newname keep-date))
2112
2113 ;; Use the inline method via a Tramp buffer.
2114 (t (tramp-do-copy-or-rename-file-via-buffer
2115 op filename newname keep-date))))
2114 2116
2115 ;; Handle `preserve-extended-attributes'. We ignore possible 2117 (t
2116 ;; errors, because ACL strings could be incompatible. 2118 ;; One of them must be a Tramp file.
2117 (when attributes 2119 (error "Tramp implementation says this cannot happen")))
2118 (ignore-errors 2120
2119 (apply 'set-file-extended-attributes (list newname attributes)))) 2121 ;; Handle `preserve-extended-attributes'. We ignore possible
2120 2122 ;; errors, because ACL strings could be incompatible.
2121 ;; In case of `rename', we must flush the cache of the source file. 2123 (when attributes
2122 (when (and t1 (eq op 'rename)) 2124 (ignore-errors
2123 (with-parsed-tramp-file-name filename v1 2125 (apply 'set-file-extended-attributes (list newname attributes))))
2124 (tramp-flush-file-property v1 (file-name-directory v1-localname)) 2126
2125 (tramp-flush-file-property v1 v1-localname))) 2127 ;; In case of `rename', we must flush the cache of the source file.
2126 2128 (when (and t1 (eq op 'rename))
2127 ;; When newname did exist, we have wrong cached values. 2129 (with-parsed-tramp-file-name filename v1
2128 (when t2 2130 (tramp-flush-file-property v1 (file-name-directory v1-localname))
2129 (with-parsed-tramp-file-name newname v2 2131 (tramp-flush-file-property v1 v1-localname)))
2130 (tramp-flush-file-property v2 (file-name-directory v2-localname)) 2132
2131 (tramp-flush-file-property v2 v2-localname))))))) 2133 ;; When newname did exist, we have wrong cached values.
2134 (when t2
2135 (with-parsed-tramp-file-name newname v2
2136 (tramp-flush-file-property v2 (file-name-directory v2-localname))
2137 (tramp-flush-file-property v2 v2-localname))))))))
2132 2138
2133(defun tramp-do-copy-or-rename-file-via-buffer (op filename newname keep-date) 2139(defun tramp-do-copy-or-rename-file-via-buffer (op filename newname keep-date)
2134 "Use an Emacs buffer to copy or rename a file. 2140 "Use an Emacs buffer to copy or rename a file.
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 620c93828da..f35c10b58ab 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1073,10 +1073,11 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
1073 entries)) 1073 entries))
1074 1074
1075 ;; Insert size information. 1075 ;; Insert size information.
1076 (insert 1076 (when full-directory-p
1077 (if avail 1077 (insert
1078 (format "total used in directory %s available %s\n" used avail) 1078 (if avail
1079 (format "total %s\n" used))) 1079 (format "total used in directory %s available %s\n" used avail)
1080 (format "total %s\n" used))))
1080 1081
1081 ;; Print entries. 1082 ;; Print entries.
1082 (mapc 1083 (mapc
diff --git a/lisp/proced.el b/lisp/proced.el
index c9e851b7e05..aec54b59211 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -604,7 +604,8 @@ Important: the match ends just after the marker.")
604 "Return header line for Proced buffer." 604 "Return header line for Proced buffer."
605 (list (propertize " " 605 (list (propertize " "
606 'display 606 'display
607 (list 'space :align-to (+ 2 (line-number-display-width)))) 607 (list 'space :align-to
608 (line-number-display-width 'columns)))
608 (if (<= (window-hscroll) (length proced-header-line)) 609 (if (<= (window-hscroll) (length proced-header-line))
609 (replace-regexp-in-string ;; preserve text properties 610 (replace-regexp-in-string ;; preserve text properties
610 "\\(%\\)" "\\1\\1" 611 "\\(%\\)" "\\1\\1"
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 99a4841e318..41415943a58 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -1693,7 +1693,8 @@ current buffer state and calls REPORT-FN when done."
1693 (when (eq (process-status proc) 'exit) 1693 (when (eq (process-status proc) 'exit)
1694 (unwind-protect 1694 (unwind-protect
1695 (cond 1695 (cond
1696 ((not (eq proc elisp-flymake--byte-compile-process)) 1696 ((not (eq proc (with-current-buffer source-buffer
1697 elisp-flymake--byte-compile-process)))
1697 (flymake-log :warning "byte-compile process %s obsolete" proc)) 1698 (flymake-log :warning "byte-compile process %s obsolete" proc))
1698 ((zerop (process-exit-status proc)) 1699 ((zerop (process-exit-status proc))
1699 (elisp-flymake--byte-compile-done report-fn 1700 (elisp-flymake--byte-compile-done report-fn
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 6421ba60dce..72156288eba 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -909,6 +909,8 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
909[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)" 909[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)"
910 "Regexp matching the definition of a derived type.") 910 "Regexp matching the definition of a derived type.")
911 911
912;; Maybe this should include "class default", but the constant is no
913;; longer used.
912(defconst f90-typeis-re 914(defconst f90-typeis-re
913 "\\_<\\(class\\|type\\)[ \t]*is[ \t]*(" 915 "\\_<\\(class\\|type\\)[ \t]*is[ \t]*("
914 "Regexp matching a CLASS/TYPE IS statement.") 916 "Regexp matching a CLASS/TYPE IS statement.")
@@ -955,10 +957,14 @@ Used in the F90 entry in `hs-special-modes-alist'.")
955 ;; Avoid F2003 "type is" in "select type", 957 ;; Avoid F2003 "type is" in "select type",
956 ;; and also variables of derived type "type (foo)". 958 ;; and also variables of derived type "type (foo)".
957 ;; "type, foo" must be a block (?). 959 ;; "type, foo" must be a block (?).
960 ;; And a partial effort to avoid "class default".
958 "\\(?:type\\|class\\)[ \t,]\\(" 961 "\\(?:type\\|class\\)[ \t,]\\("
959 "[^i(!\n\"& \t]\\|" ; not-i( 962 "[^id(!\n\"& \t]\\|" ; not-id(
960 "i[^s!\n\"& \t]\\|" ; i not-s 963 "i[^s!\n\"& \t]\\|" ; i not-s
961 "is\\(?:\\sw\\|\\s_\\)\\)\\|" 964 "d[^e!\n\"& \t]\\|" ; d not-e
965 "de[^f!\n\"& \t]\\|" ; de not-f
966 "def[^a!\n\"& \t]\\|" ; def not-a
967 "\\(?:is\\|default\\)\\(?:\\sw\\|\\s_\\)\\)\\|"
962 ;; "abstract interface" is F2003; "submodule" is F2008. 968 ;; "abstract interface" is F2003; "submodule" is F2008.
963 "program\\|\\(?:abstract[ \t]*\\)?interface\\|\\(?:sub\\)?module\\|" 969 "program\\|\\(?:abstract[ \t]*\\)?interface\\|\\(?:sub\\)?module\\|"
964 ;; "enum", but not "enumerator". 970 ;; "enum", but not "enumerator".
@@ -1454,7 +1460,7 @@ if all else fails."
1454 (not (or (looking-at "end") 1460 (not (or (looking-at "end")
1455 (looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\ 1461 (looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\
1456\\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\|\ 1462\\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\|\
1457\\(?:class\\|type\\)[ \t]*is\\|\ 1463\\(?:class\\|type\\)[ \t]*is\\|class[ \t]*default\\|\
1458block\\|critical\\|enum\\|associate\\)\\_>") 1464block\\|critical\\|enum\\|associate\\)\\_>")
1459 (looking-at "\\(program\\|\\(?:sub\\)?module\\|\ 1465 (looking-at "\\(program\\|\\(?:sub\\)?module\\|\
1460\\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\_>") 1466\\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\_>")
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el
index ab60855b217..a9caef4fc8e 100644
--- a/lisp/progmodes/flymake-proc.el
+++ b/lisp/progmodes/flymake-proc.el
@@ -20,7 +20,7 @@
20;; GNU General Public License for more details. 20;; GNU General Public License for more details.
21 21
22;; You should have received a copy of the GNU General Public License 22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 23;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
24 24
25;;; Commentary: 25;;; Commentary:
26;; 26;;
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 8c9c4b211a2..3c588f02fa6 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -20,7 +20,7 @@
20;; GNU General Public License for more details. 20;; GNU General Public License for more details.
21 21
22;; You should have received a copy of the GNU General Public License 22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 23;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
24 24
25;;; Commentary: 25;;; Commentary:
26;; 26;;
@@ -48,7 +48,8 @@
48(require 'thingatpt) ; end-of-thing 48(require 'thingatpt) ; end-of-thing
49(require 'warnings) ; warning-numeric-level, display-warning 49(require 'warnings) ; warning-numeric-level, display-warning
50(require 'compile) ; for some faces 50(require 'compile) ; for some faces
51(require 'subr-x) ; when-let*, if-let*, hash-table-keys, hash-table-values 51;; when-let*, if-let*, hash-table-keys, hash-table-values:
52(eval-when-compile (require 'subr-x))
52 53
53(defgroup flymake nil 54(defgroup flymake nil
54 "Universal on-the-fly syntax checker." 55 "Universal on-the-fly syntax checker."
@@ -228,6 +229,29 @@ TYPE is a key to `flymake-diagnostic-types-alist' and TEXT is a
228description of the problem detected in this region." 229description of the problem detected in this region."
229 (flymake--diag-make :buffer buffer :beg beg :end end :type type :text text)) 230 (flymake--diag-make :buffer buffer :beg beg :end end :type type :text text))
230 231
232;;;###autoload
233(defun flymake-diagnostics (&optional beg end)
234 "Get Flymake diagnostics in region determined by BEG and END.
235
236If neither BEG or END is supplied, use the whole buffer,
237otherwise if BEG is non-nil and END is nil, consider only
238diagnostics at BEG."
239 (mapcar (lambda (ov) (overlay-get ov 'flymake-diagnostic))
240 (flymake--overlays :beg beg :end end)))
241
242(defmacro flymake--diag-accessor (public internal thing)
243 "Make PUBLIC an alias for INTERNAL, add doc using THING."
244 `(defsubst ,public (diag)
245 ,(format "Get Flymake diagnostic DIAG's %s." (symbol-name thing))
246 (,internal diag)))
247
248(flymake--diag-accessor flymake-diagnostic-buffer flymake--diag-buffer buffer)
249(flymake--diag-accessor flymake-diagnostic-text flymake--diag-text text)
250(flymake--diag-accessor flymake-diagnostic-type flymake--diag-type type)
251(flymake--diag-accessor flymake-diagnostic-beg flymake--diag-beg beg)
252(flymake--diag-accessor flymake-diagnostic-end flymake--diag-end end)
253(flymake--diag-accessor flymake-diagnostic-backend flymake--diag-backend backend)
254
231(cl-defun flymake--overlays (&key beg end filter compare key) 255(cl-defun flymake--overlays (&key beg end filter compare key)
232 "Get flymake-related overlays. 256 "Get flymake-related overlays.
233If BEG is non-nil and END is nil, consider only `overlays-at' 257If BEG is non-nil and END is nil, consider only `overlays-at'
@@ -238,7 +262,7 @@ verify FILTER, a function, and sort them by COMPARE (using KEY)."
238 (widen) 262 (widen)
239 (let ((ovs (cl-remove-if-not 263 (let ((ovs (cl-remove-if-not
240 (lambda (ov) 264 (lambda (ov)
241 (and (overlay-get ov 'flymake) 265 (and (overlay-get ov 'flymake-diagnostic)
242 (or (not filter) 266 (or (not filter)
243 (funcall filter ov)))) 267 (funcall filter ov))))
244 (if (and beg (null end)) 268 (if (and beg (null end))
@@ -498,18 +522,15 @@ associated `flymake-category' return DEFAULT."
498 (default-maybe 'help-echo 522 (default-maybe 'help-echo
499 (lambda (_window _ov pos) 523 (lambda (_window _ov pos)
500 (mapconcat 524 (mapconcat
501 (lambda (ov) 525 #'flymake--diag-text
502 (overlay-get ov 'flymake-text)) 526 (flymake-diagnostics pos)
503 (flymake--overlays :beg pos)
504 "\n"))) 527 "\n")))
505 (default-maybe 'severity (warning-numeric-level :error)) 528 (default-maybe 'severity (warning-numeric-level :error))
506 (default-maybe 'priority (+ 100 (overlay-get ov 'severity)))) 529 (default-maybe 'priority (+ 100 (overlay-get ov 'severity))))
507 ;; Some properties can't be overridden. 530 ;; Some properties can't be overridden.
508 ;; 531 ;;
509 (overlay-put ov 'evaporate t) 532 (overlay-put ov 'evaporate t)
510 (overlay-put ov 'flymake t) 533 (overlay-put ov 'flymake-diagnostic diagnostic)))
511 (overlay-put ov 'flymake-text (flymake--diag-text diagnostic))
512 (overlay-put ov 'flymake--diagnostic diagnostic)))
513 534
514;; Nothing in Flymake uses this at all any more, so this is just for 535;; Nothing in Flymake uses this at all any more, so this is just for
515;; third-party compatibility. 536;; third-party compatibility.
@@ -600,7 +621,7 @@ not expected."
600 (lambda (ov) 621 (lambda (ov)
601 (eq backend 622 (eq backend
602 (flymake--diag-backend 623 (flymake--diag-backend
603 (overlay-get ov 'flymake--diagnostic)))))) 624 (overlay-get ov 'flymake-diagnostic))))))
604 (mapc (lambda (diag) 625 (mapc (lambda (diag)
605 (flymake--highlight-line diag) 626 (flymake--highlight-line diag)
606 (setf (flymake--diag-backend diag) backend)) 627 (setf (flymake--diag-backend diag) backend))
@@ -899,7 +920,7 @@ applied."
899 (lambda (ov) 920 (lambda (ov)
900 (let ((diag (overlay-get 921 (let ((diag (overlay-get
901 ov 922 ov
902 'flymake--diagnostic))) 923 'flymake-diagnostic)))
903 (and diag 924 (and diag
904 (or (not filter) 925 (or (not filter)
905 (memq (flymake--diag-type diag) 926 (memq (flymake--diag-type diag)
@@ -1089,13 +1110,13 @@ applied."
1089 (interactive (list (point) t)) 1110 (interactive (list (point) t))
1090 (let* ((id (or (tabulated-list-get-id pos) 1111 (let* ((id (or (tabulated-list-get-id pos)
1091 (user-error "Nothing at point"))) 1112 (user-error "Nothing at point")))
1092 (overlay (plist-get id :overlay))) 1113 (diag (plist-get id :diagnostic)))
1093 (with-current-buffer (overlay-buffer overlay) 1114 (with-current-buffer (flymake--diag-buffer diag)
1094 (with-selected-window 1115 (with-selected-window
1095 (display-buffer (current-buffer) other-window) 1116 (display-buffer (current-buffer) other-window)
1096 (goto-char (overlay-start overlay)) 1117 (goto-char (flymake--diag-beg diag))
1097 (pulse-momentary-highlight-region (overlay-start overlay) 1118 (pulse-momentary-highlight-region (flymake--diag-beg diag)
1098 (overlay-end overlay) 1119 (flymake--diag-end diag)
1099 'highlight)) 1120 'highlight))
1100 (current-buffer)))) 1121 (current-buffer))))
1101 1122
@@ -1108,18 +1129,16 @@ POS can be a buffer position or a button"
1108 1129
1109(defun flymake--diagnostics-buffer-entries () 1130(defun flymake--diagnostics-buffer-entries ()
1110 (with-current-buffer flymake--diagnostics-buffer-source 1131 (with-current-buffer flymake--diagnostics-buffer-source
1111 (cl-loop for ov in (flymake--overlays) 1132 (cl-loop for diag in (flymake-diagnostics)
1112 for diag = (overlay-get ov
1113 'flymake--diagnostic)
1114 for (line . col) = 1133 for (line . col) =
1115 (save-excursion 1134 (save-excursion
1116 (goto-char (overlay-start ov)) 1135 (goto-char (flymake--diag-beg diag))
1117 (cons (line-number-at-pos) 1136 (cons (line-number-at-pos)
1118 (- (point) 1137 (- (point)
1119 (line-beginning-position)))) 1138 (line-beginning-position))))
1120 for type = (flymake--diag-type diag) 1139 for type = (flymake--diag-type diag)
1121 collect 1140 collect
1122 (list (list :overlay ov 1141 (list (list :diagnostic diag
1123 :line line 1142 :line line
1124 :severity (flymake--lookup-type-property 1143 :severity (flymake--lookup-type-property
1125 type 1144 type
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f79d9a47d31..895117b9ee3 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3304,8 +3304,9 @@ the full statement in the case of imports."
3304(defcustom python-shell-completion-native-disabled-interpreters 3304(defcustom python-shell-completion-native-disabled-interpreters
3305 ;; PyPy's readline cannot handle some escape sequences yet. Native 3305 ;; PyPy's readline cannot handle some escape sequences yet. Native
3306 ;; completion was found to be non-functional for IPython (see 3306 ;; completion was found to be non-functional for IPython (see
3307 ;; Bug#25067). 3307 ;; Bug#25067). Native completion doesn't work on w32 (Bug#28580).
3308 (list "pypy" "ipython") 3308 (if (eq system-type 'windows-nt) '("")
3309 '("pypy" "ipython"))
3309 "List of disabled interpreters. 3310 "List of disabled interpreters.
3310When a match is found, native completion is disabled." 3311When a match is found, native completion is disabled."
3311 :version "25.1" 3312 :version "25.1"
diff --git a/lisp/rect.el b/lisp/rect.el
index 12e62b6a990..a62ed95b715 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -450,6 +450,10 @@ With a prefix (or a FILL) argument, also fill too short lines."
450 "Replace rectangle contents with STRING on each line. 450 "Replace rectangle contents with STRING on each line.
451The length of STRING need not be the same as the rectangle width. 451The length of STRING need not be the same as the rectangle width.
452 452
453When called interactively and option `rectangle-preview' is
454non-nil, display the result as the user enters the string into
455the minibuffer.
456
453Called from a program, takes three args; START, END and STRING." 457Called from a program, takes three args; START, END and STRING."
454 (interactive 458 (interactive
455 (progn 459 (progn
diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el
index 7a23f4d03c0..3d27858d0fe 100644
--- a/lisp/ruler-mode.el
+++ b/lisp/ruler-mode.el
@@ -307,7 +307,12 @@ or remove a tab stop. \\[ruler-mode-toggle-show-tab-stops] or
307N is a column number relative to selected frame. 307N is a column number relative to selected frame.
308If required, account for screen estate taken by `display-line-numbers'." 308If required, account for screen estate taken by `display-line-numbers'."
309 (if display-line-numbers 309 (if display-line-numbers
310 (setq n (- n (line-number-display-width) 2))) 310 ;; FIXME: ruler-mode relies on N being an integer, so if the
311 ;; 'line-number' face is customized to use a font that is larger
312 ;; or smaller than that of the default face, the alignment might
313 ;; be off by up to half a column, unless the font width is an
314 ;; integral multiple or divisor of the default face's font.
315 (setq n (- n (round (line-number-display-width 'columns)))))
311 (- n 316 (- n
312 (or (car (window-margins)) 0) 317 (or (car (window-margins)) 0)
313 (fringe-columns 'left) 318 (fringe-columns 'left)
@@ -668,7 +673,12 @@ Optional argument PROPS specifies other text properties to apply."
668 (let* ((w (ruler-mode-text-scaled-window-width)) 673 (let* ((w (ruler-mode-text-scaled-window-width))
669 (m (window-margins)) 674 (m (window-margins))
670 (f (window-fringes)) 675 (f (window-fringes))
671 (i (if display-line-numbers (+ (line-number-display-width) 2) 0)) 676 (i (if display-line-numbers
677 ;; FIXME: ruler-mode relies on I being an integer, so
678 ;; the column numbers might be slightly off if the
679 ;; line-number face is customized.
680 (round (line-number-display-width 'columns))
681 0))
672 (j (ruler-mode-text-scaled-window-hscroll)) 682 (j (ruler-mode-text-scaled-window-hscroll))
673 ;; Setup the scrollbar, fringes, and margins areas. 683 ;; Setup the scrollbar, fringes, and margins areas.
674 (lf (ruler-mode-space 684 (lf (ruler-mode-space
@@ -708,7 +718,7 @@ Optional argument PROPS specifies other text properties to apply."
708 ;; line-number display be blank, not filled with 718 ;; line-number display be blank, not filled with
709 ;; ruler-mode-basic-graduation-char. 719 ;; ruler-mode-basic-graduation-char.
710 (if display-line-numbers 720 (if display-line-numbers
711 (let* ((lndw (+ (line-number-display-width) 2)) 721 (let* ((lndw (round (line-number-display-width 'columns)))
712 (s (make-string lndw ?\s))) 722 (s (make-string lndw ?\s)))
713 (concat s (make-string (- w lndw) 723 (concat s (make-string (- w lndw)
714 ruler-mode-basic-graduation-char))) 724 ruler-mode-basic-graduation-char)))
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 0a4cb998b57..e74efdc7a13 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1149,7 +1149,7 @@ This function is intended to be good enough to help SMIE during
1149tokenization, but should not be regarded as a reliable function 1149tokenization, but should not be regarded as a reliable function
1150for determining whether point is within a selector." 1150for determining whether point is within a selector."
1151 (save-excursion 1151 (save-excursion
1152 (re-search-forward "[{};)]" nil t) 1152 (re-search-forward "[{};]" nil t)
1153 (eq (char-before) ?\{))) 1153 (eq (char-before) ?\{)))
1154 1154
1155(defun css--colon-inside-funcall () 1155(defun css--colon-inside-funcall ()
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index f1a30048849..393b679e4a1 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -109,22 +109,6 @@
109(def-edebug-spec push 109(def-edebug-spec push
110 (&or [form symbolp] [form gv-place])) 110 (&or [form symbolp] [form gv-place]))
111 111
112;; Correct wrong declaration. This still doesn't support dotted destructuring
113;; though.
114(def-edebug-spec cl-lambda-list
115 (([&rest cl-macro-arg]
116 [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
117 [&optional ["&rest" arg]]
118 [&optional ["&key" [cl-&key-arg &rest cl-&key-arg]
119 &optional "&allow-other-keys"]]
120 [&optional ["&aux" &rest
121 &or (symbolp &optional def-form) symbolp]]
122 )))
123
124;; Add missing declaration.
125(def-edebug-spec cl-type-spec sexp) ;; This is not exactly correct but good
126 ;; enough.
127
128;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
129;; Support for `testcover' 113;; Support for `testcover'
130 114
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index db1addbecd2..84ab10b14fe 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -177,6 +177,8 @@ For a description of possible values, see `vc-check-master-templates'."
177 (push (list frel state) result)))) 177 (push (list frel state) result))))
178 (funcall update-function result))) 178 (funcall update-function result)))
179 179
180(defun vc-rcs-dir-extra-headers (&rest _ignore))
181
180(defun vc-rcs-working-revision (file) 182(defun vc-rcs-working-revision (file)
181 "RCS-specific version of `vc-working-revision'." 183 "RCS-specific version of `vc-working-revision'."
182 (or (and vc-consult-headers 184 (or (and vc-consult-headers
diff --git a/lisp/winner.el b/lisp/winner.el
index 61ea4d40e7b..6bc27484a79 100644
--- a/lisp/winner.el
+++ b/lisp/winner.el
@@ -304,12 +304,15 @@ You may want to include buffer names such as *Help*, *Apropos*,
304 (push win xwins))) ; delete this window 304 (push win xwins))) ; delete this window
305 305
306 ;; Restore marks 306 ;; Restore marks
307 (save-current-buffer 307 ;; `winner-undo' shouldn't update the selection (Bug#28631) when
308 (cl-loop for buf in buffers 308 ;; select-enable-primary is non-nil.
309 for entry = (cadr (assq buf winner-point-alist)) 309 (unless select-enable-primary
310 do (progn (set-buffer buf) 310 (save-current-buffer
311 (set-mark (car entry)) 311 (cl-loop for buf in buffers
312 (setf (winner-active-region) (cdr entry))))) 312 for entry = (cadr (assq buf winner-point-alist))
313 do (progn (set-buffer buf)
314 (set-mark (car entry))
315 (setf (winner-active-region) (cdr entry))))))
313 ;; Delete windows, whose buffers are dead or boring. 316 ;; Delete windows, whose buffers are dead or boring.
314 ;; Return t if this is still a possible configuration. 317 ;; Return t if this is still a possible configuration.
315 (or (null xwins) 318 (or (null xwins)