aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2017-10-12 13:44:16 -0700
committerPaul Eggert2017-10-12 13:44:16 -0700
commit3d0d5b4ebdf19876104d23402606f2b3cc636aca (patch)
tree87febb7bc2409f9502c86802a46915c01c546e7c /lisp
parent36375d35aa06e84865cce678559ddfa8f79a9775 (diff)
parent05d0c0f80291d25ea228d4a8572d58540bf08b52 (diff)
downloademacs-3d0d5b4ebdf19876104d23402606f2b3cc636aca.tar.gz
emacs-3d0d5b4ebdf19876104d23402606f2b3cc636aca.zip
Merge from origin/emacs-26
05d0c0f802 ; * ChangeLog.3: ChangeLog fixes. fbabae6b24 * ChangeLog.3: Update. eab051991e Fix docstring style for 'functionp' e8a7c41b4e Format shell commands in tramp.texi 0526aac4eb Unbreak the button in the Flymake diagnostics buffer again c89f001de1 Add mode map to Flymake diagnostic button f9cd8ee681 Tweak the Flymake diagnostics buffer again 0e83f5f279 Simplify Flymake diagnostics buffer UX cf4a15b9b6 First stab at a Flymake diagnostics buffer e4a1556392 * etc/NEWS (Flymake): Rewrite entry. 00adeb43e9 Improve the Flymake manual 44c6401733 ; * etc/NEWS: Clarify the description of "---" and "+++". 042b3cfbd2 Fix two Flymake bugs 3dfa2ca4dc Don't log "emergencies" in the Flymake legacy backend 1c2e188440 Add full documentation on new Flymake API 0f7f677f82 Fix some Flymake docstrings and messages 21e7075781 Make three new Flymake commands for debugging common problems c9be9a3678 ; INSTALL.REPO: Add -d to "thorough cleaning" suggestion. 5d51403ceb ; Typo fixes, mostly repeated words 0d004ed01a ; Spelling fixes 0485aa76c9 ; * src/lread.c (syms_of_lread) <module-file-suffix>: Fix ... ba7fb37d6a * admin/authors.el (authors-renamed-files-alist): addition. 14dca4a79a ; ChangeLog.3 fixes f352d0257c Fix PWD check on DOS_NT 934f08f3de Fix unlikely overflows with wd length 6c2b1e89ef * lisp/gnus/message.el: Improve last commit 7ed7360855 Fix problems when editing raw undecoded message (Bug#28671) aca5f0072b Avoid encoding errors in message.el 0c36663db5 Improve doc string and prompt of 'grep-read-files' 2da83c9d36 Avoid assertion violations when line numbers are displayed 5b81f65ad0 ; * lisp/emacs-lisp/rmc.el: Minor fix for copyright and li... 11b37b4a9f Be lazy when starting Flymake checks 36ed9a9ede Fix last change in frameset.el 62e5c119af Describe how window dividers can replicate vertical border... e2150d994a Add line-number faces to the display-line-numbers group 89b0023044 Increase xterm click count only within double-click-fuzz 745aea2296 Change pause in fullscreen toggling for NS port (bug#28496) 1cd334cd47 Handle PARENTS properly in tramp-*-handle-make-directory f1c73de47d ; Merge from Gnulib (comment changes only) 7c2c117c91 Improve test for unreachable dirs 2202952b83 * src/xsmfns.c (x_session_initialize): Fix memory leak. a9b72976de Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs i... 64baaff8c5 New option for handling ZWNJ in Arabic text rendering c194fb61c6 Make python prettify symbols into a defvar (Bug#28713) 6dfc778d54 Fix fullscreen crash on macOS (bug#28496) 3db0dc2168 Fix crash when closing fullscreen frame on macOS (bug#28661) bc80da5bd3 Support gio tool in Tramp 349e0eb5ff Fix flymake-goto-next-error when message has %-constructs 0fa353b504 * src/gnutls.c (syms_of_gnutls): Remove duplicated call to... dc6ae15a8d Move the entry about 'format' into Incompatible Lisp Changes 75174a632d Fix glitches in displaying TTY menus 238fbcb20e Create new Edebug spec for docstrings and use it in closures 2d58d51329 Avoid byte-compilation warnings in message.el # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog.162
-rw-r--r--lisp/ChangeLog.62
-rw-r--r--lisp/allout.el2
-rw-r--r--lisp/button.el2
-rw-r--r--lisp/cedet/ChangeLog.12
-rw-r--r--lisp/cedet/cedet-idutils.el2
-rw-r--r--lisp/cedet/ede/pmake.el2
-rw-r--r--lisp/cedet/semantic/db-find.el2
-rw-r--r--lisp/cedet/semantic/db.el2
-rw-r--r--lisp/cedet/semantic/edit.el2
-rw-r--r--lisp/composite.el14
-rw-r--r--lisp/dired-x.el2
-rw-r--r--lisp/display-line-numbers.el1
-rw-r--r--lisp/elide-head.el2
-rw-r--r--lisp/emacs-lisp/advice.el2
-rw-r--r--lisp/emacs-lisp/cl-generic.el13
-rw-r--r--lisp/emacs-lisp/cl-macs.el6
-rw-r--r--lisp/emacs-lisp/edebug.el27
-rw-r--r--lisp/emacs-lisp/generator.el6
-rw-r--r--lisp/emacs-lisp/pcase.el2
-rw-r--r--lisp/emacs-lisp/rmc.el4
-rw-r--r--lisp/faces.el6
-rw-r--r--lisp/frame.el6
-rw-r--r--lisp/frameset.el2
-rw-r--r--lisp/gnus/ChangeLog.32
-rw-r--r--lisp/gnus/gnus-mlspl.el3
-rw-r--r--lisp/gnus/message.el11
-rw-r--r--lisp/gnus/spam.el2
-rw-r--r--lisp/ido.el2
-rw-r--r--lisp/language/misc-lang.el64
-rw-r--r--lisp/mail/rmailedit.el26
-rw-r--r--lisp/net/newst-ticker.el2
-rw-r--r--lisp/net/tramp-adb.el9
-rw-r--r--lisp/net/tramp-gvfs.el42
-rw-r--r--lisp/obsolete/landmark.el2
-rw-r--r--lisp/obsolete/levents.el2
-rw-r--r--lisp/obsolete/otodo-mode.el2
-rw-r--r--lisp/org/org-faces.el2
-rw-r--r--lisp/org/org-inlinetask.el2
-rw-r--r--lisp/play/gomoku.el2
-rw-r--r--lisp/progmodes/antlr-mode.el2
-rw-r--r--lisp/progmodes/cc-vars.el2
-rw-r--r--lisp/progmodes/cperl-mode.el2
-rw-r--r--lisp/progmodes/flymake-proc.el4
-rw-r--r--lisp/progmodes/flymake.el353
-rw-r--r--lisp/progmodes/grep.el5
-rw-r--r--lisp/progmodes/python.el8
-rw-r--r--lisp/subr.el3
-rw-r--r--lisp/term/tvi970.el6
-rw-r--r--lisp/textmodes/less-css-mode.el2
-rw-r--r--lisp/textmodes/picture.el2
-rw-r--r--lisp/textmodes/rst.el2
-rw-r--r--lisp/vc/pcvs-defs.el2
-rw-r--r--lisp/xt-mouse.el8
54 files changed, 513 insertions, 176 deletions
diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16
index f3d4874a1ce..33bd9a03323 100644
--- a/lisp/ChangeLog.16
+++ b/lisp/ChangeLog.16
@@ -2728,7 +2728,7 @@
2728 2728
2729 * vc/ediff-util.el (ediff-buffer-type): New function. 2729 * vc/ediff-util.el (ediff-buffer-type): New function.
2730 (ediff-clone-buffer-for-current-diff-comparison): Compute the buf-type 2730 (ediff-clone-buffer-for-current-diff-comparison): Compute the buf-type
2731 rather than taking it as as argument. 2731 rather than taking it as an argument.
2732 (ediff-inferior-compare-regions): Adjust calls accordingly (bug#11319). 2732 (ediff-inferior-compare-regions): Adjust calls accordingly (bug#11319).
2733 2733
27342012-12-14 Ryan Crum <ryan.crum@eleostech.com> 27342012-12-14 Ryan Crum <ryan.crum@eleostech.com>
diff --git a/lisp/ChangeLog.6 b/lisp/ChangeLog.6
index 8c985fbfb7d..64a9d4df8ed 100644
--- a/lisp/ChangeLog.6
+++ b/lisp/ChangeLog.6
@@ -1473,7 +1473,7 @@
14731996-04-18 Richard Stallman <rms@mole.gnu.ai.mit.edu> 14731996-04-18 Richard Stallman <rms@mole.gnu.ai.mit.edu>
1474 1474
1475 * term/win32-win.el (x-select-text): Remember selected text. 1475 * term/win32-win.el (x-select-text): Remember selected text.
1476 (x-get-selection-value): Return nil if the clipboard data is 1476 (x-get-selection-value): Return nil if the clipboard data
1477 is the same as the remembered selected text. 1477 is the same as the remembered selected text.
1478 1478
14791996-04-18 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> 14791996-04-18 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
diff --git a/lisp/allout.el b/lisp/allout.el
index d0be847aa79..15b7b3a8ac5 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -357,7 +357,7 @@ Examples:
357 grandchildren, but completely collapse the final top-level topic. 357 grandchildren, but completely collapse the final top-level topic.
358 (-1 () : 1 0) 358 (-1 () : 1 0)
359 Close the first topic so only the immediate subtopics are shown, 359 Close the first topic so only the immediate subtopics are shown,
360 leave the subsequent topics exposed as they are until the second 360 leave the subsequent topics exposed as they are until the
361 second to last topic, which is exposed at least one level, and 361 second to last topic, which is exposed at least one level, and
362 completely close the last topic. 362 completely close the last topic.
363 (-2 : -1 *) 363 (-2 : -1 *)
diff --git a/lisp/button.el b/lisp/button.el
index 7e9a712dca7..a6090477c55 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -36,7 +36,7 @@
36;; represented by the overlay itself, or text-properties, in which case 36;; represented by the overlay itself, or text-properties, in which case
37;; the button is represented by a marker or buffer-position pointing 37;; the button is represented by a marker or buffer-position pointing
38;; somewhere in the button. In the latter case, no markers into the 38;; somewhere in the button. In the latter case, no markers into the
39;; buffer are retained, which is important for speed if there are are 39;; buffer are retained, which is important for speed if there are
40;; extremely large numbers of buttons. Note however that if there is 40;; extremely large numbers of buttons. Note however that if there is
41;; an existing face text-property at the site of the button, the 41;; an existing face text-property at the site of the button, the
42;; button face may not be visible. Using overlays avoids this. 42;; button face may not be visible. Using overlays avoids this.
diff --git a/lisp/cedet/ChangeLog.1 b/lisp/cedet/ChangeLog.1
index a17e53a1c5a..35cdf80e4b3 100644
--- a/lisp/cedet/ChangeLog.1
+++ b/lisp/cedet/ChangeLog.1
@@ -457,7 +457,7 @@
457 complete local variables. 457 complete local variables.
458 458
459 * semantic/scope.el (semantic-analyze-scoped-types-default): If we 459 * semantic/scope.el (semantic-analyze-scoped-types-default): If we
460 cannot find a type in the typecache, also look into the the types 460 cannot find a type in the typecache, also look into the types
461 we already found. This is necessary since in C++, a 'using 461 we already found. This is necessary since in C++, a 'using
462 namespace' can be dependend on a previous one. 462 namespace' can be dependend on a previous one.
463 (semantic-completable-tags-from-type): When creating the list of 463 (semantic-completable-tags-from-type): When creating the list of
diff --git a/lisp/cedet/cedet-idutils.el b/lisp/cedet/cedet-idutils.el
index 4b6c6b01aa2..48e1b2d09b1 100644
--- a/lisp/cedet/cedet-idutils.el
+++ b/lisp/cedet/cedet-idutils.el
@@ -98,7 +98,7 @@ Return the created buffer with program output."
98 98
99(defun cedet-idutils-lid-call (flags) 99(defun cedet-idutils-lid-call (flags)
100 "Call ID Utils lid with the list of FLAGS. 100 "Call ID Utils lid with the list of FLAGS.
101Return the created buffer with with program output." 101Return the created buffer with program output."
102 (let ((b (get-buffer-create "*CEDET lid*")) 102 (let ((b (get-buffer-create "*CEDET lid*"))
103 (cd default-directory) 103 (cd default-directory)
104 ) 104 )
diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el
index c199cae82ba..b836eafa8ce 100644
--- a/lisp/cedet/ede/pmake.el
+++ b/lisp/cedet/ede/pmake.el
@@ -277,7 +277,7 @@ Execute BODY in a location where a value can be placed."
277;;; SOURCE VARIABLE NAME CONSTRUCTION 277;;; SOURCE VARIABLE NAME CONSTRUCTION
278 278
279(defsubst ede-pmake-varname (obj) 279(defsubst ede-pmake-varname (obj)
280 "Convert OBJ into a variable name name. 280 "Convert OBJ into a variable name.
281Change . to _ in the variable name." 281Change . to _ in the variable name."
282 (let ((name (oref obj name))) 282 (let ((name (oref obj name)))
283 (while (string-match "\\." name) 283 (while (string-match "\\." name)
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el
index c678739671c..1f5de71c53d 100644
--- a/lisp/cedet/semantic/db-find.el
+++ b/lisp/cedet/semantic/db-find.el
@@ -930,7 +930,7 @@ but should be good enough for debugging assertions."
930 (length result)))) 930 (length result))))
931 931
932(defun semanticdb-find-result-with-nil-p (resultp) 932(defun semanticdb-find-result-with-nil-p (resultp)
933 "Non-nil of RESULTP is in the form of a semanticdb search result. 933 "Non-nil if RESULTP is in the form of a semanticdb search result.
934The value nil is valid where a TABLE usually is, but only if the TAG 934The value nil is valid where a TABLE usually is, but only if the TAG
935results include overlays. 935results include overlays.
936This query only really tests the first entry in the list that is RESULTP, 936This query only really tests the first entry in the list that is RESULTP,
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index e7ee879bf39..4d9daaf54ef 100644
--- a/lisp/cedet/semantic/db.el
+++ b/lisp/cedet/semantic/db.el
@@ -595,7 +595,7 @@ This will call `semantic-fetch-tags' if that file is in memory."
595 (kill-buffer buff)))))) 595 (kill-buffer buff))))))
596 596
597(cl-defmethod semanticdb-needs-refresh-p ((obj semanticdb-table)) 597(cl-defmethod semanticdb-needs-refresh-p ((obj semanticdb-table))
598 "Return non-nil of OBJ's tag list is out of date. 598 "Return non-nil if OBJ's tag list is out of date.
599The file associated with OBJ does not need to be in a buffer." 599The file associated with OBJ does not need to be in a buffer."
600 (let* ((ff (semanticdb-full-filename obj)) 600 (let* ((ff (semanticdb-full-filename obj))
601 (buff (semanticdb-in-buffer-p obj)) 601 (buff (semanticdb-in-buffer-p obj))
diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el
index 78822c487ae..fc0a05a6a6e 100644
--- a/lisp/cedet/semantic/edit.el
+++ b/lisp/cedet/semantic/edit.el
@@ -221,7 +221,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
221 ) 221 )
222 222
223(defun semantic-edits-change-in-one-tag-p (change hits) 223(defun semantic-edits-change-in-one-tag-p (change hits)
224 "Return non-nil of the overlay CHANGE exists solely in one leaf tag. 224 "Return non-nil if the overlay CHANGE exists solely in one leaf tag.
225HITS is the list of tags that CHANGE is in. It can have more than 225HITS is the list of tags that CHANGE is in. It can have more than
226one tag in it if the leaf tag is within a parent tag." 226one tag in it if the leaf tag is within a parent tag."
227 (and (< (semantic-tag-start (car hits)) 227 (and (< (semantic-tag-start (car hits))
diff --git a/lisp/composite.el b/lisp/composite.el
index ab39e087e1f..72b0ffc8f48 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -442,8 +442,10 @@ after a sequence of character events."
442(defsubst lglyph-set-adjustment (glyph &optional xoff yoff wadjust) 442(defsubst lglyph-set-adjustment (glyph &optional xoff yoff wadjust)
443 (aset glyph 9 (vector (or xoff 0) (or yoff 0) (or wadjust 0)))) 443 (aset glyph 9 (vector (or xoff 0) (or yoff 0) (or wadjust 0))))
444 444
445;; Return the shallow Copy of GLYPH.
445(defsubst lglyph-copy (glyph) (copy-sequence glyph)) 446(defsubst lglyph-copy (glyph) (copy-sequence glyph))
446 447
448;; Insert GLYPH at the index IDX of GSTRING.
447(defun lgstring-insert-glyph (gstring idx glyph) 449(defun lgstring-insert-glyph (gstring idx glyph)
448 (let ((nglyphs (lgstring-glyph-len gstring)) 450 (let ((nglyphs (lgstring-glyph-len gstring))
449 (i idx)) 451 (i idx))
@@ -459,6 +461,18 @@ after a sequence of character events."
459 (lgstring-set-glyph gstring i glyph) 461 (lgstring-set-glyph gstring i glyph)
460 gstring)) 462 gstring))
461 463
464;; Remove glyph at IDX from GSTRING.
465(defun lgstring-remove-glyph (gstring idx)
466 (setq gstring (copy-sequence gstring))
467 (lgstring-set-id gstring nil)
468 (let ((len (length gstring)))
469 (setq idx (+ idx 3))
470 (while (< idx len)
471 (aset gstring (1- idx) (aref gstring idx))
472 (setq idx (1+ idx)))
473 (aset gstring (1- len) nil))
474 gstring)
475
462(defun compose-glyph-string (gstring from to) 476(defun compose-glyph-string (gstring from to)
463 (let ((glyph (lgstring-glyph gstring from)) 477 (let ((glyph (lgstring-glyph gstring from))
464 from-pos to-pos) 478 from-pos to-pos)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 78fa5ed7788..5fa28d3e3e8 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -57,7 +57,7 @@
57 57
58(defcustom dired-bind-vm nil 58(defcustom dired-bind-vm nil
59 "Non-nil means \"V\" runs `dired-vm', otherwise \"V\" runs `dired-rmail'. 59 "Non-nil means \"V\" runs `dired-vm', otherwise \"V\" runs `dired-rmail'.
60RMAIL files in the old Babyl format (used before before Emacs 23.1) 60RMAIL files in the old Babyl format (used before Emacs 23.1)
61contain \"-*- rmail -*-\" at the top, so `dired-find-file' 61contain \"-*- rmail -*-\" at the top, so `dired-find-file'
62will run `rmail' on these files. New RMAIL files use the standard 62will run `rmail' on these files. New RMAIL files use the standard
63mbox format, and so cannot be distinguished in this way." 63mbox format, and so cannot be distinguished in this way."
diff --git a/lisp/display-line-numbers.el b/lisp/display-line-numbers.el
index 3b6b101de49..15e04279156 100644
--- a/lisp/display-line-numbers.el
+++ b/lisp/display-line-numbers.el
@@ -36,6 +36,7 @@
36 36
37(defgroup display-line-numbers nil 37(defgroup display-line-numbers nil
38 "Display line numbers in the buffer." 38 "Display line numbers in the buffer."
39 :group 'convenience
39 :group 'display) 40 :group 'display)
40 41
41(defcustom display-line-numbers-type t 42(defcustom display-line-numbers-type t
diff --git a/lisp/elide-head.el b/lisp/elide-head.el
index 5bede73eaa1..c6d8c9009b9 100644
--- a/lisp/elide-head.el
+++ b/lisp/elide-head.el
@@ -57,7 +57,7 @@ If not, see <http://www\\.gnu\\.org/licenses/>\\)\\.")
57 "SUCH DAMAGE\\.") ; BSD 57 "SUCH DAMAGE\\.") ; BSD
58 ("Permission is hereby granted, free of charge" . ; X11 58 ("Permission is hereby granted, free of charge" . ; X11
59 "authorization from the X Consortium\\.")) 59 "authorization from the X Consortium\\."))
60 "Alist of regexps defining start end end of text to elide. 60 "Alist of regexps defining start and end of text to elide.
61 61
62The cars of elements of the list are searched for in order. Text is 62The cars of elements of the list are searched for in order. Text is
63elided with an invisible overlay from the end of the line where the 63elided with an invisible overlay from the end of the line where the
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 32b6a47b053..82867667756 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -502,7 +502,7 @@
502;; important advantage is that it allows the implementation of forward advice. 502;; important advantage is that it allows the implementation of forward advice.
503;; Advice information for a certain function accumulates as the value of the 503;; Advice information for a certain function accumulates as the value of the
504;; `advice-info' property of the function symbol. This accumulation is 504;; `advice-info' property of the function symbol. This accumulation is
505;; completely independent of the fact that that function might not yet be 505;; completely independent of the fact that the function might not yet be
506;; defined. The macros `defun' and `defmacro' check whether the 506;; defined. The macros `defun' and `defmacro' check whether the
507;; function/macro they defined had advice information 507;; function/macro they defined had advice information
508;; associated with it. If so and forward advice is enabled, the original 508;; associated with it. If so and forward advice is enabled, the original
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index b2f76abd88e..62befd4742a 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -204,7 +204,16 @@ OPTIONS-AND-METHODS currently understands:
204DEFAULT-BODY, if present, is used as the body of a default method. 204DEFAULT-BODY, if present, is used as the body of a default method.
205 205
206\(fn NAME ARGS [DOC-STRING] [OPTIONS-AND-METHODS...] &rest DEFAULT-BODY)" 206\(fn NAME ARGS [DOC-STRING] [OPTIONS-AND-METHODS...] &rest DEFAULT-BODY)"
207 (declare (indent 2) (doc-string 3)) 207 (declare (indent 2) (doc-string 3)
208 (debug
209 (&define name cl-lambda-list lambda-doc
210 [&rest [&or
211 ("declare" &rest sexp)
212 (":argument-precedence-order" &rest sexp)
213 (&define ":method" [&rest atom]
214 cl-generic-method-args lambda-doc
215 def-body)]]
216 def-body)))
208 (let* ((doc (if (stringp (car-safe options-and-methods)) 217 (let* ((doc (if (stringp (car-safe options-and-methods))
209 (pop options-and-methods))) 218 (pop options-and-methods)))
210 (declarations nil) 219 (declarations nil)
@@ -422,7 +431,7 @@ The set of acceptable TYPEs (also called \"specializers\") is defined
422 ; Like in CLOS spec, we support 431 ; Like in CLOS spec, we support
423 ; any non-list values. 432 ; any non-list values.
424 cl-generic-method-args ; arguments 433 cl-generic-method-args ; arguments
425 [ &optional stringp ] ; documentation string 434 lambda-doc ; documentation string
426 def-body))) ; part to be debugged 435 def-body))) ; part to be debugged
427 (let ((qualifiers nil)) 436 (let ((qualifiers nil))
428 (while (not (listp args)) 437 (while (not (listp args))
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 32ba0ac3091..40eda1e0d65 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -190,7 +190,7 @@ The name is made by appending a number to PREFIX, default \"T\"."
190 (&rest ("cl-declare" &rest sexp))) 190 (&rest ("cl-declare" &rest sexp)))
191 191
192(def-edebug-spec cl-declarations-or-string 192(def-edebug-spec cl-declarations-or-string
193 (&or stringp 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 arg]
@@ -447,8 +447,8 @@ more details.
447 447
448(def-edebug-spec cl-lambda-expr 448(def-edebug-spec cl-lambda-expr
449 (&define ("lambda" cl-lambda-list 449 (&define ("lambda" cl-lambda-list
450 ;;cl-declarations-or-string 450 cl-declarations-or-string
451 ;;[&optional ("interactive" interactive)] 451 [&optional ("interactive" interactive)]
452 def-body))) 452 def-body)))
453 453
454;; Redefine function-form to also match cl-function 454;; Redefine function-form to also match cl-function
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index a070ff25d17..77523de32c5 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -2017,15 +2017,14 @@ expressions; a `progn' form will be returned enclosing these forms."
2017(def-edebug-spec defvar (symbolp &optional form stringp)) 2017(def-edebug-spec defvar (symbolp &optional form stringp))
2018 2018
2019(def-edebug-spec defun 2019(def-edebug-spec defun
2020 (&define name lambda-list 2020 (&define name lambda-list lambda-doc
2021 [&optional stringp]
2022 [&optional ("declare" &rest sexp)] 2021 [&optional ("declare" &rest sexp)]
2023 [&optional ("interactive" interactive)] 2022 [&optional ("interactive" interactive)]
2024 def-body)) 2023 def-body))
2025(def-edebug-spec defmacro 2024(def-edebug-spec defmacro
2026 ;; FIXME: Improve `declare' so we can Edebug gv-expander and 2025 ;; FIXME: Improve `declare' so we can Edebug gv-expander and
2027 ;; gv-setter declarations. 2026 ;; gv-setter declarations.
2028 (&define name lambda-list [&optional stringp] 2027 (&define name lambda-list lambda-doc
2029 [&optional ("declare" &rest sexp)] def-body)) 2028 [&optional ("declare" &rest sexp)] def-body))
2030 2029
2031(def-edebug-spec arglist lambda-list) ;; deprecated - use lambda-list. 2030(def-edebug-spec arglist lambda-list) ;; deprecated - use lambda-list.
@@ -2036,6 +2035,10 @@ expressions; a `progn' form will be returned enclosing these forms."
2036 &optional ["&rest" arg] 2035 &optional ["&rest" arg]
2037 ))) 2036 )))
2038 2037
2038(def-edebug-spec lambda-doc
2039 (&optional [&or stringp
2040 (&define ":documentation" def-form)]))
2041
2039(def-edebug-spec interactive 2042(def-edebug-spec interactive
2040 (&optional &or stringp def-form)) 2043 (&optional &or stringp def-form))
2041 2044
@@ -3254,15 +3257,6 @@ generated symbols for methods. If a function or method to
3254instrument cannot be found, signal an error." 3257instrument cannot be found, signal an error."
3255 (let ((func-marker (get func 'edebug))) 3258 (let ((func-marker (get func 'edebug)))
3256 (cond 3259 (cond
3257 ((and (markerp func-marker) (marker-buffer func-marker))
3258 ;; It is uninstrumented, so instrument it.
3259 (with-current-buffer (marker-buffer func-marker)
3260 (goto-char func-marker)
3261 (edebug-eval-top-level-form)
3262 (list func)))
3263 ((consp func-marker)
3264 (message "%s is already instrumented." func)
3265 (list func))
3266 ((cl-generic-p func) 3260 ((cl-generic-p func)
3267 (let ((method-defs (cl--generic-method-files func)) 3261 (let ((method-defs (cl--generic-method-files func))
3268 symbols) 3262 symbols)
@@ -3277,6 +3271,15 @@ instrument cannot be found, signal an error."
3277 (edebug-eval-top-level-form) 3271 (edebug-eval-top-level-form)
3278 (push (edebug-form-data-symbol) symbols)))) 3272 (push (edebug-form-data-symbol) symbols))))
3279 symbols)) 3273 symbols))
3274 ((and (markerp func-marker) (marker-buffer func-marker))
3275 ;; It is uninstrumented, so instrument it.
3276 (with-current-buffer (marker-buffer func-marker)
3277 (goto-char func-marker)
3278 (edebug-eval-top-level-form)
3279 (list func)))
3280 ((consp func-marker)
3281 (message "%s is already instrumented." func)
3282 (list func))
3280 (t 3283 (t
3281 (let ((loc (find-function-noselect func t))) 3284 (let ((loc (find-function-noselect func t)))
3282 (unless (cdr loc) 3285 (unless (cdr loc)
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index 3e9885900cf..410e4edcc92 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -680,7 +680,8 @@ sub-iterator function returns via `iter-end-of-sequence'."
680When called as a function, NAME returns an iterator value that 680When called as a function, NAME returns an iterator value that
681encapsulates the state of a computation that produces a sequence 681encapsulates the state of a computation that produces a sequence
682of values. Callers can retrieve each value using `iter-next'." 682of values. Callers can retrieve each value using `iter-next'."
683 (declare (indent defun)) 683 (declare (indent defun)
684 (debug (&define name lambda-list lambda-doc def-body)))
684 (cl-assert lexical-binding) 685 (cl-assert lexical-binding)
685 (let* ((parsed-body (macroexp-parse-body body)) 686 (let* ((parsed-body (macroexp-parse-body body))
686 (declarations (car parsed-body)) 687 (declarations (car parsed-body))
@@ -692,7 +693,8 @@ of values. Callers can retrieve each value using `iter-next'."
692(defmacro iter-lambda (arglist &rest body) 693(defmacro iter-lambda (arglist &rest body)
693 "Return a lambda generator. 694 "Return a lambda generator.
694`iter-lambda' is to `iter-defun' as `lambda' is to `defun'." 695`iter-lambda' is to `iter-defun' as `lambda' is to `defun'."
695 (declare (indent defun)) 696 (declare (indent defun)
697 (debug (&define lambda-list lambda-doc def-body)))
696 (cl-assert lexical-binding) 698 (cl-assert lexical-binding)
697 `(lambda ,arglist 699 `(lambda ,arglist
698 ,(cps-generate-evaluator body))) 700 ,(cps-generate-evaluator body)))
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index c703cae4458..36af88423c8 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -226,7 +226,7 @@ I.e. accepts the usual &optional and &rest keywords, but every
226formal argument can be any pattern accepted by `pcase' (a mere 226formal argument can be any pattern accepted by `pcase' (a mere
227variable name being but a special case of it)." 227variable name being but a special case of it)."
228 (declare (doc-string 2) (indent defun) 228 (declare (doc-string 2) (indent defun)
229 (debug ((&rest pcase-PAT) body))) 229 (debug (&define (&rest pcase-PAT) lambda-doc def-body)))
230 (let* ((bindings ()) 230 (let* ((bindings ())
231 (parsed-body (macroexp-parse-body body)) 231 (parsed-body (macroexp-parse-body body))
232 (args (mapcar (lambda (pat) 232 (args (mapcar (lambda (pat)
diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
index 417301cde06..57bc6d9b591 100644
--- a/lisp/emacs-lisp/rmc.el
+++ b/lisp/emacs-lisp/rmc.el
@@ -1,6 +1,6 @@
1;;; rmc.el --- read from a multiple choice question -*- lexical-binding: t -*- 1;;; rmc.el --- read from a multiple choice question -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 2017 Free Software Foundation, Inc. 3;; Copyright (C) 2016-2017 Free Software Foundation, Inc.
4 4
5;; Maintainer: emacs-devel@gnu.org 5;; Maintainer: emacs-devel@gnu.org
6 6
@@ -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 this program. If not, see <http://www.gnu.org/licenses/>. 20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21 21
22;;; Commentary: 22;;; Commentary:
23 23
diff --git a/lisp/faces.el b/lisp/faces.el
index 24ab1fa4f0c..a5f1d1dd328 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2483,7 +2483,8 @@ monospaced font, otherwise line numbers will not line up,
2483and text lines might move horizontally as you move through 2483and text lines might move horizontally as you move through
2484the buffer." 2484the buffer."
2485 :version "26.1" 2485 :version "26.1"
2486 :group 'basic-faces) 2486 :group 'basic-faces
2487 :group 'display-line-numbers)
2487 2488
2488(defface line-number-current-line 2489(defface line-number-current-line
2489 '((t :inherit line-number)) 2490 '((t :inherit line-number))
@@ -2497,7 +2498,8 @@ the buffer. Similarly, making this face's font different
2497from that of the `line-number' face could produce such 2498from that of the `line-number' face could produce such
2498unwanted effects." 2499unwanted effects."
2499 :version "26.1" 2500 :version "26.1"
2500 :group 'basic-faces) 2501 :group 'basic-faces
2502 :group 'display-line-numbers)
2501 2503
2502(defface escape-glyph 2504(defface escape-glyph
2503 '((((background dark)) :foreground "cyan") 2505 '((((background dark)) :foreground "cyan")
diff --git a/lisp/frame.el b/lisp/frame.el
index e501daefb4c..f8aa5c6e523 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -2434,7 +2434,11 @@ See also `toggle-frame-maximized'."
2434 (set-frame-parameter nil 'fullscreen fullscreen-restore) 2434 (set-frame-parameter nil 'fullscreen fullscreen-restore)
2435 (set-frame-parameter nil 'fullscreen nil))) 2435 (set-frame-parameter nil 'fullscreen nil)))
2436 (modify-frame-parameters 2436 (modify-frame-parameters
2437 nil `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen)))))) 2437 nil `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen))))
2438 ;; Manipulating a frame without waiting for the fullscreen
2439 ;; animation to complete can cause a crash, or other unexpected
2440 ;; behaviour, on macOS (bug#28496).
2441 (when (featurep 'cocoa) (sleep-for 0.5))))
2438 2442
2439;;;; Key bindings 2443;;;; Key bindings
2440 2444
diff --git a/lisp/frameset.el b/lisp/frameset.el
index 593451a4d75..bda21a8b8d7 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -638,7 +638,7 @@ see `frameset-filter-alist'."
638When switching from a GUI frame to a tty frame, behave 638When switching from a GUI frame to a tty frame, behave
639as `frameset-filter-shelve-param' does." 639as `frameset-filter-shelve-param' does."
640 (or saving 640 (or saving
641 (if (frameset-switch-to-gui-p parameters) 641 (if (frameset-switch-to-tty-p parameters)
642 (frameset-filter-shelve-param current filtered parameters saving 642 (frameset-filter-shelve-param current filtered parameters saving
643 prefix)))) 643 prefix))))
644 644
diff --git a/lisp/gnus/ChangeLog.3 b/lisp/gnus/ChangeLog.3
index c2e4846442a..43681f6eb7d 100644
--- a/lisp/gnus/ChangeLog.3
+++ b/lisp/gnus/ChangeLog.3
@@ -955,7 +955,7 @@
955 * gnus-sum.el (gnus-summary-read-group-1): Initialize the spam code if 955 * gnus-sum.el (gnus-summary-read-group-1): Initialize the spam code if
956 that's needed. 956 that's needed.
957 957
958 * spam.el (spam-initialize): Allow calling repeatedly, but only run the 958 * spam.el (spam-initialize): Allow calling repeatedly, but only run
959 the code once (bug#9069). 959 the code once (bug#9069).
960 960
9612014-01-18 Steinar Bang <sb@dod.no> 9612014-01-18 Steinar Bang <sb@dod.no>
diff --git a/lisp/gnus/gnus-mlspl.el b/lisp/gnus/gnus-mlspl.el
index cd6bbd03576..d0810ca8221 100644
--- a/lisp/gnus/gnus-mlspl.el
+++ b/lisp/gnus/gnus-mlspl.el
@@ -72,8 +72,7 @@ match any of the group-specified splitting rules. See
72;;;###autoload 72;;;###autoload
73(defun gnus-group-split-update (&optional catch-all) 73(defun gnus-group-split-update (&optional catch-all)
74 "Computes nnmail-split-fancy from group params and CATCH-ALL. 74 "Computes nnmail-split-fancy from group params and CATCH-ALL.
75It does this by calling by calling (gnus-group-split-fancy nil 75It does this by calling (gnus-group-split-fancy nil nil CATCH-ALL).
76nil CATCH-ALL).
77 76
78If CATCH-ALL is nil, `gnus-group-split-default-catch-all-group' is used 77If CATCH-ALL is nil, `gnus-group-split-default-catch-all-group' is used
79instead. This variable is set by `gnus-group-split-setup'." 78instead. This variable is set by `gnus-group-split-setup'."
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index cc914643779..acb55463f7f 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -50,6 +50,7 @@
50(require 'rfc2047) 50(require 'rfc2047)
51(require 'puny) 51(require 'puny)
52(require 'rmc) ; read-multiple-choice 52(require 'rmc) ; read-multiple-choice
53(eval-when-compile (require 'subr-x)) ; when-let*
53 54
54(autoload 'mailclient-send-it "mailclient") 55(autoload 'mailclient-send-it "mailclient")
55 56
@@ -306,7 +307,7 @@ any confusion."
306(defcustom message-subject-trailing-was-query t 307(defcustom message-subject-trailing-was-query t
307 "What to do with trailing \"(was: <old subject>)\" in subject lines. 308 "What to do with trailing \"(was: <old subject>)\" in subject lines.
308If nil, leave the subject unchanged. If it is the symbol `ask', query 309If nil, leave the subject unchanged. If it is the symbol `ask', query
309the user what do do. In this case, the subject is matched against 310the user what to do. In this case, the subject is matched against
310`message-subject-trailing-was-ask-regexp'. If 311`message-subject-trailing-was-ask-regexp'. If
311`message-subject-trailing-was-query' is t, always strip the trailing 312`message-subject-trailing-was-query' is t, always strip the trailing
312old subject. In this case, `message-subject-trailing-was-regexp' is 313old subject. In this case, `message-subject-trailing-was-regexp' is
@@ -8059,8 +8060,12 @@ regexp VARSTR."
8059 (or (null varstr) 8060 (or (null varstr)
8060 (string-match varstr (symbol-name (car local))))) 8061 (string-match varstr (symbol-name (car local)))))
8061 (ignore-errors 8062 (ignore-errors
8062 (set (make-local-variable (car local)) 8063 ;; Cloning message-default-charset could cause an already
8063 (cdr local))))) 8064 ;; encoded text to be encoded again, yielding raw bytes
8065 ;; instead of characters in the message.
8066 (unless (eq 'message-default-charset (car local))
8067 (set (make-local-variable (car local))
8068 (cdr local))))))
8064 locals))) 8069 locals)))
8065 8070
8066;;; 8071;;;
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index 6378e3e97e1..f14af741f75 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -628,7 +628,7 @@ order for SpamAssassin to recognize the new registered spam."
628 :group 'spam-spamassassin) 628 :group 'spam-spamassassin)
629 629
630(defcustom spam-sa-learn-unregister-switch "--forget" 630(defcustom spam-sa-learn-unregister-switch "--forget"
631 "The switch that sa-learn uses to unregister messages messages." 631 "The switch that sa-learn uses to unregister messages."
632 :type 'string 632 :type 'string
633 :group 'spam-spamassassin) 633 :group 'spam-spamassassin)
634 634
diff --git a/lisp/ido.el b/lisp/ido.el
index 23c039d32e6..47cbcb63c69 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -443,7 +443,7 @@ Possible values:
443`other-window' Show new file in another window (same frame) 443`other-window' Show new file in another window (same frame)
444`display' Display file in another window without selecting to it 444`display' Display file in another window without selecting to it
445`other-frame' Show new file in another frame 445`other-frame' Show new file in another frame
446`maybe-frame' If a file is visible in another frame, prompt to ask if you 446`maybe-frame' If a file is visible in another frame, prompt to ask if
447 you want to see the file in the same window of the current 447 you want to see the file in the same window of the current
448 frame or in the other frame 448 frame or in the other frame
449`raise-frame' If a file is visible in another frame, raise that 449`raise-frame' If a file is visible in another frame, raise that
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index 2843c7c9038..a63c3a21091 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -75,12 +75,70 @@ and Italian.")))
75 (sample-text . "Persian فارسی") 75 (sample-text . "Persian فارسی")
76 (documentation . "Bidirectional editing is supported."))) 76 (documentation . "Bidirectional editing is supported.")))
77 77
78(defcustom arabic-shaper-ZWNJ-handling nil
79 "How to handle ZWMJ in Arabic text rendering.
80This variable controls the way to handle a glyph for ZWNJ
81returned by the underling shaping engine.
82
83The default value is nil, which means that the ZWNJ glyph is
84displayed as is.
85
86If the value is `absorb', ZWNJ is absorbed into the previous
87grapheme cluster, and not displayed.
88
89If the value is `as-space', the glyph is displayed by a
90thin (i.e. 1-dot width) space.
91
92Customizing the value takes effect when you start Emacs next time."
93 :group 'mule
94 :version "26.1"
95 :type '(choice
96 (const :tag "default" nil)
97 (const :tag "as space" as-space)
98 (const :tag "absorb" absorb)))
99
100;; Record error in arabic-change-gstring.
101(defvar arabic-shape-log nil)
102
103(defun arabic-shape-gstring (gstring)
104 (setq gstring (font-shape-gstring gstring))
105 (condition-case err
106 (when arabic-shaper-ZWNJ-handling
107 (let ((font (lgstring-font gstring))
108 (i 1)
109 (len (lgstring-glyph-len gstring))
110 (modified nil))
111 (while (< i len)
112 (let ((glyph (lgstring-glyph gstring i)))
113 (when (eq (lglyph-char glyph) #x200c)
114 (cond
115 ((eq arabic-shaper-ZWNJ-handling 'as-space)
116 (if (> (- (lglyph-rbearing glyph) (lglyph-lbearing glyph)) 0)
117 (let ((space-glyph (aref (font-get-glyphs font 0 1 " ") 0)))
118 (when space-glyph
119 (lglyph-set-code glyph (aref space-glyph 3))
120 (lglyph-set-width glyph (aref space-glyph 4)))))
121 (lglyph-set-adjustment glyph 0 0 1)
122 (setq modified t))
123 ((eq arabic-shaper-ZWNJ-handling 'absorb)
124 (let ((prev (lgstring-glyph gstring (1- i))))
125 (lglyph-set-from-to prev (lglyph-from prev) (lglyph-to glyph))
126 (setq gstring (lgstring-remove-glyph gstring i))
127 (setq len (1- len)))
128 (setq modified t)))))
129 (setq i (1+ i)))
130 (if modified
131 (lgstring-set-id gstring nil))))
132 (error (push err arabic-shape-log)))
133 gstring)
134
78(set-char-table-range 135(set-char-table-range
79 composition-function-table 136 composition-function-table
80 '(#x600 . #x74F) 137 '(#x600 . #x74F)
81 (list (vector "[\u0600-\u074F\u200C\u200D]+" 0 'font-shape-gstring) 138 (list (vector "[\u0600-\u074F\u200C\u200D]+" 0
82 (vector "[\u200C\u200D][\u0600-\u074F\u200C\u200D]+" 139 'arabic-shape-gstring)
83 1 'font-shape-gstring))) 140 (vector "[\u200C\u200D][\u0600-\u074F\u200C\u200D]+" 1
141 'arabic-shape-gstring)))
84 142
85(provide 'misc-lang) 143(provide 'misc-lang)
86 144
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el
index b91a81503e2..640febd0473 100644
--- a/lisp/mail/rmailedit.el
+++ b/lisp/mail/rmailedit.el
@@ -312,26 +312,34 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'.
312 (data-buffer (current-buffer)) 312 (data-buffer (current-buffer))
313 (start (copy-marker (point) nil)) ; new body will be between 313 (start (copy-marker (point) nil)) ; new body will be between
314 (end (copy-marker (point) t))) ; these two markers 314 (end (copy-marker (point) t))) ; these two markers
315 (with-current-buffer rmail-view-buffer 315 (if mime-state
316 (encode-coding-region headers-end (point-max) coding-system 316 ;; Message is already in encoded state
317 data-buffer)) 317 (insert-buffer-substring rmail-view-buffer headers-end
318 (delete-region end (point-max)) 318 (with-current-buffer rmail-view-buffer
319 (point-max)))
320 (with-current-buffer rmail-view-buffer
321 (encode-coding-region headers-end (point-max) coding-system
322 data-buffer)))
319 ;; Apply to the mbox buffer any changes in header fields 323 ;; Apply to the mbox buffer any changes in header fields
320 ;; that the user made while editing in the view buffer. 324 ;; that the user made while editing in the view buffer.
321 (rmail-edit-update-headers (rmail-edit-diff-headers 325 (rmail-edit-update-headers (rmail-edit-diff-headers
322 rmail-old-headers new-headers)) 326 rmail-old-headers new-headers))
323 ;; Re-apply content-transfer-encoding, if any, on the message body. 327 ;; Re-apply content-transfer-encoding, if any, on the message body.
324 (cond 328 (cond
329 (mime-state) ; if set, already transfer-encoded
325 ((string= character-coding "quoted-printable") 330 ((string= character-coding "quoted-printable")
326 (mail-quote-printable-region start (point-max))) 331 (mail-quote-printable-region start end))
327 ((and (string= character-coding "base64") is-text-message) 332 ((and (string= character-coding "base64") is-text-message)
328 (base64-encode-region start (point-max))) 333 (base64-encode-region start end))
329 ((and (eq character-coding 'uuencode) is-text-message) 334 ((and (eq character-coding 'uuencode) is-text-message)
330 (error "uuencoded messages are not supported"))) 335 (error "uuencoded messages are not supported")))
331 ;; After encoding, make sure buffer ends with a blank line so as not to 336 ;; After encoding, make sure buffer ends with a blank line so as not to
332 ;; run this message together with the following one. 337 ;; run this message together with the following one.
333 (goto-char (point-max)) 338 (goto-char end)
334 (rmail-ensure-blank-line)) 339 (rmail-ensure-blank-line)
340 ;; Delete previous body. This must be after all insertions at the end,
341 ;; so the marker for the beginning of the next message isn't messed up.
342 (delete-region end (point-max)))
335 (rmail-set-attribute rmail-edited-attr-index t)) 343 (rmail-set-attribute rmail-edited-attr-index t))
336;;;??? BROKEN perhaps. 344;;;??? BROKEN perhaps.
337;;; (if (boundp 'rmail-summary-vector) 345;;; (if (boundp 'rmail-summary-vector)
diff --git a/lisp/net/newst-ticker.el b/lisp/net/newst-ticker.el
index 913b89b43ff..eb6ff19d5c2 100644
--- a/lisp/net/newst-ticker.el
+++ b/lisp/net/newst-ticker.el
@@ -118,7 +118,7 @@ been added between the last two retrievals."
118 118
119(defcustom newsticker-hide-obsolete-items-in-echo-area 119(defcustom newsticker-hide-obsolete-items-in-echo-area
120 t 120 t
121 "Decides whether to show obsolete items items in the ticker. 121 "Decides whether to show obsolete items in the ticker.
122If t the echo area will not show obsolete items. See also 122If t the echo area will not show obsolete items. See also
123`newsticker-hide-old-items-in-echo-area'." 123`newsticker-hide-old-items-in-echo-area'."
124 :type 'boolean 124 :type 'boolean
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 5268e80a33d..e75efcf483f 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -549,11 +549,12 @@ Emacs dired can't find files."
549 (let ((par (expand-file-name ".." dir))) 549 (let ((par (expand-file-name ".." dir)))
550 (unless (file-directory-p par) 550 (unless (file-directory-p par)
551 (make-directory par parents)))) 551 (make-directory par parents))))
552 (tramp-adb-barf-unless-okay
553 v (format "mkdir %s" (tramp-shell-quote-argument localname))
554 "Couldn't make directory %s" dir)
555 (tramp-flush-file-property v (file-name-directory localname)) 552 (tramp-flush-file-property v (file-name-directory localname))
556 (tramp-flush-directory-property v localname))) 553 (tramp-flush-directory-property v localname)
554 (unless (or (tramp-adb-send-command-and-check
555 v (format "mkdir %s" (tramp-shell-quote-argument localname)))
556 (and parents (file-directory-p dir)))
557 (tramp-error v 'file-error "Couldn't make directory %s" dir))))
557 558
558(defun tramp-adb-handle-delete-directory (directory &optional recursive _trash) 559(defun tramp-adb-handle-delete-directory (directory &optional recursive _trash)
559 "Like `delete-directory' for Tramp files." 560 "Like `delete-directory' for Tramp files."
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 237d6896e2a..2b29a1b55f5 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -416,6 +416,19 @@ Every entry is a list (NAME ADDRESS).")
416(defconst tramp-hal-interface-device "org.freedesktop.Hal.Device" 416(defconst tramp-hal-interface-device "org.freedesktop.Hal.Device"
417 "The device interface of the HAL daemon.") 417 "The device interface of the HAL daemon.")
418 418
419;; "gvfs-<command>" utilities have been deprecated in GVFS 1.31.1. We
420;; must use "gio <command>" tool instead.
421(defconst tramp-gvfs-gio-mapping
422 '(("gvfs-copy" . "copy")
423 ("gvfs-info" . "info")
424 ("gvfs-ls" . "list")
425 ("gvfs-mkdir" . "mkdir")
426 ("gvfs-monitor-file" . "monitor")
427 ("gvfs-move" . "move")
428 ("gvfs-rm" . "remove")
429 ("gvfs-trash" . "trash"))
430 "List of cons cells, mapping \"gvfs-<command>\" to \"gio <command>\".")
431
419(defconst tramp-gvfs-file-attributes 432(defconst tramp-gvfs-file-attributes
420 '("name" 433 '("name"
421 "type" 434 "type"
@@ -1078,9 +1091,12 @@ If FILE-SYSTEM is non-nil, return file system attributes."
1078 ((memq 'change flags) 1091 ((memq 'change flags)
1079 '(created changed changes-done-hint moved deleted)) 1092 '(created changed changes-done-hint moved deleted))
1080 ((memq 'attribute-change flags) '(attribute-changed)))) 1093 ((memq 'attribute-change flags) '(attribute-changed))))
1081 (p (start-process 1094 (p (apply
1082 "gvfs-monitor-file" (generate-new-buffer " *gvfs-monitor-file*") 1095 'start-process
1083 "gvfs-monitor-file" (tramp-gvfs-url-file-name file-name)))) 1096 "gvfs-monitor" (generate-new-buffer " *gvfs-monitor*")
1097 (if (tramp-gvfs-gio-tool-p v)
1098 `("gio" "monitor" ,(tramp-gvfs-url-file-name file-name)))
1099 `("gvfs-monitor-file" (tramp-gvfs-url-file-name file-name)))))
1084 (if (not (processp p)) 1100 (if (not (processp p))
1085 (tramp-error 1101 (tramp-error
1086 v 'file-notify-error "Monitoring not supported for `%s'" file-name) 1102 v 'file-notify-error "Monitoring not supported for `%s'" file-name)
@@ -1190,8 +1206,9 @@ file-notify events."
1190 (when (and parents (not (file-directory-p ldir))) 1206 (when (and parents (not (file-directory-p ldir)))
1191 (make-directory ldir parents)) 1207 (make-directory ldir parents))
1192 ;; Just do it. 1208 ;; Just do it.
1193 (unless (tramp-gvfs-send-command 1209 (unless (or (tramp-gvfs-send-command
1194 v "gvfs-mkdir" (tramp-gvfs-url-file-name dir)) 1210 v "gvfs-mkdir" (tramp-gvfs-url-file-name dir))
1211 (and parents (file-directory-p dir)))
1195 (tramp-error v 'file-error "Couldn't make directory %s" dir)))))) 1212 (tramp-error v 'file-error "Couldn't make directory %s" dir))))))
1196 1213
1197(defun tramp-gvfs-handle-rename-file 1214(defun tramp-gvfs-handle-rename-file
@@ -1785,10 +1802,16 @@ connection if a previous connection has died for some reason."
1785 (tramp-gvfs-get-remote-uid vec 'string) 1802 (tramp-gvfs-get-remote-uid vec 'string)
1786 (tramp-gvfs-get-remote-gid vec 'string)))) 1803 (tramp-gvfs-get-remote-gid vec 'string))))
1787 1804
1805(defun tramp-gvfs-gio-tool-p (vec)
1806 "Check, whether the gio tool is available."
1807 (with-tramp-connection-property vec "gio-tool"
1808 (zerop (tramp-call-process vec "gio" nil nil nil "version"))))
1809
1788(defun tramp-gvfs-send-command (vec command &rest args) 1810(defun tramp-gvfs-send-command (vec command &rest args)
1789 "Send the COMMAND with its ARGS to connection VEC. 1811 "Send the COMMAND with its ARGS to connection VEC.
1790COMMAND is usually a command from the gvfs-* utilities. 1812COMMAND is a command from the gvfs-* utilities. It is replaced
1791`call-process' is applied, and it returns t if the return code is zero." 1813by the corresponding gio tool call if available. `call-process'
1814is applied, and it returns t if the return code is zero."
1792 (let* ((locale (tramp-get-local-locale vec)) 1815 (let* ((locale (tramp-get-local-locale vec))
1793 (process-environment 1816 (process-environment
1794 (append 1817 (append
@@ -1796,6 +1819,11 @@ COMMAND is usually a command from the gvfs-* utilities.
1796 ,(format "LANGUAGE=%s" locale) 1819 ,(format "LANGUAGE=%s" locale)
1797 ,(format "LC_ALL=%s" locale)) 1820 ,(format "LC_ALL=%s" locale))
1798 process-environment))) 1821 process-environment)))
1822 (when (tramp-gvfs-gio-tool-p vec)
1823 ;; Use gio tool.
1824 (setq args (cons (cdr (assoc command tramp-gvfs-gio-mapping)) args)
1825 command "gio"))
1826
1799 (with-current-buffer (tramp-get-connection-buffer vec) 1827 (with-current-buffer (tramp-get-connection-buffer vec)
1800 (tramp-gvfs-maybe-open-connection vec) 1828 (tramp-gvfs-maybe-open-connection vec)
1801 (erase-buffer) 1829 (erase-buffer)
diff --git a/lisp/obsolete/landmark.el b/lisp/obsolete/landmark.el
index 99fd55107ba..7795279bf42 100644
--- a/lisp/obsolete/landmark.el
+++ b/lisp/obsolete/landmark.el
@@ -260,7 +260,7 @@ is non-nil. One interesting value is `turn-on-font-lock'."
260 "Vector recording the actual score of the free squares.") 260 "Vector recording the actual score of the free squares.")
261 261
262 262
263;; The key point point about the algorithm is that, rather than considering 263;; The key point about the algorithm is that, rather than considering
264;; the board as just a set of squares, we prefer to see it as a "space" of 264;; the board as just a set of squares, we prefer to see it as a "space" of
265;; internested 5-tuples of contiguous squares (called qtuples). 265;; internested 5-tuples of contiguous squares (called qtuples).
266;; 266;;
diff --git a/lisp/obsolete/levents.el b/lisp/obsolete/levents.el
index 24de4891ae3..b9b153553d7 100644
--- a/lisp/obsolete/levents.el
+++ b/lisp/obsolete/levents.el
@@ -113,7 +113,7 @@ In actual Lucid Emacs, you MUST NOT use this event object after
113calling this function with it. You will lose. It is not necessary to 113calling this function with it. You will lose. It is not necessary to
114call this function, as event objects are garbage- collected like all 114call this function, as event objects are garbage- collected like all
115other objects; however, it may be more efficient to explicitly 115other objects; however, it may be more efficient to explicitly
116deallocate events when you are sure that that is safe. 116deallocate events when you are sure that this is safe.
117 117
118This emulation does not actually deallocate or reuse events 118This emulation does not actually deallocate or reuse events
119except via garbage collection and `cons'." 119except via garbage collection and `cons'."
diff --git a/lisp/obsolete/otodo-mode.el b/lisp/obsolete/otodo-mode.el
index c7a05ad1459..dd25e336f0a 100644
--- a/lisp/obsolete/otodo-mode.el
+++ b/lisp/obsolete/otodo-mode.el
@@ -164,7 +164,7 @@
164;; might be nicer and to that effect a function has been declared 164;; might be nicer and to that effect a function has been declared
165;; further down in the code. You may wish to auto-load this. 165;; further down in the code. You may wish to auto-load this.
166;; 166;;
167;; Carsten also writes that that *changing* the prefix after the 167;; Carsten also writes that *changing* the prefix after the
168;; todo list is already established is not as simple as changing 168;; todo list is already established is not as simple as changing
169;; the variable - the todo files have to be changed by hand. 169;; the variable - the todo files have to be changed by hand.
170;; 170;;
diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el
index 53538e6a858..eab9f3e313f 100644
--- a/lisp/org/org-faces.el
+++ b/lisp/org/org-faces.el
@@ -291,7 +291,7 @@ determines if it is a foreground or a background color."
291(defcustom org-priority-faces nil 291(defcustom org-priority-faces nil
292 "Faces for specific Priorities. 292 "Faces for specific Priorities.
293This is a list of cons cells, with priority character in the car 293This is a list of cons cells, with priority character in the car
294and faces in the cdr. The face can be a symbol, a color as 294and faces in the cdr. The face can be a symbol, a color
295as a string, or a property list of attributes, like 295as a string, or a property list of attributes, like
296 (:foreground \"blue\" :weight bold :underline t). 296 (:foreground \"blue\" :weight bold :underline t).
297If it is a color string, the variable `org-faces-easy-properties' 297If it is a color string, the variable `org-faces-easy-properties'
diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el
index 360b1bcfdb0..4a8e43db03b 100644
--- a/lisp/org/org-inlinetask.el
+++ b/lisp/org/org-inlinetask.el
@@ -114,7 +114,7 @@ When nil, the first star is not shown."
114(defcustom org-inlinetask-default-state nil 114(defcustom org-inlinetask-default-state nil
115 "Non-nil means make inline tasks have a TODO keyword initially. 115 "Non-nil means make inline tasks have a TODO keyword initially.
116This should be the state `org-inlinetask-insert-task' should use by 116This should be the state `org-inlinetask-insert-task' should use by
117default, or nil of no state should be assigned." 117default, or nil if no state should be assigned."
118 :group 'org-inlinetask 118 :group 'org-inlinetask
119 :version "24.1" 119 :version "24.1"
120 :type '(choice 120 :type '(choice
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index 7c3184543b0..2f5f36e1dbb 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -263,7 +263,7 @@ Other useful commands:\n
263 "Vector recording the actual score of the free squares.") 263 "Vector recording the actual score of the free squares.")
264 264
265 265
266;; The key point point about the algorithm is that, rather than considering 266;; The key point about the algorithm is that, rather than considering
267;; the board as just a set of squares, we prefer to see it as a "space" of 267;; the board as just a set of squares, we prefer to see it as a "space" of
268;; internested 5-tuples of contiguous squares (called qtuples). 268;; internested 5-tuples of contiguous squares (called qtuples).
269;; 269;;
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index f84d94a3e68..82ae1816270 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -619,7 +619,7 @@ COUNT starts with 1. GEN-SEP is used to separate long variable values."
619 '((java-mode ("%sTokenTypes.java") ("%s.java")) 619 '((java-mode ("%sTokenTypes.java") ("%s.java"))
620 (c++-mode ("%sTokenTypes.hpp") ("%s.cpp" "%s.hpp"))) 620 (c++-mode ("%sTokenTypes.hpp") ("%s.cpp" "%s.hpp")))
621 "Language dependent formats which specify generated files. 621 "Language dependent formats which specify generated files.
622Each element in this list looks looks like 622Each element in this list looks like
623 (MAJOR-MODE (VOCAB-FILE-FORMAT...) (CLASS-FILE-FORMAT...)). 623 (MAJOR-MODE (VOCAB-FILE-FORMAT...) (CLASS-FILE-FORMAT...)).
624 624
625The element whose MAJOR-MODE is equal to `antlr-language' is used to 625The element whose MAJOR-MODE is equal to `antlr-language' is used to
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index 6818b5e0b76..df202e9cd2f 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -167,7 +167,7 @@ use c-constant-symbol instead."
167(defmacro defcustom-c-stylevar (name val doc &rest args) 167(defmacro defcustom-c-stylevar (name val doc &rest args)
168 "Define a style variable NAME with VAL and DOC. 168 "Define a style variable NAME with VAL and DOC.
169More precisely, convert the given `:type FOO', mined out of ARGS, 169More precisely, convert the given `:type FOO', mined out of ARGS,
170to an aggregate `:type (radio STYLE (PREAMBLE FOO))', append some 170to an aggregate `:type (radio STYLE (PREAMBLE FOO))', append
171some boilerplate documentation to DOC, arrange for the fallback 171some boilerplate documentation to DOC, arrange for the fallback
172value of NAME to be VAL, and call `custom-declare-variable' to 172value of NAME to be VAL, and call `custom-declare-variable' to
173do the rest of the work. 173do the rest of the work.
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index e956637572c..1681922fa5a 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -480,7 +480,7 @@ Font for POD headers."
480(defcustom cperl-highlight-variables-indiscriminately nil 480(defcustom cperl-highlight-variables-indiscriminately nil
481 "Non-nil means perform additional highlighting on variables. 481 "Non-nil means perform additional highlighting on variables.
482Currently only changes how scalar variables are highlighted. 482Currently only changes how scalar variables are highlighted.
483Note that that variable is only read at initialization time for 483Note that the variable is only read at initialization time for
484the variable `cperl-font-lock-keywords-2', so changing it after you've 484the variable `cperl-font-lock-keywords-2', so changing it after you've
485entered CPerl mode the first time will have no effect." 485entered CPerl mode the first time will have no effect."
486 :type 'boolean 486 :type 'boolean
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el
index 52cb1985327..ab60855b217 100644
--- a/lisp/progmodes/flymake-proc.el
+++ b/lisp/progmodes/flymake-proc.el
@@ -626,7 +626,7 @@ Create parent directories as needed."
626 "Tell Flymake UI about a fatal PROBLEM with this backend. 626 "Tell Flymake UI about a fatal PROBLEM with this backend.
627May only be called in a dynamic environment where 627May only be called in a dynamic environment where
628`flymake-proc--report-fn' is bound." 628`flymake-proc--report-fn' is bound."
629 (flymake-log 0 "%s: %s" problem explanation) 629 (flymake-log 1 "%s: %s" problem explanation)
630 (if (and (boundp 'flymake-proc--report-fn) 630 (if (and (boundp 'flymake-proc--report-fn)
631 flymake-proc--report-fn) 631 flymake-proc--report-fn)
632 (funcall flymake-proc--report-fn :panic 632 (funcall flymake-proc--report-fn :panic
@@ -766,7 +766,7 @@ can also be executed interactively independently of
766 (unwind-protect 766 (unwind-protect
767 (cond 767 (cond
768 ((not cmd-and-args) 768 ((not cmd-and-args)
769 (flymake-log 0 "init function %s for %s failed, cleaning up" 769 (flymake-log 1 "init function %s for %s failed, cleaning up"
770 init-f buffer-file-name)) 770 init-f buffer-file-name))
771 (t 771 (t
772 (setq proc 772 (setq proc
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 45f0adfeba1..e4c6a38a77e 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -123,10 +123,14 @@ If nil, never start checking buffer automatically like this."
123(make-obsolete-variable 'flymake-gui-warnings-enabled 123(make-obsolete-variable 'flymake-gui-warnings-enabled
124 "it no longer has any effect." "26.1") 124 "it no longer has any effect." "26.1")
125 125
126(defcustom flymake-start-syntax-check-on-find-file t 126(defcustom flymake-start-on-flymake-mode t
127 "Start syntax check on find file." 127 "Start syntax check when `flymake-mode'is enabled.
128Specifically, start it when the buffer is actually displayed."
128 :type 'boolean) 129 :type 'boolean)
129 130
131(define-obsolete-variable-alias 'flymake-start-syntax-check-on-find-file
132 'flymake-start-on-flymake-mode "26.1")
133
130(defcustom flymake-log-level -1 134(defcustom flymake-log-level -1
131 "Obsolete and ignored variable." 135 "Obsolete and ignored variable."
132 :type 'integer) 136 :type 'integer)
@@ -138,24 +142,25 @@ If nil, never start checking buffer automatically like this."
138 "If non-nil, moving to errors wraps around buffer boundaries." 142 "If non-nil, moving to errors wraps around buffer boundaries."
139 :type 'boolean) 143 :type 'boolean)
140 144
141(define-fringe-bitmap 'flymake-double-exclamation-mark 145(when (fboundp 'define-fringe-bitmap)
142 (vector #b00000000 146 (define-fringe-bitmap 'flymake-double-exclamation-mark
143 #b00000000 147 (vector #b00000000
144 #b00000000 148 #b00000000
145 #b00000000 149 #b00000000
146 #b01100110 150 #b00000000
147 #b01100110 151 #b01100110
148 #b01100110 152 #b01100110
149 #b01100110 153 #b01100110
150 #b01100110 154 #b01100110
151 #b01100110 155 #b01100110
152 #b01100110 156 #b01100110
153 #b01100110 157 #b01100110
154 #b00000000 158 #b01100110
155 #b01100110 159 #b00000000
156 #b00000000 160 #b01100110
157 #b00000000 161 #b00000000
158 #b00000000)) 162 #b00000000
163 #b00000000)))
159 164
160(defvar-local flymake-timer nil 165(defvar-local flymake-timer nil
161 "Timer for starting syntax check.") 166 "Timer for starting syntax check.")
@@ -318,12 +323,12 @@ region is invalid."
318(defvar flymake-diagnostic-functions nil 323(defvar flymake-diagnostic-functions nil
319 "Special hook of Flymake backends that check a buffer. 324 "Special hook of Flymake backends that check a buffer.
320 325
321The functions in this hook diagnose problems in a buffers 326The functions in this hook diagnose problems in a buffer's
322contents and provide information to the Flymake user interface 327contents and provide information to the Flymake user interface
323about where and how to annotate problems diagnosed in a buffer. 328about where and how to annotate problems diagnosed in a buffer.
324 329
325Whenever Flymake or the user decides to re-check the buffer, each 330Each backend function must be prepared to accept an arbitrary
326function is called with an arbitrary number of arguments: 331number of arguments:
327 332
328* the first argument is always REPORT-FN, a callback function 333* the first argument is always REPORT-FN, a callback function
329 detailed below; 334 detailed below;
@@ -333,11 +338,12 @@ function is called with an arbitrary number of arguments:
333 no such arguments, but backend functions must be prepared to 338 no such arguments, but backend functions must be prepared to
334 accept and possibly ignore any number of them. 339 accept and possibly ignore any number of them.
335 340
336Backend functions are expected to initiate the buffer check, but 341Whenever Flymake or the user decides to re-check the buffer,
337aren't required to complete it check before exiting: if the 342backend functions are called as detailed above and are expected
338computation involved is expensive, especially for large buffers, 343to initiate this check, but aren't required to complete it before
339that task can be scheduled for the future using asynchronous 344exiting: if the computation involved is expensive, especially for
340processes or other asynchronous mechanisms. 345large buffers, that task can be scheduled for the future using
346asynchronous processes or other asynchronous mechanisms.
341 347
342In any case, backend functions are expected to return quickly or 348In any case, backend functions are expected to return quickly or
343signal an error, in which case the backend is disabled. Flymake 349signal an error, in which case the backend is disabled. Flymake
@@ -371,10 +377,10 @@ Currently accepted values for REPORT-ACTION are:
371 377
372Currently accepted REPORT-KEY arguments are: 378Currently accepted REPORT-KEY arguments are:
373 379
374* :explanation’: value should give user-readable details of 380* `:explanation' value should give user-readable details of
375 the situation encountered, if any. 381 the situation encountered, if any.
376 382
377* :force: value should be a boolean suggesting that Flymake 383* `:force': value should be a boolean suggesting that Flymake
378 consider the report even if it was somehow unexpected.") 384 consider the report even if it was somehow unexpected.")
379 385
380(defvar flymake-diagnostic-types-alist 386(defvar flymake-diagnostic-types-alist
@@ -403,12 +409,12 @@ properties are:
403 409
404* `severity', a non-negative integer specifying the diagnostic's 410* `severity', a non-negative integer specifying the diagnostic's
405 severity. The higher, the more serious. If the overlay 411 severity. The higher, the more serious. If the overlay
406 priority `priority' is not specified, `severity' is used to set 412 property `priority' is not specified, `severity' is used to set
407 it and help sort overlapping overlays. 413 it and help sort overlapping overlays.
408 414
409* `flymake-category', a symbol whose property list is considered 415* `flymake-category', a symbol whose property list is considered
410 as a default for missing values of any other properties. This 416 a default for missing values of any other properties. This is
411 is useful to backend authors when creating new diagnostic types 417 useful to backend authors when creating new diagnostic types
412 that differ from an existing type by only a few properties.") 418 that differ from an existing type by only a few properties.")
413 419
414(put 'flymake-error 'face 'flymake-error) 420(put 'flymake-error 'face 'flymake-error)
@@ -493,8 +499,7 @@ associated `flymake-category' return DEFAULT."
493 (lambda (_window _ov pos) 499 (lambda (_window _ov pos)
494 (mapconcat 500 (mapconcat
495 (lambda (ov) 501 (lambda (ov)
496 (let ((diag (overlay-get ov 'flymake--diagnostic))) 502 (overlay-get ov 'flymake-text))
497 (flymake--diag-text diag)))
498 (flymake--overlays :beg pos) 503 (flymake--overlays :beg pos)
499 "\n"))) 504 "\n")))
500 (default-maybe 'severity (warning-numeric-level :error)) 505 (default-maybe 'severity (warning-numeric-level :error))
@@ -503,6 +508,7 @@ associated `flymake-category' return DEFAULT."
503 ;; 508 ;;
504 (overlay-put ov 'evaporate t) 509 (overlay-put ov 'evaporate t)
505 (overlay-put ov 'flymake t) 510 (overlay-put ov 'flymake t)
511 (overlay-put ov 'flymake-text (flymake--diag-text diagnostic))
506 (overlay-put ov 'flymake--diagnostic diagnostic))) 512 (overlay-put ov 'flymake--diagnostic diagnostic)))
507 513
508;; Nothing in Flymake uses this at all any more, so this is just for 514;; Nothing in Flymake uses this at all any more, so this is just for
@@ -605,7 +611,12 @@ not expected."
605 (flymake-log :debug "backend %s reported %d diagnostics in %.2f second(s)" 611 (flymake-log :debug "backend %s reported %d diagnostics in %.2f second(s)"
606 backend 612 backend
607 (length new-diags) 613 (length new-diags)
608 (- (float-time) flymake-check-start-time))))))))) 614 (- (float-time) flymake-check-start-time)))
615 (when (and (get-buffer (flymake--diagnostics-buffer-name))
616 (get-buffer-window (flymake--diagnostics-buffer-name))
617 (null (cl-set-difference (flymake-running-backends)
618 (flymake-reporting-backends))))
619 (flymake-show-diagnostics-buffer))))))))
609 620
610(defun flymake-make-report-fn (backend &optional token) 621(defun flymake-make-report-fn (backend &optional token)
611 "Make a suitable anonymous report function for BACKEND. 622 "Make a suitable anonymous report function for BACKEND.
@@ -618,24 +629,42 @@ different runs of the same backend."
618 (with-current-buffer buffer 629 (with-current-buffer buffer
619 (apply #'flymake--handle-report backend token args)))))) 630 (apply #'flymake--handle-report backend token args))))))
620 631
621(defun flymake--collect (fn) 632(defun flymake--collect (fn &optional message-prefix)
633 "Collect Flymake backends matching FN.
634If MESSAGE-PREFIX, echo a message using that prefix"
635 (unless flymake--backend-state
636 (user-error "Flymake is not initialized"))
622 (let (retval) 637 (let (retval)
623 (maphash (lambda (backend state) 638 (maphash (lambda (backend state)
624 (when (funcall fn state) (push backend retval))) 639 (when (funcall fn state) (push backend retval)))
625 flymake--backend-state) 640 flymake--backend-state)
641 (when message-prefix
642 (message "%s%s"
643 message-prefix
644 (mapconcat (lambda (s) (format "%s" s))
645 retval ", ")))
626 retval)) 646 retval))
627 647
628(defun flymake-running-backends () 648(defun flymake-running-backends ()
629 "Compute running Flymake backends in current buffer." 649 "Compute running Flymake backends in current buffer."
630 (flymake--collect #'flymake--backend-state-running)) 650 (interactive)
651 (flymake--collect #'flymake--backend-state-running
652 (and (called-interactively-p 'interactive)
653 "Running backends: ")))
631 654
632(defun flymake-disabled-backends () 655(defun flymake-disabled-backends ()
633 "Compute disabled Flymake backends in current buffer." 656 "Compute disabled Flymake backends in current buffer."
634 (flymake--collect #'flymake--backend-state-disabled)) 657 (interactive)
658 (flymake--collect #'flymake--backend-state-disabled
659 (and (called-interactively-p 'interactive)
660 "Disabled backends: ")))
635 661
636(defun flymake-reporting-backends () 662(defun flymake-reporting-backends ()
637 "Compute reporting Flymake backends in current buffer." 663 "Compute reporting Flymake backends in current buffer."
638 (flymake--collect #'flymake--backend-state-reported-p)) 664 (interactive)
665 (flymake--collect #'flymake--backend-state-reported-p
666 (and (called-interactively-p 'interactive)
667 "Reporting backends: ")))
639 668
640(defun flymake--disable-backend (backend &optional explanation) 669(defun flymake--disable-backend (backend &optional explanation)
641 "Disable BACKEND because EXPLANATION. 670 "Disable BACKEND because EXPLANATION.
@@ -670,41 +699,101 @@ If it is running also stop it."
670 (flymake--disable-backend backend err))))) 699 (flymake--disable-backend backend err)))))
671 700
672(defun flymake-start (&optional deferred force) 701(defun flymake-start (&optional deferred force)
673 "Start a syntax check. 702 "Start a syntax check for the current buffer.
674Start it immediately, or after current command if DEFERRED is 703DEFERRED is a list of symbols designating conditions to wait for
675non-nil. With optional FORCE run even disabled backends. 704before actually starting the check. If it is nil (the list is
705empty), start it immediately, else defer the check to when those
706conditions are met. Currently recognized conditions are
707`post-command', for waiting until the current command is over,
708`on-display', for waiting until the buffer is actually displayed
709in a window. If DEFERRED is t, wait for all known conditions.
710
711With optional FORCE run even disabled backends.
676 712
677Interactively, with a prefix arg, FORCE is t." 713Interactively, with a prefix arg, FORCE is t."
678 (interactive (list nil current-prefix-arg)) 714 (interactive (list nil current-prefix-arg))
679 (cl-labels 715 (let ((deferred (if (eq t deferred)
680 ((start 716 '(post-command on-display)
681 () 717 deferred))
682 (remove-hook 'post-command-hook #'start 'local) 718 (buffer (current-buffer)))
683 (setq flymake-check-start-time (float-time)) 719 (cl-labels
684 (run-hook-wrapped 720 ((start-post-command
685 'flymake-diagnostic-functions 721 ()
686 (lambda (backend) 722 (remove-hook 'post-command-hook #'start-post-command
687 (cond 723 nil)
688 ((and (not force) 724 (with-current-buffer buffer
689 (flymake--with-backend-state backend state 725 (flymake-start (remove 'post-command deferred) force)))
690 (flymake--backend-state-disabled state))) 726 (start-on-display
691 (flymake-log :debug "Backend %s is disabled, not starting" 727 ()
692 backend)) 728 (remove-hook 'window-configuration-change-hook #'start-on-display
729 'local)
730 (flymake-start (remove 'on-display deferred) force)))
731 (cond ((and (memq 'post-command deferred)
732 this-command)
733 (add-hook 'post-command-hook
734 #'start-post-command
735 'append nil))
736 ((and (memq 'on-display deferred)
737 (not (get-buffer-window (current-buffer))))
738 (add-hook 'window-configuration-change-hook
739 #'start-on-display
740 'append 'local))
693 (t 741 (t
694 (flymake--run-backend backend))) 742 (setq flymake-check-start-time (float-time))
695 nil)))) 743 (run-hook-wrapped
696 (if (and deferred 744 'flymake-diagnostic-functions
697 this-command) 745 (lambda (backend)
698 (add-hook 'post-command-hook #'start 'append 'local) 746 (cond
699 (start)))) 747 ((and (not force)
748 (flymake--with-backend-state backend state
749 (flymake--backend-state-disabled state)))
750 (flymake-log :debug "Backend %s is disabled, not starting"
751 backend))
752 (t
753 (flymake--run-backend backend)))
754 nil)))))))
700 755
701(defvar flymake-mode-map 756(defvar flymake-mode-map
702 (let ((map (make-sparse-keymap))) map) 757 (let ((map (make-sparse-keymap))) map)
703 "Keymap for `flymake-mode'") 758 "Keymap for `flymake-mode'")
704 759
705;;;###autoload 760;;;###autoload
706(define-minor-mode flymake-mode nil 761(define-minor-mode flymake-mode
707 :group 'flymake :lighter flymake--mode-line-format :keymap flymake-mode-map 762 "Toggle Flymake mode on or off.
763With a prefix argument ARG, enable Flymake mode if ARG is
764positive, and disable it otherwise. If called from Lisp, enable
765the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
766
767Flymake is an Emacs minor mode for on-the-fly syntax checking.
768Flymake collects diagnostic information from multiple sources,
769called backends, and visually annotates the buffer with the
770results.
771
772Flymake performs these checks while the user is editing. The
773customization variables `flymake-start-on-flymake-mode',
774`flymake-no-changes-timeout' and
775`flymake-start-syntax-check-on-newline' determine the exact
776circumstances whereupon Flymake decides to initiate a check of
777the buffer.
778
779The commands `flymake-goto-next-error' and
780`flymake-goto-prev-error' can be used to navigate among Flymake
781diagnostics annotated in the buffer.
782
783The visual appearance of each type of diagnostic can be changed
784in the variable `flymake-diagnostic-types-alist'.
785
786Activation or deactivation of backends used by Flymake in each
787buffer happens via the special hook
788`flymake-diagnostic-functions'.
789
790Some backends may take longer than others to respond or complete,
791and some may decide to disable themselves if they are not
792suitable for the current buffer. The commands
793`flymake-running-backends', `flymake-disabled-backends' and
794`flymake-reporting-backends' summarize the situation, as does the
795special *Flymake log* buffer." :group 'flymake :lighter
796 flymake--mode-line-format :keymap flymake-mode-map
708 (cond 797 (cond
709 ;; Turning the mode ON. 798 ;; Turning the mode ON.
710 (flymake-mode 799 (flymake-mode
@@ -714,8 +803,7 @@ Interactively, with a prefix arg, FORCE is t."
714 803
715 (setq flymake--backend-state (make-hash-table)) 804 (setq flymake--backend-state (make-hash-table))
716 805
717 (when flymake-start-syntax-check-on-find-file 806 (when flymake-start-on-flymake-mode (flymake-start t)))
718 (flymake-start)))
719 807
720 ;; Turning the mode OFF. 808 ;; Turning the mode OFF.
721 (t 809 (t
@@ -748,7 +836,7 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
748 (flymake-log 836 (flymake-log
749 :debug "starting syntax check after idle for %s seconds" 837 :debug "starting syntax check after idle for %s seconds"
750 flymake-no-changes-timeout) 838 flymake-no-changes-timeout)
751 (flymake-start)) 839 (flymake-start t))
752 (setq flymake-timer nil)))) 840 (setq flymake-timer nil))))
753 (current-buffer))))) 841 (current-buffer)))))
754 842
@@ -770,13 +858,13 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
770 (let((new-text (buffer-substring start stop))) 858 (let((new-text (buffer-substring start stop)))
771 (when (and flymake-start-syntax-check-on-newline (equal new-text "\n")) 859 (when (and flymake-start-syntax-check-on-newline (equal new-text "\n"))
772 (flymake-log :debug "starting syntax check as new-line has been seen") 860 (flymake-log :debug "starting syntax check as new-line has been seen")
773 (flymake-start 'deferred)) 861 (flymake-start t))
774 (flymake--schedule-timer-maybe))) 862 (flymake--schedule-timer-maybe)))
775 863
776(defun flymake-after-save-hook () 864(defun flymake-after-save-hook ()
777 (when flymake-mode 865 (when flymake-mode
778 (flymake-log :debug "starting syntax check as buffer was saved") 866 (flymake-log :debug "starting syntax check as buffer was saved")
779 (flymake-start))) 867 (flymake-start t)))
780 868
781(defun flymake-kill-buffer-hook () 869(defun flymake-kill-buffer-hook ()
782 (when flymake-timer 870 (when flymake-timer
@@ -792,10 +880,10 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
792(defun flymake-goto-next-error (&optional n filter interactive) 880(defun flymake-goto-next-error (&optional n filter interactive)
793 "Go to Nth next Flymake error in buffer matching FILTER. 881 "Go to Nth next Flymake error in buffer matching FILTER.
794Interactively, always move to the next error. With a prefix arg, 882Interactively, always move to the next error. With a prefix arg,
795skip any diagnostics with a severity less than :warning. 883skip any diagnostics with a severity less than `:warning'.
796 884
797If flymake-wrap-around is non-nil and no more next errors, 885If `flymake-wrap-around' is non-nil and no more next errors,
798resumes search from top 886resumes search from top.
799 887
800FILTER is a list of diagnostic types found in 888FILTER is a list of diagnostic types found in
801`flymake-diagnostic-types-alist', or nil, if no filter is to be 889`flymake-diagnostic-types-alist', or nil, if no filter is to be
@@ -835,6 +923,7 @@ applied."
835 (goto-char (overlay-start target)) 923 (goto-char (overlay-start target))
836 (when interactive 924 (when interactive
837 (message 925 (message
926 "%s"
838 (funcall (overlay-get target 'help-echo) 927 (funcall (overlay-get target 'help-echo)
839 nil nil (point))))) 928 nil nil (point)))))
840 (interactive 929 (interactive
@@ -846,9 +935,9 @@ applied."
846(defun flymake-goto-prev-error (&optional n filter interactive) 935(defun flymake-goto-prev-error (&optional n filter interactive)
847 "Go to Nth previous Flymake error in buffer matching FILTER. 936 "Go to Nth previous Flymake error in buffer matching FILTER.
848Interactively, always move to the previous error. With a prefix 937Interactively, always move to the previous error. With a prefix
849arg, skip any diagnostics with a severity less than :warning. 938arg, skip any diagnostics with a severity less than `:warning'.
850 939
851If flymake-wrap-around is non-nil and no more previous errors, 940If `flymake-wrap-around' is non-nil and no more previous errors,
852resumes search from bottom. 941resumes search from bottom.
853 942
854FILTER is a list of diagnostic types found in 943FILTER is a list of diagnostic types found in
@@ -868,6 +957,7 @@ applied."
868 [ "Go to previous error" flymake-goto-prev-error t ] 957 [ "Go to previous error" flymake-goto-prev-error t ]
869 [ "Check now" flymake-start t ] 958 [ "Check now" flymake-start t ]
870 [ "Go to log buffer" flymake-switch-to-log-buffer t ] 959 [ "Go to log buffer" flymake-switch-to-log-buffer t ]
960 [ "Show error buffer" flymake-show-diagnostics-buffer t ]
871 "--" 961 "--"
872 [ "Turn off Flymake" flymake-mode t ])) 962 [ "Turn off Flymake" flymake-mode t ]))
873 963
@@ -897,11 +987,16 @@ applied."
897 ,(concat (format "%s known backends\n" (length known)) 987 ,(concat (format "%s known backends\n" (length known))
898 (format "%s running\n" (length running)) 988 (format "%s running\n" (length running))
899 (format "%s disabled\n" (length disabled)) 989 (format "%s disabled\n" (length disabled))
900 "mouse-1: go to log buffer ") 990 "mouse-1: Display minor mode menu\n"
991 "mouse-2: Show help for minor mode")
901 keymap 992 keymap
902 ,(let ((map (make-sparse-keymap))) 993 ,(let ((map (make-sparse-keymap)))
903 (define-key map [mode-line down-mouse-1] 994 (define-key map [mode-line down-mouse-1]
904 flymake-menu) 995 flymake-menu)
996 (define-key map [mode-line mouse-2]
997 (lambda ()
998 (interactive)
999 (describe-function 'flymake-mode)))
905 map)) 1000 map))
906 ,@(pcase-let ((`(,ind ,face ,explain) 1001 ,@(pcase-let ((`(,ind ,face ,explain)
907 (cond ((null known) 1002 (cond ((null known)
@@ -952,13 +1047,15 @@ applied."
952 ,(let ((map (make-sparse-keymap)) 1047 ,(let ((map (make-sparse-keymap))
953 (type type)) 1048 (type type))
954 (define-key map [mode-line mouse-4] 1049 (define-key map [mode-line mouse-4]
955 (lambda (_event) 1050 (lambda (event)
956 (interactive "e") 1051 (interactive "e")
957 (flymake-goto-prev-error 1 (list type) t))) 1052 (with-selected-window (posn-window (event-start event))
1053 (flymake-goto-prev-error 1 (list type) t))))
958 (define-key map [mode-line mouse-5] 1054 (define-key map [mode-line mouse-5]
959 (lambda (_event) 1055 (lambda (event)
960 (interactive "e") 1056 (interactive "e")
961 (flymake-goto-next-error 1 (list type) t))) 1057 (with-selected-window (posn-window (event-start event))
1058 (flymake-goto-next-error 1 (list type) t))))
962 map) 1059 map)
963 help-echo 1060 help-echo
964 ,(concat (format "%s diagnostics of type %s\n" 1061 ,(concat (format "%s diagnostics of type %s\n"
@@ -976,6 +1073,102 @@ applied."
976 '(:propertize " ")) 1073 '(:propertize " "))
977 (:propertize "]"))))))) 1074 (:propertize "]")))))))
978 1075
1076;;; Diagnostics buffer
1077
1078(defvar-local flymake--diagnostics-buffer-source nil)
1079
1080(defvar flymake-diagnostics-buffer-mode-map
1081 (let ((map (make-sparse-keymap)))
1082 (define-key map (kbd "RET") 'flymake-goto-diagnostic)
1083 (define-key map (kbd "SPC") 'flymake-show-diagnostic)
1084 map))
1085
1086(defun flymake-show-diagnostic (pos &optional other-window)
1087 "Show location of diagnostic at POS."
1088 (interactive (list (point) t))
1089 (let* ((id (or (tabulated-list-get-id pos)
1090 (user-error "Nothing at point")))
1091 (overlay (plist-get id :overlay)))
1092 (with-current-buffer (overlay-buffer overlay)
1093 (with-selected-window
1094 (display-buffer (current-buffer) other-window)
1095 (goto-char (overlay-start overlay))
1096 (pulse-momentary-highlight-region (overlay-start overlay)
1097 (overlay-end overlay)
1098 'highlight))
1099 (current-buffer))))
1100
1101(defun flymake-goto-diagnostic (pos)
1102 "Show location of diagnostic at POS.
1103POS can be a buffer position or a button"
1104 (interactive "d")
1105 (pop-to-buffer
1106 (flymake-show-diagnostic (if (button-type pos) (button-start pos) pos))))
1107
1108(defun flymake--diagnostics-buffer-entries ()
1109 (with-current-buffer flymake--diagnostics-buffer-source
1110 (cl-loop for ov in (flymake--overlays)
1111 for diag = (overlay-get ov
1112 'flymake--diagnostic)
1113 for (line . col) =
1114 (save-excursion
1115 (goto-char (overlay-start ov))
1116 (cons (line-number-at-pos)
1117 (- (point)
1118 (line-beginning-position))))
1119 for type = (flymake--diag-type diag)
1120 collect
1121 (list (list :overlay ov
1122 :line line
1123 :severity (flymake--lookup-type-property
1124 type
1125 'severity (warning-numeric-level :error)))
1126 `[,(format "%s" line)
1127 ,(format "%s" col)
1128 ,(propertize (format "%s" type)
1129 'face (flymake--lookup-type-property
1130 type 'mode-line-face 'flymake-error))
1131 (,(format "%s" (flymake--diag-text diag))
1132 mouse-face highlight
1133 help-echo "mouse-2: visit this diagnostic"
1134 face nil
1135 action flymake-goto-diagnostic
1136 mouse-action flymake-goto-diagnostic)]))))
1137
1138(define-derived-mode flymake-diagnostics-buffer-mode tabulated-list-mode
1139 "Flymake diagnostics"
1140 "A mode for listing Flymake diagnostics."
1141 (setq tabulated-list-format
1142 `[("Line" 5 (lambda (l1 l2)
1143 (< (plist-get (car l1) :line)
1144 (plist-get (car l2) :line)))
1145 :right-align t)
1146 ("Col" 3 nil :right-align t)
1147 ("Type" 8 (lambda (l1 l2)
1148 (< (plist-get (car l1) :severity)
1149 (plist-get (car l2) :severity))))
1150 ("Message" 0 t)])
1151 (setq tabulated-list-entries
1152 'flymake--diagnostics-buffer-entries)
1153 (tabulated-list-init-header))
1154
1155(defun flymake--diagnostics-buffer-name ()
1156 (format "*Flymake diagnostics for %s*" (current-buffer)))
1157
1158(defun flymake-show-diagnostics-buffer ()
1159 "Show a list of Flymake diagnostics for current buffer."
1160 (interactive)
1161 (let* ((name (flymake--diagnostics-buffer-name))
1162 (source (current-buffer))
1163 (target (or (get-buffer name)
1164 (with-current-buffer (get-buffer-create name)
1165 (flymake-diagnostics-buffer-mode)
1166 (setq flymake--diagnostics-buffer-source source)
1167 (current-buffer)))))
1168 (with-current-buffer target
1169 (revert-buffer)
1170 (display-buffer (current-buffer)))))
1171
979(provide 'flymake) 1172(provide 'flymake)
980 1173
981(require 'flymake-proc) 1174(require 'flymake-proc)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 01bdb04714f..d0404fdeaf4 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -903,7 +903,8 @@ substitution string. Note dynamic scoping of variables.")
903 (read-regexp "Search for" 'grep-tag-default 'grep-regexp-history)) 903 (read-regexp "Search for" 'grep-tag-default 'grep-regexp-history))
904 904
905(defun grep-read-files (regexp) 905(defun grep-read-files (regexp)
906 "Read files arg for interactive grep." 906 "Read a file-name pattern arg for interactive grep.
907The pattern can include shell wildcards."
907 (let* ((bn (or (buffer-file-name) 908 (let* ((bn (or (buffer-file-name)
908 (replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name)))) 909 (replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name))))
909 (fn (and bn 910 (fn (and bn
@@ -936,7 +937,7 @@ substitution string. Note dynamic scoping of variables.")
936 (car (car grep-files-aliases)))) 937 (car (car grep-files-aliases))))
937 (files (completing-read 938 (files (completing-read
938 (concat "Search for \"" regexp 939 (concat "Search for \"" regexp
939 "\" in files" 940 "\" in files matching wildcard"
940 (if default (concat " (default " default ")")) 941 (if default (concat " (default " default ")"))
941 ": ") 942 ": ")
942 'read-file-name-internal 943 'read-file-name-internal
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 9aa5134ca0d..f79d9a47d31 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -640,10 +640,14 @@ The type returned can be `comment', `string' or `paren'."
640 ((python-rx string-delimiter) 640 ((python-rx string-delimiter)
641 (0 (ignore (python-syntax-stringify)))))) 641 (0 (ignore (python-syntax-stringify))))))
642 642
643(defconst python--prettify-symbols-alist 643(defvar python-prettify-symbols-alist
644 '(("lambda" . ?λ) 644 '(("lambda" . ?λ)
645 ("and" . ?∧) 645 ("and" . ?∧)
646 ("or" . ?∨))) 646 ("or" . ?∨))
647 "Value for `prettify-symbols-alist' in `python-mode'.")
648
649(define-obsolete-variable-alias 'python--prettify-symbols-alist
650 'python-prettify-symbols-alist "26.1")
647 651
648(defsubst python-syntax-count-quotes (quote-char &optional point limit) 652(defsubst python-syntax-count-quotes (quote-char &optional point limit)
649 "Count number of quotes around point (max is 3). 653 "Count number of quotes around point (max is 3).
diff --git a/lisp/subr.el b/lisp/subr.el
index c1eae8d752b..a6c998e9be2 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -110,8 +110,7 @@ BODY should be a list of Lisp expressions.
110 110
111\(fn ARGS [DOCSTRING] [INTERACTIVE] BODY)" 111\(fn ARGS [DOCSTRING] [INTERACTIVE] BODY)"
112 (declare (doc-string 2) (indent defun) 112 (declare (doc-string 2) (indent defun)
113 (debug (&define lambda-list 113 (debug (&define lambda-list lambda-doc
114 [&optional stringp]
115 [&optional ("interactive" interactive)] 114 [&optional ("interactive" interactive)]
116 def-body))) 115 def-body)))
117 ;; Note that this definition should not use backquotes; subr.el should not 116 ;; Note that this definition should not use backquotes; subr.el should not
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el
index abcd149acd4..1ce82200b38 100644
--- a/lisp/term/tvi970.el
+++ b/lisp/term/tvi970.el
@@ -36,7 +36,7 @@
36 ;; ("\eOR" [kp-f3]) 36 ;; ("\eOR" [kp-f3])
37 ;; ("\eOS" [kp-f4]) 37 ;; ("\eOS" [kp-f4])
38 38
39 ;; These might bre set by terminfo. 39 ;; These might be set by terminfo.
40 ("\e[H" [home]) 40 ("\e[H" [home])
41 ("\e[Z" [backtab]) 41 ("\e[Z" [backtab])
42 ("\e[i" [print]) 42 ("\e[i" [print])
@@ -45,13 +45,13 @@
45 ("\e[M" [deleteline]) 45 ("\e[M" [deleteline])
46 ("\e[U" [next]) ;; actually the `page' key 46 ("\e[U" [next]) ;; actually the `page' key
47 47
48 ;; These won't be set up by either 48 ;; These won't be set up by either.
49 ("\eOm" [kp-subtract]) 49 ("\eOm" [kp-subtract])
50 ("\eOl" [kp-separator]) 50 ("\eOl" [kp-separator])
51 ("\eOn" [kp-decimal]) 51 ("\eOn" [kp-decimal])
52 ("\eOM" [kp-enter]) 52 ("\eOM" [kp-enter])
53 53
54 ;; These won't be set up by either either 54 ;; These won't be set up by either.
55 ("\e[K" [key_eol]) ;; Not an X keysym 55 ("\e[K" [key_eol]) ;; Not an X keysym
56 ("\e[J" [key_eos]) ;; Not an X keysym 56 ("\e[J" [key_eos]) ;; Not an X keysym
57 ("\e[2J" [key_clear]) ;; Not an X keysym 57 ("\e[2J" [key_clear]) ;; Not an X keysym
diff --git a/lisp/textmodes/less-css-mode.el b/lisp/textmodes/less-css-mode.el
index b665f917d3a..d31414e3a4b 100644
--- a/lisp/textmodes/less-css-mode.el
+++ b/lisp/textmodes/less-css-mode.el
@@ -129,7 +129,7 @@ variable in most cases is likely to be via directory local
129variables. 129variables.
130 130
131This can be also be set to a full path, or a relative path. If 131This can be also be set to a full path, or a relative path. If
132the path is relative, it will be relative to the the current 132the path is relative, it will be relative to the current
133directory by default." 133directory by default."
134 :type 'file) 134 :type 'file)
135;;;###autoload 135;;;###autoload
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index 0fb120ec80a..60e9bbb5f5c 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -66,7 +66,7 @@
66(defvar picture-desired-column 0 66(defvar picture-desired-column 0
67 "Desired current column for Picture mode. 67 "Desired current column for Picture mode.
68When a cursor is on a wide-column character (e.g. Chinese, 68When a cursor is on a wide-column character (e.g. Chinese,
69Japanese, Korean), this may may be different from `current-column'.") 69Japanese, Korean), this may be different from `current-column'.")
70 70
71 71
72(defun picture-update-desired-column (adjust-to-current) 72(defun picture-update-desired-column (adjust-to-current)
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 5eb64c82b94..f1a30048849 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -3450,7 +3450,7 @@ applied to each line like this
3450COUNT is 0 before the first paragraph and increments for every 3450COUNT is 0 before the first paragraph and increments for every
3451paragraph found on level IND. IN-FIRST is non-nil if this is the 3451paragraph found on level IND. IN-FIRST is non-nil if this is the
3452first line of such a paragraph. IN-SUB is non-nil if this line 3452first line of such a paragraph. IN-SUB is non-nil if this line
3453is part of a sub-block while IN-SUPER is non-nil of this line is 3453is part of a sub-block while IN-SUPER is non-nil if this line is
3454part of a less indented block (super-block). IN-EMPTY is non-nil 3454part of a less indented block (super-block). IN-EMPTY is non-nil
3455if this line is empty where an empty line is considered being 3455if this line is empty where an empty line is considered being
3456part of the previous block. RELIND is nil for an empty line, 0 3456part of the previous block. RELIND is nil for an empty line, 0
diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el
index 9575b5f7cab..41dc9401c0a 100644
--- a/lisp/vc/pcvs-defs.el
+++ b/lisp/vc/pcvs-defs.el
@@ -269,7 +269,7 @@ This variable is buffer local and only used in the *cvs* buffer.")
269 "Regexp matching the possible names of locks in the CVS repository.") 269 "Regexp matching the possible names of locks in the CVS repository.")
270 270
271(defconst cvs-cursor-column 22 271(defconst cvs-cursor-column 22
272 "Column to position cursor in in `cvs-mode'.") 272 "Column to position cursor in, in `cvs-mode'.")
273 273
274;;;; 274;;;;
275;;;; Global internal variables 275;;;; Global internal variables
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index d268e1a3fe7..d704cfa4e8f 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -278,6 +278,8 @@ which is the \"1006\" extension implemented in Xterm >= 277."
278 (last-name (symbol-name last-type)) 278 (last-name (symbol-name last-type))
279 (last-time (nth 1 last-click)) 279 (last-time (nth 1 last-click))
280 (click-count (nth 2 last-click)) 280 (click-count (nth 2 last-click))
281 (last-x (nth 3 last-click))
282 (last-y (nth 4 last-click))
281 (this-time (float-time)) 283 (this-time (float-time))
282 (name (symbol-name type))) 284 (name (symbol-name type)))
283 (cond 285 (cond
@@ -292,12 +294,16 @@ which is the \"1006\" extension implemented in Xterm >= 277."
292 double-click-time 294 double-click-time
293 (or (eq double-click-time t) 295 (or (eq double-click-time t)
294 (> double-click-time (* 1000 (- this-time last-time)))) 296 (> double-click-time (* 1000 (- this-time last-time))))
297 (<= (abs (- x last-x))
298 (/ double-click-fuzz 8))
299 (<= (abs (- y last-y))
300 (/ double-click-fuzz 8))
295 (equal last-name (replace-match "" t t name))) 301 (equal last-name (replace-match "" t t name)))
296 (setq click-count (1+ click-count)) 302 (setq click-count (1+ click-count))
297 (xterm-mouse--set-click-count event click-count)) 303 (xterm-mouse--set-click-count event click-count))
298 (t (setq click-count 1))) 304 (t (setq click-count 1)))
299 (set-terminal-parameter nil 'xterm-mouse-last-click 305 (set-terminal-parameter nil 'xterm-mouse-last-click
300 (list type this-time click-count))) 306 (list type this-time click-count x y)))
301 307
302 (set-terminal-parameter nil 'xterm-mouse-x x) 308 (set-terminal-parameter nil 'xterm-mouse-x x)
303 (set-terminal-parameter nil 'xterm-mouse-y y) 309 (set-terminal-parameter nil 'xterm-mouse-y y)