commit de9a11255d34a2635e61b150725cef242077bd06 (HEAD, refs/remotes/origin/master) Author: Gregory Heytings Date: Tue May 25 06:38:15 2021 +0200 Improve completion-list-mode-map * doc/emacs/mini.texi (Completion Commands): Mention it. * lisp/minibuffer.el (minibuffer-local-completion-map): Add the M-g key for switch-to-completion (bug#47699). * lisp/simple.el (completion-list-mode-map): Make special-mode-map its parent, unbind the 'g' revert key, add the 'n' and 'p' keys for next-completion and previous-completion, and the M-g key for switch-to-minibuffer. (switch-to-minibuffer): New function. diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 03db6698fe..564e576300 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -374,8 +374,8 @@ used with the completion list: @itemx @key{prior} Typing @kbd{M-v}, while in the minibuffer, selects the window showing the completion list (@code{switch-to-completions}). This paves the -way for using the commands below. @key{PageUp} or @key{prior} does -the same. You can also select the window in other ways +way for using the commands below. @key{PageUp}, @key{prior} and +@kbd{M-g} does the same. You can also select the window in other ways (@pxref{Windows}). @findex choose-completion diff --git a/etc/NEWS b/etc/NEWS index e11b860616..d163c18871 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -442,6 +442,11 @@ major mode. * Changes in Specialized Modes and Packages in Emacs 28.1 +** Completion List Mode +New key bindings have been added: 'n' and 'p' to navigate completions, +and 'M-g' to switch to the minibuffer, and you can also switch back +to the completion list buffer with 'M-g'. + ** Benchmark *** New function 'benchmark-call' to measure the execution time of a function. Additionally, the number of repetitions can be expressed as a minimal duration diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index e04f1040b3..36fb8e72c1 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2603,6 +2603,7 @@ The completion method is determined by `completion-at-point-functions'." (define-key map "?" 'minibuffer-completion-help) (define-key map [prior] 'switch-to-completions) (define-key map "\M-v" 'switch-to-completions) + (define-key map "\M-g" 'switch-to-completions) map) "Local keymap for minibuffer input with completion.") diff --git a/lisp/simple.el b/lisp/simple.el index 2a90a07631..b3470ac7b0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -8834,6 +8834,8 @@ makes it easier to edit it." (defvar completion-list-mode-map (let ((map (make-sparse-keymap))) + (set-keymap-parent map special-mode-map) + (define-key map "g" nil) ;; There's nothing to revert from. (define-key map [mouse-2] 'choose-completion) (define-key map [follow-link] 'mouse-face) (define-key map [down-mouse-2] nil) @@ -8843,8 +8845,10 @@ makes it easier to edit it." (define-key map [right] 'next-completion) (define-key map [?\t] 'next-completion) (define-key map [backtab] 'previous-completion) - (define-key map "q" 'quit-window) (define-key map "z" 'kill-current-buffer) + (define-key map "n" 'next-completion) + (define-key map "p" 'previous-completion) + (define-key map "\M-g" 'switch-to-minibuffer) map) "Local map for completion list buffers.") @@ -9133,6 +9137,12 @@ select the completion near point.\n\n")))))) ;; FIXME: Perhaps this should be done in `minibuffer-completion-help'. (when (bobp) (next-completion 1))))) + +(defun switch-to-minibuffer () + "Select the minibuffer window." + (interactive) + (when (active-minibuffer-window) + (select-window (active-minibuffer-window)))) ;;; Support keyboard commands to turn on various modifiers. commit 1fa58c548ae7c00550aef4f49d02dbe93b1ddf5f Author: Gregory Heytings Date: Tue May 25 06:22:36 2021 +0200 Use correct face when pulsing in CEDET * lisp/cedet/pulse.el (pulse-momentary-highlight-overlay): Use pulse-highlight-face, not pulse-highlight-start-face (bug#47810). diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index 1e4506713a..62b2072e18 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -153,8 +153,7 @@ Optional argument FACE specifies the face to do the highlighting." ;; with a reference face needed for the color. (pulse-reset-face face) (let* ((start (color-name-to-rgb - (face-background 'pulse-highlight-start-face - nil 'default))) + (face-background 'pulse-highlight-face nil 'default))) (stop (color-name-to-rgb (face-background 'default))) (colors (mapcar (apply-partially 'apply 'color-rgb-to-hex) (color-gradient start stop pulse-iterations)))) commit 740d424547d3fabefc40e5aabba9bc2d5ba837fc Author: Gregory Heytings Date: Tue May 25 06:21:03 2021 +0200 Consider all user-defined bitmaps in gui_init_fringe() * src/fringe.c (gui_init_fringe): Consider user-defined bitmaps that override default ones (bug#47832). diff --git a/src/fringe.c b/src/fringe.c index 65c9a84ac9..47615f51f9 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -1776,14 +1776,15 @@ gui_init_fringe (struct redisplay_interface *rif) for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++) { struct fringe_bitmap *fb = &standard_bitmaps[bt]; - rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width); + if (!fringe_bitmaps[bt]) + rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width); } /* Set up user-defined fringe bitmaps that might have been defined before the frame of this kind was initialized. This can happen if Emacs is started as a daemon and the init files define fringe bitmaps. */ - for ( ; bt < max_used_fringe_bitmap; bt++) + for (bt = NO_FRINGE_BITMAP + 1; bt < max_used_fringe_bitmap; bt++) { struct fringe_bitmap *fb = fringe_bitmaps[bt]; if (fb) commit 0b48e2d258cb3c0ad5d12c5b4aaf9b4b69101763 Author: Gregory Heytings Date: Tue May 25 06:18:29 2021 +0200 Fix infloop in Modula-2 mode * lisp/progmodes/modula2.el (m2-smie-refine-colon): Stop looping when point does not move with forward-sexp (Bug#48011). diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el index 2a0374aa81..a8d644dba0 100644 --- a/lisp/progmodes/modula2.el +++ b/lisp/progmodes/modula2.el @@ -201,7 +201,10 @@ ((zerop (length tok)) (let ((forward-sexp-function nil)) (condition-case nil - (forward-sexp -1) + (let ((p (point))) + (forward-sexp -1) + (when (= p (point)) + (setq res ":"))) (scan-error (setq res ":"))))) ((member tok '("|" "OF" "..")) (setq res ":-case")) ((member tok '(":" "END" ";" "BEGIN" "VAR" "RECORD" "PROCEDURE")) commit 86e4d770a833538f3cb711eb42d8fd8d764a4635 Author: Amin Bandali Date: Mon May 24 23:25:27 2021 -0400 * lisp/erc/erc-services.el: Fix newly-added Libera.Chat entry (bug#48529). diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 62c9fbdd51..073d164556 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -197,7 +197,7 @@ Example of use: (const GalaxyNet) (const GRnet) (const iip) - (const Libera) + (const Libera.Chat) (const OFTC) (const QuakeNet) (const Rizon) @@ -265,8 +265,8 @@ Example of use: "type\\s-/squery\\s-Trent\\s-identify\\s-" "Trent@anon.iip" "IDENTIFY" nil "SQUERY" nil) - (Libera - "NickServ!NickServ@services." + (Libera.Chat + "NickServ!NickServ@services.libera.chat" ;; Libera.Chat also accepts a password at login, see the `erc' ;; :password argument. "This\\s-nickname\\s-is\\s-registered.\\s-Please\\s-choose" commit 3f8b303ec087ba3d0bd524c7fc8c628ef15a3e4a Author: Gregory Heytings Date: Tue May 25 00:24:57 2021 +0200 Fix bug when moving directories to trash * lisp/files.el (move-file-to-trash): Pass the correct dir-flag to make-temp-file so that a directory is created when a directory is being trashed (Bug#47960). diff --git a/lisp/files.el b/lisp/files.el index 4fdafe19db..62e1702fdf 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -7945,6 +7945,7 @@ Otherwise, trash FILENAME using the freedesktop.org conventions, ;; Make a .trashinfo file. Use O_EXCL, as per trash-spec 1.0. (let* ((files-base (file-name-nondirectory fn)) + (is-directory (file-directory-p fn)) (overwrite nil) info-fn) ;; We're checking further down whether the info file @@ -7956,7 +7957,8 @@ Otherwise, trash FILENAME using the freedesktop.org conventions, files-base (file-name-nondirectory (make-temp-file (expand-file-name - files-base trash-files-dir))))) + files-base trash-files-dir) + is-directory)))) (setq info-fn (expand-file-name (concat files-base ".trashinfo") trash-info-dir)) commit a70a344941713baf08dc0c093bdf25cf36b09858 Author: Corwin Brust Date: Mon May 24 23:36:01 2021 +0200 Add Libera.chat to `erc-nickserv-alist' * lisp/erc/erc-services.el (erc-nickserv-alist): Add support for the Libera chat. Copyright-paperwork-exempt: yes diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 09d1f7a330..62c9fbdd51 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -32,8 +32,8 @@ ;; As a default, ERC has the data for the official nickname services on ;; the networks Austnet, BrasNET, Dalnet, freenode, GalaxyNet, GRnet, -;; and Slashnet. You can add more by using M-x customize-variable RET -;; erc-nickserv-alist. +;; Libera.Chat and Slashnet. You can add more by using +;; M-x customize-variable RET erc-nickserv-alist. ;; Usage: ;; @@ -197,6 +197,7 @@ Example of use: (const GalaxyNet) (const GRnet) (const iip) + (const Libera) (const OFTC) (const QuakeNet) (const Rizon) @@ -264,6 +265,15 @@ Example of use: "type\\s-/squery\\s-Trent\\s-identify\\s-" "Trent@anon.iip" "IDENTIFY" nil "SQUERY" nil) + (Libera + "NickServ!NickServ@services." + ;; Libera.Chat also accepts a password at login, see the `erc' + ;; :password argument. + "This\\s-nickname\\s-is\\s-registered.\\s-Please\\s-choose" + "NickServ" + "IDENTIFY" nil nil + ;; See also the 901 response code message. + "You\\s-are\\s-now\\s-identified\\s-for\\s-") (OFTC "NickServ!services@services.oftc.net" ;; OFTC's NickServ doesn't ask you to identify anymore.