Ryan Bowman <[EMAIL PROTECTED]> writes: > Suppose I have an integer, say 10. If I (format "%c" > 10) it prints a newline. If I do > (text-char-description 10) it prints "^J". Is there a > function that will take an int (10) and print "\n"?
(defun char-to-escape (ch) (let ((a (assoc ch '((7 . "\\a")(8 . "\\b")(9 . "\\t")(10 . "\\n") (11 . "\\v")(12 . "\\f")(13 . "\\r")(27 . "\\e") (34 . "\\\"")(92 . "\\\\")(127 . "^?"))))) (cond (a (cdr a)) ((< ch 32) (format "^%c" (+ 64 ch))) (t (format "%c" ch))))) (dotimes (i 128) (insert (char-to-escape i) " ")) ^@ ^A ^B ^C ^D ^E ^F \a \b \t \n \v \f \r ^N ^O ^P ^Q ^R ^S ^T ^U ^V ^W ^X ^Y ^Z \e ^\ ^] ^^ ^_ ! \" # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ ^? -- __Pascal Bourguignon__ http://www.informatimago.com/ _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs