Function: woman-special-characters

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

Signature

(woman-special-characters TO)

Documentation

Process special character escapes \(xx, M-x xxx (xxx) up to buffer position TO.

(This must be done AFTER translation, which may use special characters.)

Source Code

;; Defined in /usr/src/emacs/lisp/woman.el.gz
(defun woman-special-characters (to)
  "Process special character escapes \\(xx, \\[xxx] up to buffer position TO.
\(This must be done AFTER translation, which may use special characters.)"
  (while (re-search-forward "\\\\\\(?:(\\(..\\)\\|\\[\\([[^]]+\\)\\]\\)" to t)
    (let* ((name (or (match-string-no-properties 1)
		     (match-string-no-properties 2)))
	   (replacement (assoc name woman-special-characters)))
      (unless
	  (and
	   replacement
	   (cond ((and (cddr replacement)
		       (if (nthcdr 3 replacement)
			   ;; Need symbol font:
			   (if woman-use-symbol-font
			       (woman-replace-match (nth 2 replacement)
						    'woman-symbol))
			 ;; Need extended font:
			 (if woman-use-extended-font
			     (woman-replace-match (nth 2 replacement))))))
		 ((cadr replacement)	; Use ASCII simulation
		  (woman-replace-match (cadr replacement)))))
	(WoMan-warn (concat "Special character "
			    (if (match-beginning 1) "\\(%s" "\\[%s]")
			    " not interpolated!") name)
	(if woman-ignore (woman-delete-match 0))))))