Function: woman-translate

woman-translate is a byte-compiled function defined in woman.el.gz.

Signature

(woman-translate TO)

Documentation

Translate up to marker TO. Do this last of all transformations.

Source Code

;; Defined in /usr/src/emacs/lisp/woman.el.gz
(defsubst woman-translate (to)
  "Translate up to marker TO.  Do this last of all transformations."
  (if (bound-and-true-p woman-translations)
      (let ((matches (car woman-translations))
	    (alist (cdr woman-translations))
	    ;; Translations are case-sensitive, eg ".tr ab" does not
	    ;; affect "A" (bug#6849).
	    (case-fold-search nil))
	(while (re-search-forward matches to t)
	  ;; Done like this to retain text properties and
	  ;; support translation of special characters:
	  (insert-before-markers-and-inherit
	   (cdr (assoc
		 (buffer-substring-no-properties
		  (match-beginning 0) (match-end 0))
		 alist)))
	  (woman-delete-match 0)))))