emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/transcribe 89832e4 24/27: packages/transcribe.el: inter


From: Stefan Monnier
Subject: [elpa] externals/transcribe 89832e4 24/27: packages/transcribe.el: interface improvements
Date: Tue, 1 Dec 2020 17:33:51 -0500 (EST)

branch: externals/transcribe
commit 89832e4cdc1e6d8262a4a2c9d1ff70f398b8faf0
Author: David Gonzalez Gandara <dggandara@member.fsf.org>
Commit: David Gonzalez Gandara <dggandara@member.fsf.org>

    packages/transcribe.el: interface improvements
---
 transcribe.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/transcribe.el b/transcribe.el
index 1ae4696..47b7c4a 100644
--- a/transcribe.el
+++ b/transcribe.el
@@ -3,7 +3,7 @@
 ;; Copyright 2014-2016  Free Software Foundation, Inc.
 
 ;; Author: David Gonzalez Gandara <dggandara@member.fsf.org>
-;; Version: 1.5.1
+;; Version: 1.5.2
 
 ;; This program is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -286,10 +286,10 @@
 
 
 (defun transcribe-xml-tag-person (xmltag move)
-  "This function allows the automatic insetion of a speaker xml tag and places 
the cursor."
+  "This function allows the automatic insertion of a speaker xml tag and 
places the cursor."
   (interactive (list(read-string "Person:")(completing-read "move:" 
transcribe-move-list))) 
-  ;;(interactive "stag:")
-  (insert (format "<%s move=\"%s\"></%s>" xmltag move xmltag))
+  (end-of-line)
+  (insert (format "\n<%s move=\"%s\"></%s>" xmltag move xmltag))
   (backward-char 3)
   (backward-char (string-width xmltag)))
 
@@ -321,19 +321,21 @@
   (insert (format "function=\"%s\"" val)))
 
 (defun transcribe-add-attribute-move (val)
-  "Adds the xml attribute `move' at cursor with the name specified 
(autocompletion possible"
+  "Adds the xml attribute `move' at cursor with the name specified 
(autocompletion possible)"
   (interactive (list(completing-read "move name:" transcribe-move-list)))
   (insert (format "move=\"%s\"" val)))
 
 (defun transcribe-xml-tag-l1 ()
   "Inserts a l1 tag and places the cursor"
   (interactive)
+  (re-search-forward "</l.>" (line-end-position) t)
   (insert "<l1 clauses=\"1\" errors=\"0\" function=\"\"></l1>")
   (backward-char 5))
 
 (defun transcribe-xml-tag-l2 ()
   "Inserts a l2 tag and places the cursor"
   (interactive)
+  (re-search-forward "</l.>" (line-end-position) t)
   (insert "<l2 clauses=\"1\" errors=\"0\" function=\"\"></l2>")
   (backward-char 5))
 



reply via email to

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