Function: denato-region
denato-region is an autoloaded, interactive and byte-compiled function
defined in morse.el.gz.
Signature
(denato-region BEG END)
Documentation
Convert NATO spelling alphabet text in region to plain text.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/play/morse.el.gz
;;;###autoload
(defun denato-region (beg end)
"Convert NATO spelling alphabet text in region to plain text."
;; Copied from unmorse-region. -- ashawley 2009-02-10
(interactive "*r")
(if (integerp end)
(setq end (copy-marker end)))
(save-excursion
(let (str paren nato)
(goto-char beg)
(while (< (point) end)
(if (null (looking-at "[a-z]+"))
(forward-char 1)
(setq str (buffer-substring (match-beginning 0) (match-end 0)))
(if (null (setq nato (rassoc (capitalize str) nato-alphabet)))
(goto-char (match-end 0))
(replace-match
(if (string-equal "(" (car nato))
(if (setq paren (null paren)) "(" ")")
(car nato)) t)
(if (looking-at "-")
(delete-char 1))))))))