summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-10-20 22:44:13 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-10-20 22:44:13 -0700
commit3155cb1585da7235145d76791feaf6170d8be0f1 (patch)
tree19b655867f27bb630b182f4bdb00a2e2d5ee6427 /lisp
parentcb29f41624e5163a0aea4bfc98591e683807a2f8 (diff)
parent11bd8aa24b347f75e674528dd1a94b0a4037105e (diff)
downloademacs-3155cb1585da7235145d76791feaf6170d8be0f1.tar.gz
emacs-3155cb1585da7235145d76791feaf6170d8be0f1.tar.bz2
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."
(push-mark)
(semantic-go-to-tag target)
- (switch-to-buffer (current-buffer))
+ (pop-to-buffer-same-window (current-buffer))
(semantic-momentary-highlight-tag target))
)
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."
(when (semantic-tag-p tag)
(push-mark)
(semantic-go-to-tag tag)
- (switch-to-buffer (current-buffer))
+ (pop-to-buffer-same-window (current-buffer))
(semantic-momentary-highlight-tag tag)
(message "%S: %s "
(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.
(error "Could not location include %s"
(semantic-tag-name tag)))
((get-file-buffer file)
- (switch-to-buffer (get-file-buffer file)))
+ (pop-to-buffer-same-window (get-file-buffer file)))
((stringp file)
(find-file file))
))))
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."
(forward-char o))
(error nil))
;; make it visible
- (switch-to-buffer (current-buffer))
+ (pop-to-buffer-same-window (current-buffer))
(semantic-momentary-highlight-tag tag)
))
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."
;; A tag
((semantic-tag-p result)
(semantic-go-to-tag result)
- (switch-to-buffer (current-buffer))
+ (pop-to-buffer-same-window (current-buffer))
(semantic-momentary-highlight-tag result))
;; Buffers
((bufferp result)
- (switch-to-buffer result)
+ (pop-to-buffer-same-window result)
(pulse-momentary-highlight-one-line (point)))
;; Files
((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.
;;;###autoload
(defun dired-create-directory (directory)
"Create a directory called DIRECTORY.
+Parent directories of DIRECTORY are created as needed.
If DIRECTORY already exists, signal an error."
(interactive
(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\"."
(&or lambda-doc cl-declarations))
(def-edebug-spec cl-lambda-list
- (([&rest arg]
+ (([&rest cl-lambda-arg]
[&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
- [&optional ["&rest" arg]]
+ [&optional ["&rest" cl-lambda-arg]]
[&optional ["&key" [cl-&key-arg &rest cl-&key-arg]
&optional "&allow-other-keys"]]
[&optional ["&aux" &rest
&or (symbolp &optional def-form) symbolp]]
- )))
+ . [&or arg nil])))
(def-edebug-spec cl-&optional-arg
- (&or (arg &optional def-form arg) arg))
+ (&or (cl-lambda-arg &optional def-form arg) arg))
(def-edebug-spec cl-&key-arg
- (&or ([&or (symbolp arg) arg] &optional def-form arg) arg))
+ (&or ([&or (symbolp cl-lambda-arg) arg] &optional def-form arg) arg))
+
+(def-edebug-spec cl-lambda-arg
+ (&or arg cl-lambda-list1))
+
+(def-edebug-spec cl-lambda-list1
+ (([&optional ["&whole" arg]] ;; only allowed at lower levels
+ [&rest cl-lambda-arg]
+ [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
+ [&optional ["&rest" cl-lambda-arg]]
+ [&optional ["&key" cl-&key-arg &rest cl-&key-arg
+ &optional "&allow-other-keys"]]
+ [&optional ["&aux" &rest
+ &or (symbolp &optional def-form) symbolp]]
+ . [&or arg nil])))
(def-edebug-spec cl-type-spec sexp)
@@ -336,8 +350,8 @@ The full form of a Common Lisp function argument list is
[&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]]
[&aux (VAR [INITFORM])...])
-VAR maybe be replaced recursively with an argument list for
-destructing, `&whole' is supported within these sublists. If
+VAR may be replaced recursively with an argument list for
+destructuring, `&whole' is supported within these sublists. If
SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be
written simply `VAR'. See the Info node `(cl)Argument Lists' for
more details.
@@ -430,8 +444,8 @@ The full form of a Common Lisp macro argument list is
[&aux (VAR [INITFORM])...]
[&environment VAR])
-VAR maybe be replaced recursively with an argument list for
-destructing, `&whole' is supported within these sublists. If
+VAR may be replaced recursively with an argument list for
+destructuring, `&whole' is supported within these sublists. If
SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be
written simply `VAR'. See the Info node `(cl)Argument Lists' for
more 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."
;; Unshow debugger-buffer.
(quit-restore-window debugger-window debugger-bury-or-kill)
;; Restore current buffer (Bug#12502).
- (set-buffer debugger-old-buffer))))
+ (set-buffer debugger-old-buffer)))
+ ;; Forget debugger window, it won't be back (Bug#17882).
+ (setq debugger-previous-window nil))
;; Restore previous state of debugger-buffer in case we were
;; in a recursive invocation of the debugger, otherwise just
;; 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)."
(defun ert-find-test-other-window (test-name)
"Find, in another window, the definition of TEST-NAME."
(interactive (list (ert-read-test-name-at-point "Find test definition: ")))
- (find-function-do-it test-name 'ert-deftest 'switch-to-buffer-other-window))
+ (find-function-do-it test-name 'ert--test 'switch-to-buffer-other-window))
(defun ert-delete-test (test-name)
"Make the test TEST-NAME unbound.
@@ -2594,7 +2594,7 @@ To be used in the ERT results buffer."
;;; Actions on load/unload.
-(add-to-list 'find-function-regexp-alist '(ert-deftest . ert--find-test-regexp))
+(add-to-list 'find-function-regexp-alist '(ert--test . ert--find-test-regexp))
(add-to-list 'minor-mode-alist '(ert--current-run-stats
(:eval
(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 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
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'.")
;; is displayed.
(if (not display-line-numbers)
0
- (let ((cbuf-window (get-buffer-window (current-buffer))))
+ (let ((cbuf-window (get-buffer-window (current-buffer) t)))
(if (window-live-p cbuf-window)
(with-selected-window cbuf-window
- (+ (line-number-display-width) 2))
+ (line-number-display-width 'columns))
4))))
(defun tabulated-list-init-header ()
@@ -329,8 +329,6 @@ Check the current row, the previous one and the next row."
(string-width (if (stringp nt) nt (car nt)))))
tabulated-list--near-rows)))
-(defvar tabulated-list-entry-lnum-width nil)
-
(defun tabulated-list-print (&optional remember-pos update)
"Populate the current Tabulated List mode buffer.
This sorts the `tabulated-list-entries' list if sorting is
@@ -373,7 +371,6 @@ changing `tabulated-list-sort-key'."
(unless tabulated-list-use-header-line
(tabulated-list-print-fake-header)))
;; Finally, print the resulting list.
- (setq tabulated-list-entry-lnum-width (tabulated-list-line-number-width))
(while entries
(let* ((elt (car entries))
(tabulated-list--near-rows
@@ -428,9 +425,8 @@ of column descriptors."
(x (max tabulated-list-padding 0))
(ncols (length tabulated-list-format))
(inhibit-read-only t))
- (setq x (+ x tabulated-list-entry-lnum-width))
(if (> tabulated-list-padding 0)
- (insert (make-string (- x tabulated-list-entry-lnum-width) ?\s)))
+ (insert (make-string x ?\s)))
(let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506).
(or (bound-and-true-p tabulated-list--near-rows)
(list (or (tabulated-list-get-entry (point-at-bol 0))
@@ -601,6 +597,14 @@ With a numeric prefix argument N, sort the Nth column."
(tabulated-list-init-header)
(tabulated-list-print t)))
+(defvar tabulated-list--current-lnum-width nil)
+(defun tabulated-list-watch-line-number-width (_window)
+ (if display-line-numbers
+ (let ((lnum-width (tabulated-list-line-number-width)))
+ (when (not (= tabulated-list--current-lnum-width lnum-width))
+ (setq-local tabulated-list--current-lnum-width lnum-width)
+ (tabulated-list-revert)))))
+
;;; The mode definition:
(define-derived-mode tabulated-list-mode special-mode "Tabulated"
@@ -645,7 +649,12 @@ as the ewoc pretty-printer."
;; column of the first entry happens to begin with a R2L letter.
(setq bidi-paragraph-direction 'left-to-right)
;; This is for if/when they turn on display-line-numbers
- (add-hook 'display-line-numbers-mode-hook #'tabulated-list-revert nil t))
+ (add-hook 'display-line-numbers-mode-hook #'tabulated-list-revert nil t)
+ ;; This is for if/when they customize the line-number face or when
+ ;; the line-number width needs to change due to scrolling.
+ (setq-local tabulated-list--current-lnum-width 0)
+ (add-hook 'pre-redisplay-functions
+ #'tabulated-list-watch-line-number-width nil t))
(put 'tabulated-list-mode 'mode-class 'special)
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,
(defvar frame-name-history nil)
(defun select-frame-by-name (name)
- "Select the frame on the current terminal whose name is NAME and raise it.
+ "Select the frame whose name is NAME and raise it.
+Frames on the current terminal are checked first.
If there is no frame by that name, signal an error."
(interactive
(let* ((frame-names-alist (make-frame-names-alist))
@@ -903,11 +904,14 @@ If there is no frame by that name, signal an error."
(if (= (length input) 0)
(list default)
(list input))))
- (let* ((frame-names-alist (make-frame-names-alist))
- (frame (cdr (assoc name frame-names-alist))))
- (if frame
- (select-frame-set-input-focus frame)
- (error "There is no frame named `%s'" name))))
+ (select-frame-set-input-focus
+ ;; Prefer frames on the current display.
+ (or (cdr (assoc name (make-frame-names-alist)))
+ (catch 'done
+ (dolist (frame (frame-list))
+ (when (equal (frame-parameter frame 'name) name)
+ (throw 'done frame))))
+ (error "There is no frame named `%s'" name))))
;;;; 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."
(frameset--initial-params filtered-cfg))))
(puthash frame :created frameset--action-map))
+ ;; Remove `border-width' from the list of parameters. If it has not
+ ;; been assigned via `make-frame-on-display', any attempt to assign
+ ;; it now via `modify-frame-parameters' may result in an error on X
+ ;; (Bug#28873).
+ (setq filtered-cfg (assq-delete-all 'border-width filtered-cfg))
+
;; Try to assign parent-frame right here - it will improve things
;; for minibuffer-less child frames.
(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 @@
;;; Code:
(eval-when-compile
- (require 'cl))
+ (require 'cl)
+ (require 'subr-x))
(require 'nnheader)
(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.")
'image-dired-cmd-create-thumbnail-program)
(let* ((width (int-to-string (image-dired-thumb-size 'width)))
(height (int-to-string (image-dired-thumb-size 'height)))
- (modif-time (floor (float-time (nth 5 (file-attributes original-file)))))
+ (modif-time
+ (format "%.0f"
+ (ffloor (float-time
+ (nth 5 (file-attributes original-file))))))
(thumbnail-nq8-file (replace-regexp-in-string ".png\\'" "-nq8.png"
thumbnail-file))
(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 @@
(defconst image-type-header-regexps
`(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm)
("\\`P[1-6]\\(?:\
-\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[[:space:]]\\)+\
-\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[0-9]\\)+\
+\\(?:\\(?:#[^\r\n]*[\r\n]\\)*[[:space:]]\\)+\
+\\(?:\\(?:#[^\r\n]*[\r\n]\\)*[0-9]\\)+\
\\)\\{2\\}" . pbm)
("\\`GIF8[79]a" . gif)
("\\`\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."
;;; Single-step editing of keyboard macros
-(defvar kmacro-step-edit-active) ;; step-editing active
+(defvar kmacro-step-edit-active nil) ;; step-editing active
(defvar kmacro-step-edit-new-macro) ;; storage for new macro
(defvar kmacro-step-edit-inserting) ;; inserting into macro
(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."
:type '(choice
(const :tag "default" nil)
(const :tag "as space" as-space)
- (const :tag "absorb" absorb)))
+ (const :tag "absorb" absorb))
+ :set (lambda (sym val)
+ (set-default sym val)
+ (clear-composition-cache)))
;; Record error in arabic-change-gstring.
(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."
If the value is a modifier, such as `control' or `shift' or `meta',
then if that modifier key is pressed when dropping the region, region
text is copied instead of being cut."
- :type 'symbol
+ :type `(choice
+ (const :tag "Disable dragging the region" nil)
+ ,@(mapcar
+ (lambda (modifier)
+ `(const :tag ,(format "Enable, but copy with the %s modifier"
+ modifier)
+ modifier))
+ '(alt super hyper shift control meta))
+ (other :tag "Enable dragging the region" t))
:version "26.1"
:group 'mouse)
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."
(setq filename (expand-file-name filename)
newname (expand-file-name newname))
- (let ((t1 (tramp-tramp-file-p filename))
- (t2 (tramp-tramp-file-p newname)))
- (with-parsed-tramp-file-name (if t1 filename newname) nil
- (with-tramp-progress-reporter
- v 0 (format "Renaming %s to %s" filename newname)
-
- (if (and t1 t2
- (tramp-equal-remote filename newname)
- (not (file-directory-p filename)))
- (let ((l1 (file-remote-p filename 'localname))
- (l2 (file-remote-p newname 'localname)))
- (when (and (not ok-if-already-exists)
- (file-exists-p newname))
- (tramp-error v 'file-already-exists newname))
- ;; We must also flush the cache of the directory, because
- ;; `file-attributes' reads the values from there.
- (tramp-flush-file-property v (file-name-directory l1))
- (tramp-flush-file-property v l1)
- (tramp-flush-file-property v (file-name-directory l2))
- (tramp-flush-file-property v l2)
- ;; Short track.
- (tramp-adb-barf-unless-okay
- v (format
- "mv -f %s %s"
- (tramp-shell-quote-argument l1)
- (tramp-shell-quote-argument l2))
- "Error renaming %s to %s" filename newname))
-
- ;; Rename by copy.
- (copy-file
- filename newname ok-if-already-exists 'keep-time 'preserve-uid-gid)
- (delete-file filename))))))
+ (if (file-directory-p filename)
+ (progn
+ (copy-directory filename newname t t)
+ (delete-directory filename 'recursive))
+
+ (let ((t1 (tramp-tramp-file-p filename))
+ (t2 (tramp-tramp-file-p newname)))
+ (with-parsed-tramp-file-name (if t1 filename newname) nil
+ (with-tramp-progress-reporter
+ v 0 (format "Renaming %s to %s" filename newname)
+
+ (if (and t1 t2
+ (tramp-equal-remote filename newname)
+ (not (file-directory-p filename)))
+ (let ((l1 (file-remote-p filename 'localname))
+ (l2 (file-remote-p newname 'localname)))
+ (when (and (not ok-if-already-exists)
+ (file-exists-p newname))
+ (tramp-error v 'file-already-exists newname))
+ ;; We must also flush the cache of the directory, because
+ ;; `file-attributes' reads the values from there.
+ (tramp-flush-file-property v (file-name-directory l1))
+ (tramp-flush-file-property v l1)
+ (tramp-flush-file-property v (file-name-directory l2))
+ (tramp-flush-file-property v l2)
+ ;; Short track.
+ (tramp-adb-barf-unless-okay
+ v (format
+ "mv -f %s %s"
+ (tramp-shell-quote-argument l1)
+ (tramp-shell-quote-argument l2))
+ "Error renaming %s to %s" filename newname))
+
+ ;; Rename by copy.
+ (copy-file
+ filename newname ok-if-already-exists 'keep-time 'preserve-uid-gid)
+ (delete-file filename)))))))
(defun tramp-adb-handle-process-file
(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."
(unless (memq op '(copy rename))
(error "Unknown operation `%s', must be `copy' or `rename'" op))
+ (if (file-directory-p filename)
+ (progn
+ (copy-directory filename newname keep-date t)
+ (when (eq op 'rename) (delete-directory filename 'recursive)))
+
(let ((t1 (tramp-tramp-file-p filename))
(t2 (tramp-tramp-file-p newname))
(equal-remote (tramp-equal-remote filename newname))
@@ -738,7 +743,7 @@ file names."
(when t2
(with-parsed-tramp-file-name newname nil
(tramp-flush-file-property v (file-name-directory localname))
- (tramp-flush-file-property v localname)))))))
+ (tramp-flush-file-property v localname))))))))
(defun tramp-gvfs-handle-copy-file
(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
file names."
(unless (memq op '(copy rename))
(error "Unknown operation `%s', must be `copy' or `rename'" op))
- (let ((t1 (tramp-tramp-file-p filename))
- (t2 (tramp-tramp-file-p newname))
- (length (tramp-compat-file-attribute-size
- (file-attributes (file-truename filename))))
- (attributes (and preserve-extended-attributes
- (apply 'file-extended-attributes (list filename)))))
- (with-parsed-tramp-file-name (if t1 filename newname) nil
- (when (and (not ok-if-already-exists) (file-exists-p newname))
- (tramp-error v 'file-already-exists newname))
-
- (with-tramp-progress-reporter
- v 0 (format "%s %s to %s"
- (if (eq op 'copy) "Copying" "Renaming")
- filename newname)
+ (if (file-directory-p filename)
+ (progn
+ (copy-directory filename newname keep-date t)
+ (when (eq op 'rename) (delete-directory filename 'recursive)))
- (cond
- ;; Both are Tramp files.
- ((and t1 t2)
- (with-parsed-tramp-file-name filename v1
- (with-parsed-tramp-file-name newname v2
- (cond
- ;; Shortcut: if method, host, user are the same for
- ;; both files, we invoke `cp' or `mv' on the remote
- ;; host directly.
- ((tramp-equal-remote filename newname)
- (tramp-do-copy-or-rename-file-directly
- op filename newname
- ok-if-already-exists keep-date preserve-uid-gid))
-
- ;; Try out-of-band operation.
- ((and
- (tramp-method-out-of-band-p v1 length)
- (tramp-method-out-of-band-p v2 length))
- (tramp-do-copy-or-rename-file-out-of-band
- op filename newname keep-date))
-
- ;; No shortcut was possible. So we copy the file
- ;; first. If the operation was `rename', we go back
- ;; and delete the original file (if the copy was
- ;; successful). The approach is simple-minded: we
- ;; create a new buffer, insert the contents of the
- ;; source file into it, then write out the buffer to
- ;; the target file. The advantage is that it doesn't
- ;; matter which file name handlers are used for the
- ;; source and target file.
- (t
- (tramp-do-copy-or-rename-file-via-buffer
- op filename newname keep-date))))))
-
- ;; One file is a Tramp file, the other one is local.
- ((or t1 t2)
- (cond
- ;; Fast track on local machine.
- ((tramp-local-host-p v)
- (tramp-do-copy-or-rename-file-directly
- op filename newname
- ok-if-already-exists keep-date preserve-uid-gid))
+ (let ((t1 (tramp-tramp-file-p filename))
+ (t2 (tramp-tramp-file-p newname))
+ (length (tramp-compat-file-attribute-size
+ (file-attributes (file-truename filename))))
+ (attributes (and preserve-extended-attributes
+ (apply 'file-extended-attributes (list filename)))))
- ;; If the Tramp file has an out-of-band method, the
- ;; corresponding copy-program can be invoked.
- ((tramp-method-out-of-band-p v length)
- (tramp-do-copy-or-rename-file-out-of-band
- op filename newname keep-date))
+ (with-parsed-tramp-file-name (if t1 filename newname) nil
+ (when (and (not ok-if-already-exists) (file-exists-p newname))
+ (tramp-error v 'file-already-exists newname))
- ;; Use the inline method via a Tramp buffer.
- (t (tramp-do-copy-or-rename-file-via-buffer
- op filename newname keep-date))))
+ (with-tramp-progress-reporter
+ v 0 (format "%s %s to %s"
+ (if (eq op 'copy) "Copying" "Renaming")
+ filename newname)
- (t
- ;; One of them must be a Tramp file.
- (error "Tramp implementation says this cannot happen")))
+ (cond
+ ;; Both are Tramp files.
+ ((and t1 t2)
+ (with-parsed-tramp-file-name filename v1
+ (with-parsed-tramp-file-name newname v2
+ (cond
+ ;; Shortcut: if method, host, user are the same for
+ ;; both files, we invoke `cp' or `mv' on the remote
+ ;; host directly.
+ ((tramp-equal-remote filename newname)
+ (tramp-do-copy-or-rename-file-directly
+ op filename newname
+ ok-if-already-exists keep-date preserve-uid-gid))
+
+ ;; Try out-of-band operation.
+ ((and
+ (tramp-method-out-of-band-p v1 length)
+ (tramp-method-out-of-band-p v2 length))
+ (tramp-do-copy-or-rename-file-out-of-band
+ op filename newname keep-date))
+
+ ;; No shortcut was possible. So we copy the file
+ ;; first. If the operation was `rename', we go back
+ ;; and delete the original file (if the copy was
+ ;; successful). The approach is simple-minded: we
+ ;; create a new buffer, insert the contents of the
+ ;; source file into it, then write out the buffer to
+ ;; the target file. The advantage is that it doesn't
+ ;; matter which file name handlers are used for the
+ ;; source and target file.
+ (t
+ (tramp-do-copy-or-rename-file-via-buffer
+ op filename newname keep-date))))))
+
+ ;; One file is a Tramp file, the other one is local.
+ ((or t1 t2)
+ (cond
+ ;; Fast track on local machine.
+ ((tramp-local-host-p v)
+ (tramp-do-copy-or-rename-file-directly
+ op filename newname
+ ok-if-already-exists keep-date preserve-uid-gid))
+
+ ;; If the Tramp file has an out-of-band method, the
+ ;; corresponding copy-program can be invoked.
+ ((tramp-method-out-of-band-p v length)
+ (tramp-do-copy-or-rename-file-out-of-band
+ op filename newname keep-date))
+
+ ;; Use the inline method via a Tramp buffer.
+ (t (tramp-do-copy-or-rename-file-via-buffer
+ op filename newname keep-date))))
- ;; Handle `preserve-extended-attributes'. We ignore possible
- ;; errors, because ACL strings could be incompatible.
- (when attributes
- (ignore-errors
- (apply 'set-file-extended-attributes (list newname attributes))))
-
- ;; In case of `rename', we must flush the cache of the source file.
- (when (and t1 (eq op 'rename))
- (with-parsed-tramp-file-name filename v1
- (tramp-flush-file-property v1 (file-name-directory v1-localname))
- (tramp-flush-file-property v1 v1-localname)))
-
- ;; When newname did exist, we have wrong cached values.
- (when t2
- (with-parsed-tramp-file-name newname v2
- (tramp-flush-file-property v2 (file-name-directory v2-localname))
- (tramp-flush-file-property v2 v2-localname)))))))
+ (t
+ ;; One of them must be a Tramp file.
+ (error "Tramp implementation says this cannot happen")))
+
+ ;; Handle `preserve-extended-attributes'. We ignore possible
+ ;; errors, because ACL strings could be incompatible.
+ (when attributes
+ (ignore-errors
+ (apply 'set-file-extended-attributes (list newname attributes))))
+
+ ;; In case of `rename', we must flush the cache of the source file.
+ (when (and t1 (eq op 'rename))
+ (with-parsed-tramp-file-name filename v1
+ (tramp-flush-file-property v1 (file-name-directory v1-localname))
+ (tramp-flush-file-property v1 v1-localname)))
+
+ ;; When newname did exist, we have wrong cached values.
+ (when t2
+ (with-parsed-tramp-file-name newname v2
+ (tramp-flush-file-property v2 (file-name-directory v2-localname))
+ (tramp-flush-file-property v2 v2-localname))))))))
(defun tramp-do-copy-or-rename-file-via-buffer (op filename newname keep-date)
"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."
entries))
;; Insert size information.
- (insert
- (if avail
- (format "total used in directory %s available %s\n" used avail)
- (format "total %s\n" used)))
+ (when full-directory-p
+ (insert
+ (if avail
+ (format "total used in directory %s available %s\n" used avail)
+ (format "total %s\n" used))))
;; Print entries.
(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.")
"Return header line for Proced buffer."
(list (propertize " "
'display
- (list 'space :align-to (+ 2 (line-number-display-width))))
+ (list 'space :align-to
+ (line-number-display-width 'columns)))
(if (<= (window-hscroll) (length proced-header-line))
(replace-regexp-in-string ;; preserve text properties
"\\(%\\)" "\\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."
(when (eq (process-status proc) 'exit)
(unwind-protect
(cond
- ((not (eq proc elisp-flymake--byte-compile-process))
+ ((not (eq proc (with-current-buffer source-buffer
+ elisp-flymake--byte-compile-process)))
(flymake-log :warning "byte-compile process %s obsolete" proc))
((zerop (process-exit-status proc))
(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'.")
[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)"
"Regexp matching the definition of a derived type.")
+;; Maybe this should include "class default", but the constant is no
+;; longer used.
(defconst f90-typeis-re
"\\_<\\(class\\|type\\)[ \t]*is[ \t]*("
"Regexp matching a CLASS/TYPE IS statement.")
@@ -955,10 +957,14 @@ Used in the F90 entry in `hs-special-modes-alist'.")
;; Avoid F2003 "type is" in "select type",
;; and also variables of derived type "type (foo)".
;; "type, foo" must be a block (?).
+ ;; And a partial effort to avoid "class default".
"\\(?:type\\|class\\)[ \t,]\\("
- "[^i(!\n\"& \t]\\|" ; not-i(
+ "[^id(!\n\"& \t]\\|" ; not-id(
"i[^s!\n\"& \t]\\|" ; i not-s
- "is\\(?:\\sw\\|\\s_\\)\\)\\|"
+ "d[^e!\n\"& \t]\\|" ; d not-e
+ "de[^f!\n\"& \t]\\|" ; de not-f
+ "def[^a!\n\"& \t]\\|" ; def not-a
+ "\\(?:is\\|default\\)\\(?:\\sw\\|\\s_\\)\\)\\|"
;; "abstract interface" is F2003; "submodule" is F2008.
"program\\|\\(?:abstract[ \t]*\\)?interface\\|\\(?:sub\\)?module\\|"
;; "enum", but not "enumerator".
@@ -1454,7 +1460,7 @@ if all else fails."
(not (or (looking-at "end")
(looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\
\\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\|\
-\\(?:class\\|type\\)[ \t]*is\\|\
+\\(?:class\\|type\\)[ \t]*is\\|class[ \t]*default\\|\
block\\|critical\\|enum\\|associate\\)\\_>")
(looking-at "\\(program\\|\\(?:sub\\)?module\\|\
\\(?: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 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;
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 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;
@@ -48,7 +48,8 @@
(require 'thingatpt) ; end-of-thing
(require 'warnings) ; warning-numeric-level, display-warning
(require 'compile) ; for some faces
-(require 'subr-x) ; when-let*, if-let*, hash-table-keys, hash-table-values
+;; when-let*, if-let*, hash-table-keys, hash-table-values:
+(eval-when-compile (require 'subr-x))
(defgroup flymake nil
"Universal on-the-fly syntax checker."
@@ -228,6 +229,29 @@ TYPE is a key to `flymake-diagnostic-types-alist' and TEXT is a
description of the problem detected in this region."
(flymake--diag-make :buffer buffer :beg beg :end end :type type :text text))
+;;;###autoload
+(defun flymake-diagnostics (&optional beg end)
+ "Get Flymake diagnostics in region determined by BEG and END.
+
+If neither BEG or END is supplied, use the whole buffer,
+otherwise if BEG is non-nil and END is nil, consider only
+diagnostics at BEG."
+ (mapcar (lambda (ov) (overlay-get ov 'flymake-diagnostic))
+ (flymake--overlays :beg beg :end end)))
+
+(defmacro flymake--diag-accessor (public internal thing)
+ "Make PUBLIC an alias for INTERNAL, add doc using THING."
+ `(defsubst ,public (diag)
+ ,(format "Get Flymake diagnostic DIAG's %s." (symbol-name thing))
+ (,internal diag)))
+
+(flymake--diag-accessor flymake-diagnostic-buffer flymake--diag-buffer buffer)
+(flymake--diag-accessor flymake-diagnostic-text flymake--diag-text text)
+(flymake--diag-accessor flymake-diagnostic-type flymake--diag-type type)
+(flymake--diag-accessor flymake-diagnostic-beg flymake--diag-beg beg)
+(flymake--diag-accessor flymake-diagnostic-end flymake--diag-end end)
+(flymake--diag-accessor flymake-diagnostic-backend flymake--diag-backend backend)
+
(cl-defun flymake--overlays (&key beg end filter compare key)
"Get flymake-related overlays.
If 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)."
(widen)
(let ((ovs (cl-remove-if-not
(lambda (ov)
- (and (overlay-get ov 'flymake)
+ (and (overlay-get ov 'flymake-diagnostic)
(or (not filter)
(funcall filter ov))))
(if (and beg (null end))
@@ -498,18 +522,15 @@ associated `flymake-category' return DEFAULT."
(default-maybe 'help-echo
(lambda (_window _ov pos)
(mapconcat
- (lambda (ov)
- (overlay-get ov 'flymake-text))
- (flymake--overlays :beg pos)
+ #'flymake--diag-text
+ (flymake-diagnostics pos)
"\n")))
(default-maybe 'severity (warning-numeric-level :error))
(default-maybe 'priority (+ 100 (overlay-get ov 'severity))))
;; Some properties can't be overridden.
;;
(overlay-put ov 'evaporate t)
- (overlay-put ov 'flymake t)
- (overlay-put ov 'flymake-text (flymake--diag-text diagnostic))
- (overlay-put ov 'flymake--diagnostic diagnostic)))
+ (overlay-put ov 'flymake-diagnostic diagnostic)))
;; Nothing in Flymake uses this at all any more, so this is just for
;; third-party compatibility.
@@ -600,7 +621,7 @@ not expected."
(lambda (ov)
(eq backend
(flymake--diag-backend
- (overlay-get ov 'flymake--diagnostic))))))
+ (overlay-get ov 'flymake-diagnostic))))))
(mapc (lambda (diag)
(flymake--highlight-line diag)
(setf (flymake--diag-backend diag) backend))
@@ -899,7 +920,7 @@ applied."
(lambda (ov)
(let ((diag (overlay-get
ov
- 'flymake--diagnostic)))
+ 'flymake-diagnostic)))
(and diag
(or (not filter)
(memq (flymake--diag-type diag)
@@ -1089,13 +1110,13 @@ applied."
(interactive (list (point) t))
(let* ((id (or (tabulated-list-get-id pos)
(user-error "Nothing at point")))
- (overlay (plist-get id :overlay)))
- (with-current-buffer (overlay-buffer overlay)
+ (diag (plist-get id :diagnostic)))
+ (with-current-buffer (flymake--diag-buffer diag)
(with-selected-window
(display-buffer (current-buffer) other-window)
- (goto-char (overlay-start overlay))
- (pulse-momentary-highlight-region (overlay-start overlay)
- (overlay-end overlay)
+ (goto-char (flymake--diag-beg diag))
+ (pulse-momentary-highlight-region (flymake--diag-beg diag)
+ (flymake--diag-end diag)
'highlight))
(current-buffer))))
@@ -1108,18 +1129,16 @@ POS can be a buffer position or a button"
(defun flymake--diagnostics-buffer-entries ()
(with-current-buffer flymake--diagnostics-buffer-source
- (cl-loop for ov in (flymake--overlays)
- for diag = (overlay-get ov
- 'flymake--diagnostic)
+ (cl-loop for diag in (flymake-diagnostics)
for (line . col) =
(save-excursion
- (goto-char (overlay-start ov))
+ (goto-char (flymake--diag-beg diag))
(cons (line-number-at-pos)
(- (point)
(line-beginning-position))))
for type = (flymake--diag-type diag)
collect
- (list (list :overlay ov
+ (list (list :diagnostic diag
:line line
:severity (flymake--lookup-type-property
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."
(defcustom python-shell-completion-native-disabled-interpreters
;; PyPy's readline cannot handle some escape sequences yet. Native
;; completion was found to be non-functional for IPython (see
- ;; Bug#25067).
- (list "pypy" "ipython")
+ ;; Bug#25067). Native completion doesn't work on w32 (Bug#28580).
+ (if (eq system-type 'windows-nt) '("")
+ '("pypy" "ipython"))
"List of disabled interpreters.
When a match is found, native completion is disabled."
: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."
"Replace rectangle contents with STRING on each line.
The length of STRING need not be the same as the rectangle width.
+When called interactively and option `rectangle-preview' is
+non-nil, display the result as the user enters the string into
+the minibuffer.
+
Called from a program, takes three args; START, END and STRING."
(interactive
(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
N is a column number relative to selected frame.
If required, account for screen estate taken by `display-line-numbers'."
(if display-line-numbers
- (setq n (- n (line-number-display-width) 2)))
+ ;; FIXME: ruler-mode relies on N being an integer, so if the
+ ;; 'line-number' face is customized to use a font that is larger
+ ;; or smaller than that of the default face, the alignment might
+ ;; be off by up to half a column, unless the font width is an
+ ;; integral multiple or divisor of the default face's font.
+ (setq n (- n (round (line-number-display-width 'columns)))))
(- n
(or (car (window-margins)) 0)
(fringe-columns 'left)
@@ -668,7 +673,12 @@ Optional argument PROPS specifies other text properties to apply."
(let* ((w (ruler-mode-text-scaled-window-width))
(m (window-margins))
(f (window-fringes))
- (i (if display-line-numbers (+ (line-number-display-width) 2) 0))
+ (i (if display-line-numbers
+ ;; FIXME: ruler-mode relies on I being an integer, so
+ ;; the column numbers might be slightly off if the
+ ;; line-number face is customized.
+ (round (line-number-display-width 'columns))
+ 0))
(j (ruler-mode-text-scaled-window-hscroll))
;; Setup the scrollbar, fringes, and margins areas.
(lf (ruler-mode-space
@@ -708,7 +718,7 @@ Optional argument PROPS specifies other text properties to apply."
;; line-number display be blank, not filled with
;; ruler-mode-basic-graduation-char.
(if display-line-numbers
- (let* ((lndw (+ (line-number-display-width) 2))
+ (let* ((lndw (round (line-number-display-width 'columns)))
(s (make-string lndw ?\s)))
(concat s (make-string (- w lndw)
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
tokenization, but should not be regarded as a reliable function
for determining whether point is within a selector."
(save-excursion
- (re-search-forward "[{};)]" nil t)
+ (re-search-forward "[{};]" nil t)
(eq (char-before) ?\{)))
(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 @@
(def-edebug-spec push
(&or [form symbolp] [form gv-place]))
-;; Correct wrong declaration. This still doesn't support dotted destructuring
-;; though.
-(def-edebug-spec cl-lambda-list
- (([&rest cl-macro-arg]
- [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
- [&optional ["&rest" arg]]
- [&optional ["&key" [cl-&key-arg &rest cl-&key-arg]
- &optional "&allow-other-keys"]]
- [&optional ["&aux" &rest
- &or (symbolp &optional def-form) symbolp]]
- )))
-
-;; Add missing declaration.
-(def-edebug-spec cl-type-spec sexp) ;; This is not exactly correct but good
- ;; enough.
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Support for `testcover'
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'."
(push (list frel state) result))))
(funcall update-function result)))
+(defun vc-rcs-dir-extra-headers (&rest _ignore))
+
(defun vc-rcs-working-revision (file)
"RCS-specific version of `vc-working-revision'."
(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*,
(push win xwins))) ; delete this window
;; Restore marks
- (save-current-buffer
- (cl-loop for buf in buffers
- for entry = (cadr (assq buf winner-point-alist))
- do (progn (set-buffer buf)
- (set-mark (car entry))
- (setf (winner-active-region) (cdr entry)))))
+ ;; `winner-undo' shouldn't update the selection (Bug#28631) when
+ ;; select-enable-primary is non-nil.
+ (unless select-enable-primary
+ (save-current-buffer
+ (cl-loop for buf in buffers
+ for entry = (cadr (assq buf winner-point-alist))
+ do (progn (set-buffer buf)
+ (set-mark (car entry))
+ (setf (winner-active-region) (cdr entry))))))
;; Delete windows, whose buffers are dead or boring.
;; Return t if this is still a possible configuration.
(or (null xwins)