commit 3eb294745cb0ce3a312d95f848bd63cab75b23d5 (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Sat Jun 5 11:28:26 2021 +0300 Some additions to the TeX input method * lisp/leim/quail/latin-ltx.el (latin-ltx--define-rules): Add some rules from Unicode Technical Note 28 "UnicodeMath" v3.1. diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el index 8b1e520361..2146304f15 100644 --- a/lisp/leim/quail/latin-ltx.el +++ b/lisp/leim/quail/latin-ltx.el @@ -279,13 +279,17 @@ system, including many technical ones. Examples: ("\\Vdash" ?⊩) ("\\Vert" ?‖) ("\\Vvdash" ?⊪) + ("\\above" ?┴) ("\\aleph" ?ℵ) ("\\amalg" ?∐) ("\\angle" ?∠) + ("\\aoint" ?∳) ("\\approx" ?≈) ("\\approxeq" ?≊) + ("\\asmash" ?⬆) ("\\ast" ?∗) ("\\asymp" ?≍) + ("\\atop" ?¦) ("\\backcong" ?≌) ("\\backepsilon" ?∍) ("\\backprime" ?‵) @@ -294,11 +298,18 @@ system, including many technical ones. Examples: ("\\backslash" ?\\) ("\\barwedge" ?⊼) ("\\because" ?∵) + ("\\begin" ?\〖) + ("\\below" ?┬) ("\\beth" ?ℶ) ("\\between" ?≬) ("\\bigcap" ?⋂) ("\\bigcirc" ?◯) ("\\bigcup" ?⋃) + ("\\bigodot" ?⨀) + ("\\bigoplus" ?⨁) + ("\\bigotimes" ?⨂) + ("\\bigsqcup" ?⨆) + ("\\biguplus" ?⨄) ("\\bigstar" ?★) ("\\bigtriangledown" ?▽) ("\\bigtriangleup" ?△) @@ -315,6 +326,7 @@ system, including many technical ones. Examples: ("\\boxminus" ?⊟) ("\\boxplus" ?⊞) ("\\boxtimes" ?⊠) + ("\\bra" ?\⟨) ("\\bullet" ?•) ("\\bumpeq" ?≏) ("\\cap" ?∩) @@ -331,7 +343,9 @@ system, including many technical ones. Examples: ("\\circledast" ?⊛) ("\\circledcirc" ?⊚) ("\\circleddash" ?⊝) + ("\\close" ?┤) ("\\clubsuit" ?♣) + ("\\coint" ?∲) ("\\coloneq" ?≔) ("\\complement" ?∁) ("\\cong" ?≅) @@ -349,8 +363,12 @@ system, including many technical ones. Examples: ("\\dagger" ?†) ("\\daleth" ?ℸ) ("\\dashv" ?⊣) + ("\\Dd" ?ⅅ) + ("\\dd" ?ⅆ) ("\\ddag" ?‡) ("\\ddagger" ?‡) + ("\\ddddot" ?⃜) + ("\\dddot" ?⃛) ("\\ddots" ?⋱) ("\\diamond" ?⋄) ("\\diamondsuit" ?♢) @@ -363,8 +381,12 @@ system, including many technical ones. Examples: ("\\downdownarrows" ?⇊) ("\\downleftharpoon" ?⇃) ("\\downrightharpoon" ?⇂) + ("\\dsmash" ?⬇) + ("\\ee" ?ⅇ) ("\\ell" ?ℓ) ("\\emptyset" ?∅) + ("\\end" ?\〗) + ("\\eqarray" ?█) ("\\eqcirc" ?≖) ("\\eqcolon" ?≕) ("\\eqslantgtr" ?⋝) @@ -414,16 +436,25 @@ system, including many technical ones. Examples: ("\\heartsuit" ?♥) ("\\hookleftarrow" ?↩) ("\\hookrightarrow" ?↪) + ("\\hphantom" ?⬄) + ("\\hsmash" ?⬌) ("\\iff" ?⇔) + ("\\ii" ?ⅈ) + ("\\iiiint" ?⨌) + ("\\iiint" ?∭) + ("\\iint" ?∬) ("\\imath" ?ı) ("\\in" ?∈) ("\\infty" ?∞) ("\\int" ?∫) ("\\intercal" ?⊺) + ("\\jj" ?ⅉ) + ("\\jmath" ?ȷ) ("\\langle" ?⟨) ;; Was ?〈, see bug#12948. ("\\lbrace" ?{) ("\\lbrack" ?\[) ("\\lceil" ?⌈) + ("\\ldiv" ?∕) ("\\ldots" ?…) ("\\le" ?≤) ("\\leadsto" ?↝) @@ -529,16 +560,25 @@ system, including many technical ones. Examples: ("\\nvdash" ?⊬) ("\\nwarrow" ?↖) ("\\odot" ?⊙) + ("\\oiiint" ?∰) + ("\\oiint" ?∯) ("\\oint" ?∮) ("\\ominus" ?⊖) ("\\oplus" ?⊕) ("\\oslash" ?⊘) ("\\otimes" ?⊗) + ("\\overbrace" ?⏞) + ("\\overparen" ?⏜) ("\\par" ?
) ("\\parallel" ?∥) ("\\partial" ?∂) ("\\perp" ?⊥) + ("\\phantom" ?⟡) ("\\pitchfork" ?⋔) + ("\\pppprime" ?⁗) + ("\\ppprime" ?‴) + ("\\pprime" ?″) + ("\\prcue" ?≼) ("\\prec" ?≺) ("\\precapprox" ?≾) ("\\preceq" ?≼) @@ -548,12 +588,16 @@ system, including many technical ones. Examples: ("\\prime" ?′) ("\\prod" ?∏) ("\\propto" ?∝) + ("\\qdrt" ?∜) ("\\qed" ?∎) ("\\quad" ? ) ("\\rangle" ?\⟩) ;; Was ?〉, see bug#12948. + ("\\ratio" ?∶) ("\\rbrace" ?}) ("\\rbrack" ?\]) ("\\rceil" ?⌉) + ("\\rddots" ?⋰) + ("\\rect" ?▭) ("\\rfloor" ?⌋) ("\\rightarrow" ?→) ("\\rightarrowtail" ?↣) @@ -565,6 +609,8 @@ system, including many technical ones. Examples: ("\\rightrightarrows" ?⇉) ("\\rightthreetimes" ?⋌) ("\\risingdotseq" ?≓) + ("\\rrect" ?▢) + ("\\sdiv" ?⁄) ("\\rtimes" ?⋊) ("\\sbs" ?﹨) ("\\searrow" ?↘) @@ -577,6 +623,7 @@ system, including many technical ones. Examples: ("\\smallamalg" ?∐) ("\\smallsetminus" ?∖) ("\\smallsmile" ?⌣) + ("\\smash" ?⬍) ("\\smile" ?⌣) ("\\spadesuit" ?♠) ("\\sphericalangle" ?∢) @@ -627,12 +674,16 @@ system, including many technical ones. Examples: ("\\ulcorner" ?⌜) ("\\uparrow" ?↑) ("\\updownarrow" ?↕) + ("\\underbar" ?▁) + ("\\underbrace" ?⏟) + ("\\underparen" ?⏝) ("\\upleftharpoon" ?↿) ("\\uplus" ?⊎) ("\\uprightharpoon" ?↾) ("\\upuparrows" ?⇈) ("\\urcorner" ?⌝) ("\\u{i}" ?ĭ) + ("\\vbar" ?│) ("\\vDash" ?⊨) ((lambda (name char) @@ -655,6 +706,7 @@ system, including many technical ones. Examples: ("\\vee" ?∨) ("\\veebar" ?⊻) ("\\vert" ?|) + ("\\vphantom" ?⇳) ("\\wedge" ?∧) ("\\wp" ?℘) ("\\wr" ?≀) commit 8d5b7f519f18ed73f26adff275e3bd580bacf36c Author: Dmitry Gutov Date: Sat Jun 5 03:56:33 2021 +0300 Make icomplete less blinky and more responsive * lisp/icomplete.el (icomplete-pre-command-hook, icomplete-tidy): Remove, update the callers (https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00111.html). (icomplete-compute-delay): Change the default to 150ms. (icomplete-max-delay-chars): Change the default to 2. diff --git a/etc/NEWS b/etc/NEWS index d10fc5f2a1..e782603f0b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -549,6 +549,16 @@ Icomplete, completions are rotated and selection kept at the top. When used with Fido, completions scroll like a typical dropdown widget. +*** Default value of 'icomplete-compute-delay has been changed to 0.15 s. + +*** Default value of 'icomplete-max-delay-chars' has been changed to 2. + +*** Reduced blinking while completing the next completions set. +Icomplete doesn't hide the hint with the previously computed +completions anymore when compute delay is in effect, or the previous +computation has been aborted by input. Instead it shows the previous +completions until the new ones are ready. + --- ** Specific warnings can now be disabled from the warning buffer. When a warning is displayed to the user, the resulting buffer now has diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 99896a4822..03a191cb0b 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -115,7 +115,7 @@ Otherwise this should be a list of the completion tables (e.g., :type 'integer :version "26.1") -(defcustom icomplete-compute-delay .3 +(defcustom icomplete-compute-delay .15 "Completions-computation stall, used only with large-number completions. See `icomplete-delay-completions-threshold'." :type 'number) @@ -124,7 +124,7 @@ See `icomplete-delay-completions-threshold'." "Pending-completions number over which to apply `icomplete-compute-delay'." :type 'integer) -(defcustom icomplete-max-delay-chars 3 +(defcustom icomplete-max-delay-chars 2 "Maximum number of initial chars to apply `icomplete-compute-delay'." :type 'integer) @@ -158,10 +158,6 @@ icompletion is occurring." "Initial input in the minibuffer when icomplete-mode was activated. Used to implement the option `icomplete-show-matches-on-no-input'.") -(defun icomplete-pre-command-hook () - (let ((non-essential t)) - (icomplete-tidy))) - (defun icomplete-post-command-hook () (let ((non-essential t)) ;E.g. don't prompt for password! (icomplete-exhibit))) @@ -490,7 +486,6 @@ Usually run by inclusion in `minibuffer-setup-hook'." (setq icomplete--scrolled-completions nil) (use-local-map (make-composed-keymap icomplete-minibuffer-map (current-local-map))) - (add-hook 'pre-command-hook #'icomplete-pre-command-hook nil t) (add-hook 'post-command-hook #'icomplete-post-command-hook nil t) (run-hooks 'icomplete-minibuffer-setup-hook))) @@ -504,7 +499,6 @@ Usually run by inclusion in `minibuffer-setup-hook'." (setq icomplete--in-region-buffer nil) (delete-overlay icomplete-overlay) (kill-local-variable 'completion-show-inline-help) - (remove-hook 'pre-command-hook 'icomplete-pre-command-hook t) (remove-hook 'post-command-hook 'icomplete-post-command-hook t) (message nil))) (when (and completion-in-region-mode @@ -516,7 +510,6 @@ Usually run by inclusion in `minibuffer-setup-hook'." (unless (memq icomplete-minibuffer-map (cdr tem)) (setcdr tem (make-composed-keymap icomplete-minibuffer-map (cdr tem))))) - (add-hook 'pre-command-hook 'icomplete-pre-command-hook nil t) (add-hook 'post-command-hook 'icomplete-post-command-hook nil t))) (defun icomplete--sorted-completions () @@ -640,13 +633,6 @@ resized depends on `resize-mini-windows'." ;;;_* Completion -;;;_ > icomplete-tidy () -(defun icomplete-tidy () - "Remove completions display (if any) prior to new user input. -Should be run in on the minibuffer `pre-command-hook'. -See `icomplete-mode' and `minibuffer-setup-hook'." - (delete-overlay icomplete-overlay)) - ;;;_ > icomplete-exhibit () (defun icomplete-exhibit () "Insert Icomplete completions display. commit 7b50ed553faa6de6d51bf07d12d106ca61ab3ac4 Author: Tassilo Horn Date: Fri Jun 4 21:58:11 2021 +0200 Ask if dir and subdir dired buffers be killed when deleting dir Previously, when you've had dired buffers ~/foo/ ~/foo/bar/ ~/foo/bar/baz/ and then deleted ~/foo/, dired (with dired-clean-up-buffers-too set to non-nil) would only ask to delete the dired buffer of ~/foo/. Now it will offer to delete all three buffers. * lisp/dired.el (dired-buffers-for-dir): Add optional argument SUBDIRS which makes the function return also dired buffers showing a subdir of DIR. (dired-in-this-tree-p): Make obsolete in favor of file-in-directory-p which actually does what the name suggest whereas dired-in-this-tree-p is just string-matching on filenames which will fail with symlinks filenames including ./ or ../. diff --git a/lisp/dired.el b/lisp/dired.el index 165484302a..bb428e2198 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2820,10 +2820,12 @@ You can then feed the file name(s) to other commands with \\[yank]." ;; Keeping Dired buffers in sync with the filesystem and with each other -(defun dired-buffers-for-dir (dir &optional file) +(defun dired-buffers-for-dir (dir &optional file subdirs) "Return a list of buffers for DIR (top level or in-situ subdir). If FILE is non-nil, include only those whose wildcard pattern (if any) matches FILE. +If SUBDIRS is non-nil, also include the dired buffers of +directories below DIR. The list is in reverse order of buffer creation, most recent last. As a side effect, killed dired buffers for DIR are removed from dired-buffers." @@ -2835,19 +2837,20 @@ dired-buffers." ((null (buffer-name buf)) ;; Buffer is killed - clean up: (setq dired-buffers (delq elt dired-buffers))) - ((dired-in-this-tree-p dir (car elt)) + ((file-in-directory-p (car elt) dir) (with-current-buffer buf - (and (assoc dir dired-subdir-alist) - (or (null file) - (if (stringp dired-directory) - (let ((wildcards (file-name-nondirectory - dired-directory))) - (or (zerop (length wildcards)) - (string-match-p (dired-glob-regexp wildcards) - file))) - (member (expand-file-name file dir) - (cdr dired-directory)))) - (setq result (cons buf result))))))) + (when (and (or subdirs + (assoc dir dired-subdir-alist)) + (or (null file) + (if (stringp dired-directory) + (let ((wildcards (file-name-nondirectory + dired-directory))) + (or (zerop (length wildcards)) + (string-match-p (dired-glob-regexp wildcards) + file))) + (member (expand-file-name file dir) + (cdr dired-directory))))) + (setq result (cons buf result))))))) result)) (defun dired-glob-regexp (pattern) @@ -2912,6 +2915,7 @@ dired-buffers." ;;"Is FILE part of the directory tree starting at DIR?" (let (case-fold-search) (string-match-p (concat "^" (regexp-quote dir)) file))) +(make-obsolete 'dired-in-this-tree-p 'file-in-directory-p "28.1") (define-obsolete-function-alias 'dired-in-this-tree 'dired-in-this-tree-p "27.1") @@ -3427,7 +3431,8 @@ confirmation. To disable the confirmation, see (file-name-nondirectory fn)))) (not dired-clean-confirm-killing-deleted-buffers)) (kill-buffer buf))) - (let ((buf-list (dired-buffers-for-dir (expand-file-name fn)))) + (let ((buf-list (dired-buffers-for-dir (expand-file-name fn) + nil 'subdirs))) (and buf-list (or (and dired-clean-confirm-killing-deleted-buffers (y-or-n-p commit 4c362b4ef7db64e896b8a9fa5f2b93ff793dee17 Author: Eli Zaretskii Date: Fri Jun 4 16:50:43 2021 +0300 Fix documentation of a recent change. * etc/NEWS: * doc/emacs/misc.texi (Invoking emacsclient): Fix a recent change. (Bug#11358) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index aed9fa9c66..027133cc3a 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -1865,10 +1865,10 @@ editor---in this case @command{emacsclient}---to exit before doing something else. @findex server-edit-abort - If you want to abandon the edit instead, use the @kbd{M-x -server-edit-abort} command. This sends a message back to the -@command{emacsclient} program, telling it to exit, but doesn't save -any files. + If you want to abandon the edit instead, use the @w{@kbd{M-x +server-edit-abort}} command. This sends a message back to the +@command{emacsclient} program, telling it to exit with abnormal exit +status, and doesn't save any buffers. You can also call @command{emacsclient} with multiple file name arguments: @samp{emacsclient @var{file1} @var{file2} ...} tells the diff --git a/etc/NEWS b/etc/NEWS index c272d279b8..d10fc5f2a1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -514,7 +514,8 @@ is set to nil, this message is inhibited. *** New command 'server-edit-abort'. This command (not bound to any key by default) can be used to abort an edit instead of marking it as "Done" (which the 'C-x #' command -does). +does). The 'emacsclient' program exits with an abnormal status as +result of this command. ** Perl mode commit 194d54a929a83fede75d618b104acd1b544feb10 Author: Stephen Berman Date: Fri Jun 4 12:01:41 2021 +0200 Fix placement of point in Dired deletion operations * lisp/dired.el (dired-do-flagged-delete, dired-do-delete): Use point-marker instead of point to record each file name position. Clean up the markers before returning. (dired-internal-do-deletions): Move to the file name marker, and then move point to the file name to visually emphasize which file is being operated on (bug#48805). diff --git a/lisp/dired.el b/lisp/dired.el index 8527634760..165484302a 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3280,15 +3280,19 @@ non-empty directories is allowed." (interactive) (let* ((dired-marker-char dired-del-marker) (regexp (dired-marker-regexp)) - case-fold-search) + case-fold-search markers) (if (save-excursion (goto-char (point-min)) (re-search-forward regexp nil t)) (dired-internal-do-deletions (nreverse ;; this can't move point since ARG is nil - (dired-map-over-marks (cons (dired-get-filename) (point)) + (dired-map-over-marks (cons (dired-get-filename) + (let ((m (point-marker))) + (push m markers) + m)) nil)) nil t) + (dolist (m markers) (set-marker m nil)) (or nomessage (message "(No deletions requested)"))))) @@ -3299,12 +3303,17 @@ non-empty directories is allowed." ;; This is more consistent with the file marking feature than ;; dired-do-flagged-delete. (interactive "P") - (dired-internal-do-deletions - (nreverse - ;; this may move point if ARG is an integer - (dired-map-over-marks (cons (dired-get-filename) (point)) - arg)) - arg t)) + (let (markers) + (dired-internal-do-deletions + (nreverse + ;; this may move point if ARG is an integer + (dired-map-over-marks (cons (dired-get-filename) + (let ((m (point-marker))) + (push m markers) + m)) + arg)) + arg t) + (dolist (m markers) (set-marker m nil)))) (defvar dired-deletion-confirmer 'yes-or-no-p) ; or y-or-n-p? @@ -3312,11 +3321,6 @@ non-empty directories is allowed." ;; L is an alist of files to delete, with their buffer positions. ;; ARG is the prefix arg. ;; Filenames are absolute. - ;; (car L) *must* be the *last* (bottommost) file in the dired buffer. - ;; That way as changes are made in the buffer they do not shift the - ;; lines still to be changed, so the (point) values in L stay valid. - ;; Also, for subdirs in natural order, a subdir's files are deleted - ;; before the subdir itself - the other way around would not work. (let* ((files (mapcar #'car l)) (count (length l)) (succ 0) @@ -3337,9 +3341,10 @@ non-empty directories is allowed." (make-progress-reporter (if trashing "Trashing..." "Deleting...") succ count)) - failures) ;; files better be in reverse order for this loop! + failures) (while l - (goto-char (cdr (car l))) + (goto-char (marker-position (cdr (car l)))) + (dired-move-to-filename) (let ((inhibit-read-only t)) (condition-case err (let ((fn (car (car l)))) commit 9136c064d66a1d4ea69472ffe25662a8874f7ba6 Author: Harald Hanche-Olsen Date: Fri Jun 4 11:09:46 2021 +0200 Add a new `server-edit-abort' command * doc/emacs/misc.texi (Invoking emacsclient): Document it (bug#11358). * lisp/server.el (server-edit): Mention it in the doc string. (server-edit-abort): New command. Copyright-paperwork-exempt: yes diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index c802779250..aed9fa9c66 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -1864,6 +1864,12 @@ it to exit. Programs that use @env{EDITOR} usually wait for the editor---in this case @command{emacsclient}---to exit before doing something else. +@findex server-edit-abort + If you want to abandon the edit instead, use the @kbd{M-x +server-edit-abort} command. This sends a message back to the +@command{emacsclient} program, telling it to exit, but doesn't save +any files. + You can also call @command{emacsclient} with multiple file name arguments: @samp{emacsclient @var{file1} @var{file2} ...} tells the Emacs server to visit @var{file1}, @var{file2}, and so forth. Emacs diff --git a/etc/NEWS b/etc/NEWS index 675925906c..c272d279b8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -510,6 +510,12 @@ When emacsclient connects, Emacs will (by default) output a message about how to exit the client frame. If 'server-client-instructions' is set to nil, this message is inhibited. ++++ +*** New command 'server-edit-abort'. +This command (not bound to any key by default) can be used to abort +an edit instead of marking it as "Done" (which the 'C-x #' command +does). + ** Perl mode --- diff --git a/lisp/server.el b/lisp/server.el index 17332a2b0a..3205ba182e 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1603,7 +1603,9 @@ prevent a backup for it.) The variable `server-temp-file-regexp' controls which filenames are considered temporary. If invoked with a prefix argument, or if there is no server process running, -starts server process and that is all. Invoked by \\[server-edit]." +starts server process and that is all. Invoked by \\[server-edit]. + +To abort an edit instead of saying \"Done\", use \\[server-edit-abort]." (interactive "P") (cond ((or arg @@ -1613,6 +1615,17 @@ starts server process and that is all. Invoked by \\[server-edit]." (server-clients (apply #'server-switch-buffer (server-done))) (t (message "No server editing buffers exist")))) +(defun server-edit-abort () + "Abort editing the current client buffer." + (interactive) + (if server-clients + (mapc (lambda (proc) + (server-send-string + proc (concat "-error " + (server-quote-arg "Aborted by the user")))) + server-clients) + (message "This buffer has no clients"))) + (defun server-switch-buffer (&optional next-buffer killed-one filepos this-frame-only) "Switch to another buffer, preferably one that has a client. commit 6d1d048d65d35c217e9d505ebe3e76a202553c97 Author: Lars Ingebrigtsen Date: Fri Jun 4 10:48:16 2021 +0200 Revert "Make the `i' command in Info-mode remove duplicate matches" This reverts commit 089e0c4c55dcf72f9cf2f6f04b8a52fc7355499c. There were no duplicate entries -- there were two entries for different things that referred to the same line. diff --git a/lisp/info.el b/lisp/info.el index 83a9bfbc23..cdf339ff6f 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3375,13 +3375,7 @@ Give an empty topic name to go to the Index node itself." (setq exact (cons found exact) matches (delq found matches))) (setq Info-history-list ohist-list) - (setq Info-index-alternatives - ;; Weed out index entries that refer to the same line. - (seq-uniq - (nconc exact (nreverse matches)) - (lambda (m1 m2) - (and (equal (nth 1 m1) (nth 1 m2)) - (equal (nth 3 m1) (nth 3 m2)))))) + (setq Info-index-alternatives (nconc exact (nreverse matches))) (Info-index-next 0))))) (defun Info-index-next (num)