GNU bug report logs -
#50067
Context menus
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sun, 15 Aug 2021 08:52:01 UTC
Severity: normal
Tags: fixed
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> >>> ** no multiple horizontal lines
>> >>>
>> >>> Sometimes I see double lines on the context menu. I think that there is
>> >>> no useful case to have double lines. To allow only one horizontal line
>> >>> would look cool.
>> >>
>> >> Right, double separators should be removed.
>> >
>> > OK.
>>
>> This is not easy to do. Because there are menu-items
>> that use the filter :visible, e.g.:
>
> Can I ask why do we need the separators in the context menus? Why not
> remove them all, unconditionally?
The separators are of great help to provide visual cues for groups
of objects. All menus on the menu-bar in Emacs use separators.
Anyway, this is implemented now:
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 7d3ed9a0e4..8ac22a07c9 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -315,7 +315,14 @@ context-menu-map
(lambda (fun)
(setq menu (funcall fun menu))
nil))))
- ;; TODO: remove double separators
+ ;; Remove double separators
+ (let ((l menu))
+ (while 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))))
+
(when (functionp context-menu-filter-function)
(setq menu (funcall context-menu-filter-function menu)))
menu))
This bug report was last modified 3 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.