Function: erc-unmorse

erc-unmorse is a byte-compiled function defined in erc-goodies.el.gz.

Signature

(erc-unmorse)

Documentation

Unmorse some text.

Add this to erc-insert-modify-hook if you happen to be on a channel that has weird people talking in morse to each other.

See also unmorse-region.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-goodies.el.gz
(defun erc-unmorse ()
  "Unmorse some text.
Add this to `erc-insert-modify-hook' if you happen to be on a
channel that has weird people talking in morse to each other.

See also `unmorse-region'."
  (goto-char (point-min))
  (when (re-search-forward "[.-]+[./ -]*[.-]/?" nil t)
    (save-restriction
      (narrow-to-region (match-beginning 0) (match-end 0))
      ;; Turn " / " into "  "
      (goto-char (point-min))
      (while (re-search-forward " / " nil t)
        (replace-match "  "))
      ;; Turn "/ " into "/"
      (goto-char (point-min))
      (while (re-search-forward "/ " nil t)
        (replace-match "/"))
      ;; Unmorse region
      (unmorse-region (point-min) (point-max)))))