all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rob Christie <robchristie@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: bug#4339: 23.1.50; NextStep emacs port problem with key sequences in menus (with patch)
Date: Fri, 4 Sep 2009 10:32:45 -0400	[thread overview]
Message-ID: <73143cf0909040732n26982298w6d5d5b10df238a9c@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5261 bytes --]

Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing
list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

In the ns/cocoa version of Emacs 23 when key sequences are added to menu
items via calls such as easy-menu-define, key sequences that start with
s end up showing up as just the Command key with a single letter. In
previous versions of emacs for the Mac (Carbon Emacs), the key sequence
would show up correctly.  For
packages such as YaSnippet this becomes a problem because the key
sequence that is shown is the snippet you must type to get an
expansion. For example, in snippets that I currently use typing
shbt <tab> expands to "should belong to". In previous versions of emacs
the menu item for this would show

should_belong_to ... (shbt =>)

In the next step version of emacs it shows

should_belong_to ...     ⌘B

The following patch makes does a bit more of a check in parseKeyEquiv in
nsmenu.m to fix the issue.


From f00edeb61d82aaed792f8615f7cd529bd4a8b4f7 Mon Sep 17 00:00:00 2001
From: Rob Christie <robchristie@gmail.com>
Date: Fri, 4 Sep 2009 04:02:20 -0400
Subject: [PATCH] Changed nsmenu so that parseKeyEquiv can handle when menus
are created with key combinations that start with s, but do are not supposed
to be intermpreted as meta.

---
 src/nsmenu.m |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/nsmenu.m b/src/nsmenu.m
index 0518466..2a4f9f7 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -609,12 +609,13 @@ name_is_separator (name)
     return @"";

   while (*tpos == ' ' || *tpos == '(')
-    tpos++;
-  if (*tpos != 's') {
-    keyEquivModMask = 0; /* signal */
-    return [NSString stringWithUTF8String: tpos];
-  }
-  return [NSString stringWithFormat: @"%c", tpos[2]];
+      tpos++;
+  if ((*tpos == 's') && (*(tpos+1) == '-'))
+    {
+      return [NSString stringWithFormat: @"%c", tpos[2]];
+    }
+  keyEquivModMask = 0; /* signal */
+  return [NSString stringWithUTF8String: tpos];
 }


-- 

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/Applications/Emacs.app/Contents/Resources/etc/DEBUG for instructions.


In GNU Emacs 23.1.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
 of 2009-08-28 on black.local
Windowing system distributor `Apple', version 10.3.949
configured using `configure  '--with-ns''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
  yas/global-mode: t
  yas/minor-mode: t
  shell-dirtrack-mode: t
  flyspell-mode: t
  diff-auto-refine-mode: t
  global-hl-line-mode: t
  delete-selection-mode: t
  pc-selection-mode: t
  icomplete-mode: t
  show-paren-mode: t
  which-function-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x s i b <backspace> <backspace> u b SPC <backspace>
<backspace> <backspace> b u SPC SPC g SPC C-g C-h i
m E m a c s <return> m B u g SPC <backspace> s <return>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<up> <up> <up> <down> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <down>
<left> <left> <left> <return> M-x r e p o r t SPC e
m SPC SPC SPC <return>

Recent messages:
Loading /Users/rchristie/.emacs.d/rwc-c.el (source)...done
Loading /Users/rchristie/.emacs.d/rwc-defuns.el (source)...
Loading /Users/rchristie/.emacs.d/elpa/package.el (source)...done
Loading /Users/rchristie/.emacs.d/rwc-defuns.el (source)...done
Loading /Users/rchristie/.emacs.d/elpa/package.el (source)...done
Starting new Ispell process [default] ...
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list... [2 times]
Quit
Composing main Info directory...done

Load-path shadows:
/Users/rchristie/.emacs.d/vendor/gist.el/gist hides ~/.emacs.d/vendor/gist
/Users/rchristie/.emacs.d/git/vc-git hides
/Applications/Emacs.app/Contents/Resources/lisp/vc-git
~/.emacs.d/custom hides
/Applications/Emacs.app/Contents/Resources/lisp/custom
/Users/rchristie/dev/dotfiles/emacs.d/vendor/rinari/util/ruby-mode hides
/Applications/Emacs.app/Contents/Resources/lisp/progmodes/ruby-mode

[-- Attachment #2: Type: text/html, Size: 7417 bytes --]

             reply	other threads:[~2009-09-04 14:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0572B966-1678-4A1B-ABF0-83EFFCE126AB@gmail.com>
2009-09-04 14:32 ` Rob Christie [this message]
2009-09-19  0:05   ` bug#4339: marked as done (23.1.50; NextStep emacs port problem with key sequences in menus (with patch)) Emacs bug Tracking System

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

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

  git send-email \
    --in-reply-to=73143cf0909040732n26982298w6d5d5b10df238a9c@mail.gmail.com \
    --to=robchristie@gmail.com \
    --cc=4339@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    /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 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.