[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Positioning point after insert in another buffer

From: francis
Subject: Positioning point after insert in another buffer
Date: Thu, 9 Dec 2004 19:28:01 +0100

I am internationalising an application, and am trying to write a simple
emacs lisp function to kill the current region, insert a message into a
resource file in another buffer and then insert code to retrieve and
display the message.

The problem I have is that after I have executed my function the point
in the resource file is at the beginning of the inserted message. I
want it to be at the end, so when I run my function several times the
messages appear in the resource file in the order I created them. How
can I do this?

Here's the function:

(defvar fjdjava-message-buffer-name "")
(defun fjdjava-region-to-message (key)
  "Converts the region into a message in the buffer named
  (interactive "sMessage key: \n")
  (kill-region (point) (mark))
    (set-buffer fjdjava-message-buffer-name)
    (insert key " = ")
    (insert "\n"))
  (insert "<bean:message key=\"" key "\" />"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]