(gtex "German TeX (encoding)"
nil
iso-gtex2iso iso-iso2gtex t nil)
- (html "HTML (encoding)"
+ (html "HTML/SGML \"ISO 8879:1986//ENTITIES Added Latin 1//EN\" (encoding)"
nil
- "recode -f html:latin1" "recode -f latin1:html" t nil)
+ iso-sgml2iso iso-iso2sgml t nil)
(rot13 "rot13"
nil
"tr a-mn-z n-za-m" "tr a-mn-z n-za-m" t nil)
BUFFER should be the buffer that the output originally came from."
(if (stringp method)
(let ((error-buff (get-buffer-create "*Format Errors*"))
- (coding-system-for-write 'no-conversion)
+ (coding-system-for-read 'no-conversion)
format-alist)
(with-current-buffer error-buff
(widen)
a Lisp function. Decoding is done for the given BUFFER."
(if (stringp method)
(let ((error-buff (get-buffer-create "*Format Errors*"))
- (coding-system-for-read 'no-conversion) ; like jka-compr
+ (coding-system-for-write 'no-conversion)
format-alist)
(with-current-buffer error-buff
(widen)
b (cdr b)))
a)
+(defun format-proper-list-p (list)
+ "Return t if LIST is a proper list.
+A proper list is a list ending with a nil cdr, not with an atom "
+ (when (listp list)
+ (while (consp list)
+ (setq list (cdr list)))
+ (null list)))
+
(defun format-reorder (items order)
"Arrange ITEMS to following partial ORDER.
Elements of ITEMS equal to elements of ORDER will be rearranged to follow the
; See format-deannotate-region and
; format-annotate-region.
+;; This text property has list values, but they are treated atomically.
+
+(put 'display 'format-list-atomic-p t)
+
;;;
;;; Decoding
;;;
(if (not prop-alist)
nil
;; If either old or new is a list, have to treat both that way.
- (if (or (consp old) (consp new))
- (let* ((old (if (listp old) old (list old)))
- (new (if (listp new) new (list new)))
- (tail (format-common-tail old new))
- close open)
- (while old
- (setq close
- (append (car (format-annotate-atomic-property-change
- prop-alist (car old) nil))
- close)
- old (cdr old)))
- (while new
- (setq open
- (append (cdr (format-annotate-atomic-property-change
- prop-alist nil (car new)))
- open)
- new (cdr new)))
- (format-make-relatively-unique close open))
+ (if (and (or (listp old) (listp new))
+ (not (get prop 'format-list-atomic-p)))
+ (if (or (not (format-proper-list-p old))
+ (not (format-proper-list-p new)))
+ (format-annotate-atomic-property-change prop-alist old new)
+ (let* ((old (if (listp old) old (list old)))
+ (new (if (listp new) new (list new)))
+ (tail (format-common-tail old new))
+ close open)
+ (while old
+ (setq close
+ (append (car (format-annotate-atomic-property-change
+ prop-alist (car old) nil))
+ close)
+ old (cdr old)))
+ (while new
+ (setq open
+ (append (cdr (format-annotate-atomic-property-change
+ prop-alist nil (car new)))
+ open)
+ new (cdr new)))
+ (format-make-relatively-unique close open)))
(format-annotate-atomic-property-change prop-alist old new)))))
(defun format-annotate-atomic-property-change (prop-alist old new)