[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gettext documentation: make key bindings for po-mode up-to-d
From: |
Bruno Haible |
Subject: |
Re: [PATCH] gettext documentation: make key bindings for po-mode up-to-date |
Date: |
Sat, 11 Oct 2008 19:02:58 +0200 |
User-agent: |
KMail/1.5.4 |
Hello Noritada,
> There remain some obsolete key bindings (used in the version 0.10.x
> era) in the po-mode section in the documentation. Here attach a patch
> to update them. Could you please check and apply it?
Thank you. I've applied it.
While testing it, I also noticed that although '_' performs an undo action,
the "Undo" item in the "Edit" menu is disabled. This is because Emacs'
menu-bar.el contains this code:
(define-key menu-bar-edit-menu [undo]
'(menu-item "Undo" undo
:enable (and (not buffer-read-only) ; <== HERE
(not (eq t buffer-undo-list))
(if (eq last-command 'undo)
(listp pending-undo-list)
(consp buffer-undo-list)))
:help "Undo last operation"))
and at the marked place the variable buffer-read-only is tested.
In po-mode, however, this variable is always t, and the variable
po-read-only should be tested instead. How could this be implemented?
I'm thinking of fetching this menu-item from the (current-global-map),
then applying a substitution buffer-read-only -> po-read-only, then
stuffing the result into the po-mode-map. But as I'm not familiar with
Emacs Lisp, I cannot find the right Emacs Lisp functions for doing this.
Bruno