[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch for po-edit-string in po-mode
From: |
Kenichi Handa |
Subject: |
patch for po-edit-string in po-mode |
Date: |
Wed, 09 Dec 2009 10:27:54 +0900 |
Hi, attached is a patch to fix a small problem of
po-edit-string. Currently it creates an edit-buffer without
explicitly setting a major mode. So, functions in
after-change-major-mode-hook doesn't run in that buffer.
This is a reply from a maintainer of Emacs
------------------------------------------------------------
> It seems that the global minor mode defined by
> define-global-minor-mode doesn't work in a newly created
> buffer of fundamental mode.
> Isn't this a bug?
I think it's not, tho it's obviously a misfeature. I think the best
answer is to say that a buffer that is intended to be displayed to the
user should call a major-mode function. If there's no specific
major-mode for it, it should call fundamental-mode.
------------------------------------------------------------
The better will be to make a real major-mode (say,
po-subedit-mode) that inherits most features from text-mode.
---
Kenichi Handa
address@hidden
diff -u /home/handa/emacslisp/po-mode.el.orig /home/handa/emacslisp/po-mode.el
--- /home/handa/emacslisp/po-mode.el.orig 2009-12-09 10:19:10.000000000
+0900
+++ /home/handa/emacslisp/po-mode.el 2009-12-09 10:19:16.000000000 +0900
@@ -2303,6 +2303,7 @@
(setq slot (list marker edit-buffer overlay)
po-edited-fields (cons slot po-edited-fields))
(pop-to-buffer edit-buffer)
+ (fundamental-mode)
(set (make-local-variable 'po-subedit-back-pointer) slot)
(set (make-local-variable 'indent-line-function)
'indent-relative)
Diff finished. Wed Dec 9 10:19:28 2009
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- patch for po-edit-string in po-mode,
Kenichi Handa <=