From: Lars Ingebrigtsen Date: Sun, 5 Dec 2021 20:20:03 +0000 (+0100) Subject: Fix regression introduced by previous context-menu-map change X-Git-Tag: emacs-29.0.90~3612^2~3^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6980a4fa450260b97830de52a69b039d9d020ff2;p=emacs.git Fix regression introduced by previous context-menu-map change * lisp/mouse.el (context-menu-map): Make the context mode work with flyspell again (bug#52237). --- diff --git a/lisp/mouse.el b/lisp/mouse.el index b5ca80a446e..af1eca12f45 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -330,7 +330,8 @@ the function `context-menu-filter-function'." ;; Remove duplicate separators as well as ones at the beginning or ;; end of the menu. (let ((l menu) saw-first-item) - (while (consp (cdr l)) + (while (and (consp l) + (consp (cdr l))) ;; If the next item is a separator, remove it if 1) we haven't ;; seen any other items yet, or 2) it's followed by either ;; another separator or the end of the list.