[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 5db380a: Ensure there are no duplicate separators when creating a
From: |
Lars Ingebrigtsen |
Subject: |
master 5db380a: Ensure there are no duplicate separators when creating a context menu |
Date: |
Thu, 2 Dec 2021 03:24:42 -0500 (EST) |
branch: master
commit 5db380abad0482ae74aa71761f0da2b2351ce97a
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Ensure there are no duplicate separators when creating a context menu
Previously, if there were three or more consecutive menu separators,
not all of them would be removed.
* lisp/mouse.el (context-menu-map): Ensure no duplicate separators
(bug#52237).
---
lisp/mouse.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 3ab9fbc..ec43aec 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -330,10 +330,10 @@ the function `context-menu-filter-function'."
;; Remove duplicate separators
(let ((l menu))
(while (consp l)
- (when (and (equal (cdr-safe (car l)) menu-bar-separator)
- (equal (cdr-safe (cadr l)) menu-bar-separator))
- (setcdr l (cddr l)))
- (setq l (cdr l))))
+ (if (and (equal (cdr-safe (car l)) menu-bar-separator)
+ (equal (cdr-safe (cadr l)) menu-bar-separator))
+ (setcdr l (cddr l))
+ (setq l (cdr l)))))
(when (functionp context-menu-filter-function)
(setq menu (funcall context-menu-filter-function menu click)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 5db380a: Ensure there are no duplicate separators when creating a context menu,
Lars Ingebrigtsen <=