comparison lisp/format.el @ 223:2c611d1463a6 r20-4b10

Import from CVS: tag r20-4b10
author cvs
date Mon, 13 Aug 2007 10:10:54 +0200
parents 262b8bb4a523
children 12579d965149
comparison
equal deleted inserted replaced
222:aae4c8b01452 223:2c611d1463a6
208 nil) 208 nil)
209 ;; Otherwise just call function, it will return annotations. 209 ;; Otherwise just call function, it will return annotations.
210 (funcall to-fn from to orig-buf))))) 210 (funcall to-fn from to orig-buf)))))
211 211
212 (defun format-decode (format length &optional visit-flag) 212 (defun format-decode (format length &optional visit-flag)
213 ;; This function is called by insert-file-contents whenever a file is read.
214 "Decode text from any known FORMAT. 213 "Decode text from any known FORMAT.
215 FORMAT is a symbol appearing in `format-alist' or a list of such symbols, 214 FORMAT is a symbol appearing in `format-alist' or a list of such symbols,
216 or nil, in which case this function tries to guess the format of the data by 215 or nil, in which case this function tries to guess the format of the data by
217 matching against the regular expressions in `format-alist'. After a match is 216 matching against the regular expressions in `format-alist'. After a match is
218 found and the region decoded, the alist is searched again from the beginning 217 found and the region decoded, the alist is searched again from the beginning
223 to the list of formats used, and call any mode functions defined for those 222 to the list of formats used, and call any mode functions defined for those
224 formats. 223 formats.
225 224
226 Returns the new length of the decoded region. 225 Returns the new length of the decoded region.
227 226
228 For most purposes, consider using `format-decode-region' instead." 227 For most purposes, consider using `format-decode-region' instead.
228
229 This function is called by insert-file-contents whenever a file is read."
229 (let ((mod (buffer-modified-p)) 230 (let ((mod (buffer-modified-p))
230 (begin (point)) 231 (begin (point))
231 (end (+ (point) length))) 232 (end (+ (point) length)))
232 (if (null format) 233 (if (null format)
233 ;; Figure out which format it is in, remember list in `format'. 234 ;; Figure out which format it is in, remember list in `format'.