Commit 9d4aa3e6 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(kom-change-parenthesis): Nytt kommando.

parent 5a9f78e6
......@@ -1405,6 +1405,33 @@ If you are not member in the conference it will be flagged with an asterisk."
(lyskom-format-insert 'change-name-nope name
(lyskom-get-error-text lyskom-errno)
lyskom-errno))))))
;;; ================================================================
;;; [ndra parentes - Change parenthesis
;;; Author: Per Cederqvist (template stolen from kom-change-name)
(def-kom-command kom-change-parenthesis ()
"Change the name of a person or conference."
(interactive)
(let ((conf-stat (lyskom-read-conf-stat
(lyskom-get-string 'name-to-be-changed)
'(all) nil nil t)))
(if (null conf-stat)
(lyskom-insert-string 'no-such-conf-or-pers)
(if (string-match "^\\([^(]*\\)(\\(.*\\))$" (conf-stat->name conf-stat))
(let* ((non-paren (match-string 1 (conf-stat->name conf-stat)))
(old-paren (match-string 2 (conf-stat->name conf-stat)))
(paren (lyskom-read-string (lyskom-get-string 'new-paren)
old-paren))
(name (concat non-paren "(" paren ")")))
(if (blocking-do 'change-name (conf-stat->conf-no conf-stat) name)
(lyskom-format-insert 'change-name-done name
(lyskom-default-button 'conf conf-stat))
(lyskom-format-insert 'change-name-nope name
(lyskom-get-error-text lyskom-errno)
lyskom-errno)))
(lyskom-insert-string 'no-paren-in-name)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment