Commit 2f2deb68 authored by Jimmy Aguilar Mena's avatar Jimmy Aguilar Mena

Fix recursive set-keymap-parent in completions-highlight.

*
lisp/completions-highlight.el (completions-highlight-minibuffer-bindings)
:
(completions-highlight-completions-bindings) : Condition
set-keymap-parent to avoid error.
parent c69cec15
Pipeline #6930 passed with stage
in 73 minutes and 25 seconds
...@@ -211,9 +211,12 @@ suffix." ...@@ -211,9 +211,12 @@ suffix."
When SET is nil the bindings are removed." When SET is nil the bindings are removed."
(if set (if set
(let ((local-map (current-local-map))) (let ((local-map (current-local-map)))
(setq completions-highlight-minibuffer-map-save local-map) (unless (eq local-map completions-highlight-minibuffer-map)
(set-keymap-parent completions-highlight-minibuffer-map local-map) (setq completions-highlight-minibuffer-map-save local-map)
(use-local-map completions-highlight-minibuffer-map)) (unless (eq local-map
(keymap-parent completions-highlight-minibuffer-map))
(set-keymap-parent completions-highlight-minibuffer-map local-map))
(use-local-map completions-highlight-minibuffer-map)))
(use-local-map completions-highlight-minibuffer-map-save))) (use-local-map completions-highlight-minibuffer-map-save)))
...@@ -222,11 +225,11 @@ When SET is nil the bindings are removed." ...@@ -222,11 +225,11 @@ When SET is nil the bindings are removed."
"Add extra keybindings to `completion-list-mode-map'. "Add extra keybindings to `completion-list-mode-map'.
When SET is nil the bindings are removed." When SET is nil the bindings are removed."
(if set (if set
(unless (keymap-parent completions-highlight-completions-map)
(let ((local-map (current-local-map))) (let ((local-map (current-local-map)))
(setq completions-highlight-completions-map-save local-map) (unless (eq local-map completions-highlight-completions-map)
(set-keymap-parent completions-highlight-completions-map local-map) (setq completions-highlight-completions-map-save local-map)
(use-local-map completions-highlight-completions-map))) (set-keymap-parent completions-highlight-completions-map local-map)
(use-local-map completions-highlight-completions-map)))
;; Set is called already inside *Completions* but unset not ;; Set is called already inside *Completions* but unset not
(when-let ((parent (keymap-parent completions-highlight-completions-map)) (when-let ((parent (keymap-parent completions-highlight-completions-map))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment