all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#179: 23.0.60; Menu separators are not displayed
@ 2008-08-05 21:54 Chong Yidong
  2008-08-05 22:10 ` David Kastrup
  0 siblings, 1 reply; 3+ messages in thread
From: Chong Yidong @ 2008-08-05 21:54 UTC (permalink / raw)
  To: David Kastrup; +Cc: 179

Hello David,

Did you ever get the chance to try Stefan's patch from May?


Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> Does the patch below fix it?
>
>         Stefan

--- subr.el.~1.594.~	2008-05-02 12:47:05.000000000 -0400
+++ subr.el	2008-05-05 02:58:00.000000000 -0400
@@ -571,10 +571,14 @@
       (let* ((key (car binding))
              (item (cdr binding))
              (oldbind (assq key bindings)))
+        (if (null key)
+            ;; nil keys are/were used by easy-menu for "separator lines and
+            ;; separator titles".  Merging them makes no sense.
+            (push binding bindings)
         ;; Newer bindings override older.
         (if oldbind (setq bindings (delq oldbind bindings)))
         (when item                      ;nil bindings just hide older ones.
-          (push binding bindings))))
+            (push binding bindings)))))
     (nconc map bindings)))
 
 (put 'keyboard-translate-table 'char-table-extra-slots 0)






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#179: 23.0.60; Menu separators are not displayed
  2008-08-05 21:54 bug#179: 23.0.60; Menu separators are not displayed Chong Yidong
@ 2008-08-05 22:10 ` David Kastrup
  2008-08-08 18:31   ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: David Kastrup @ 2008-08-05 22:10 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 179

Chong Yidong <cyd@stupidchicken.com> writes:

> Did you ever get the chance to try Stefan's patch from May?
>
>
> Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
>> Does the patch below fix it?
>>
>>         Stefan
>
> --- subr.el.~1.594.~	2008-05-02 12:47:05.000000000 -0400
> +++ subr.el	2008-05-05 02:58:00.000000000 -0400
> @@ -571,10 +571,14 @@
>        (let* ((key (car binding))
>               (item (cdr binding))
>               (oldbind (assq key bindings)))
> +        (if (null key)
> +            ;; nil keys are/were used by easy-menu for "separator lines and
> +            ;; separator titles".  Merging them makes no sense.
> +            (push binding bindings)
>          ;; Newer bindings override older.
>          (if oldbind (setq bindings (delq oldbind bindings)))
>          (when item                      ;nil bindings just hide older ones.
> -          (push binding bindings))))
> +            (push binding bindings)))))
>      (nconc map bindings)))
>  
>  (put 'keyboard-translate-table 'char-table-extra-slots 0)
>

My current Emacs does not have this patch applied (or include the
equivalent) and does show menu separators.  So at least the problem I
reported would appear to be fixed (I am judging from the subject line of
the bug report, don't have the report itself here).

However, that does not mean that Stefan might not have unrelatedly
detected some special case not covered by the current code.  So while
the particular problem I have reported might no longer be present in the
code base, you should perhaps ask Stefan what case he had been thinking
about when creating the patch.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#179: 23.0.60; Menu separators are not displayed
  2008-08-05 22:10 ` David Kastrup
@ 2008-08-08 18:31   ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2008-08-08 18:31 UTC (permalink / raw)
  To: David Kastrup; +Cc: Chong Yidong, 179

>> Did you ever get the chance to try Stefan's patch from May?
>> 
>> 
>> Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> 
>>> Does the patch below fix it?
>>> 
>>> Stefan
>> 
>> --- subr.el.~1.594.~	2008-05-02 12:47:05.000000000 -0400
>> +++ subr.el	2008-05-05 02:58:00.000000000 -0400
>> @@ -571,10 +571,14 @@
>> (let* ((key (car binding))
>> (item (cdr binding))
>> (oldbind (assq key bindings)))
>> +        (if (null key)
>> +            ;; nil keys are/were used by easy-menu for "separator lines and
>> +            ;; separator titles".  Merging them makes no sense.
>> +            (push binding bindings)
>> ;; Newer bindings override older.
>> (if oldbind (setq bindings (delq oldbind bindings)))
>> (when item                      ;nil bindings just hide older ones.
>> -          (push binding bindings))))
>> +            (push binding bindings)))))
>> (nconc map bindings)))
>> 
>> (put 'keyboard-translate-table 'char-table-extra-slots 0)
>> 

> My current Emacs does not have this patch applied (or include the
> equivalent) and does show menu separators.  So at least the problem I
> reported would appear to be fixed (I am judging from the subject line of
> the bug report, don't have the report itself here).

Indeed, IIRC I installed a different patch for this problem.  It turns
out that the nil binding is actually not special in any way and that
most separators use other names than nil, so I changed easy-menu to not
use nil either, which makes the above patch unneeded (and probably
undesirable either).


        Stefan






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-08 18:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-05 21:54 bug#179: 23.0.60; Menu separators are not displayed Chong Yidong
2008-08-05 22:10 ` David Kastrup
2008-08-08 18:31   ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.