unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: 66420@debbugs.gnu.org, Alan Third <alan@idiocy.org>
Subject: bug#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS)
Date: Mon, 09 Oct 2023 14:28:34 +0200	[thread overview]
Message-ID: <m2ttr0dlot.fsf@Pro.fritz.box> (raw)
In-Reply-To: <7E27D8DA-B27F-4428-9C09-A1A13AACFC69@gmail.com> ("Mattias Engdegård"'s message of "Mon, 9 Oct 2023 14:03:42 +0200")

Mattias Engdegård <mattias.engdegard@gmail.com> writes:

> On macOS, once a selection has been made, every pop-up menu includes a 'Services' sub-menu from then on.
> It contains items such as 'Search with Google' and 'Add to Music as a Spoken Track'.
> It's always completely out of place and very annoying.
>
> The buffer menu? It's there. Any menu activated by clicking on the mode line? It's there. Selecting a value in variable customisation? It's there.
>
> The only place where it might be remotely appropriate is the context-menu-mode menu, if enabled, but then only if we actually have an active selection. I'm going to ignore this for the time being since it's much less important than getting rid of it where it doesn't belong.
>
> The patch below removes it. The property is documented to be present in macOS 10.6 and above, which is fairly old (Snow Leopard).
>
> --- a/src/nsmenu.m
> +++ b/src/nsmenu.m
> @@ -768,6 +768,9 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
>                              pressure: 0];
>  
>    context_menu_value = -1;
> +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
> +  self.allowsContextMenuPlugIns = NO;
> +#endif
>    [NSMenu popUpContextMenu: self withEvent: event forView: view];
>    retVal = context_menu_value;
>    context_menu_value = 0;

I'm all for it :-)





  reply	other threads:[~2023-10-09 12:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09 12:03 bug#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS) Mattias Engdegård
2023-10-09 12:28 ` Gerd Möllmann [this message]
2023-10-09 12:44   ` Stefan Kangas
2023-10-09 15:16     ` Alan Third
2023-10-09 15:42       ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2ttr0dlot.fsf@Pro.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=66420@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=mattias.engdegard@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).