comparison lisp/format.el @ 90233:ee12d75eb214

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-85 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 556-561) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 122-124) - Update from CVS: lisp/mm-url.el (mm-url-decode-entities): Fix regexp. - Update from CVS
author Miles Bader <miles@gnu.org>
date Sun, 25 Sep 2005 22:07:01 +0000
parents 2d92f5c9d6ae ed770a0a7846
children c5406394f567
comparison
equal deleted inserted replaced
90232:eab32348047a 90233:ee12d75eb214
305 "Translate the buffer from some FORMAT. 305 "Translate the buffer from some FORMAT.
306 If the format is not specified, this function attempts to guess. 306 If the format is not specified, this function attempts to guess.
307 `buffer-file-format' is set to the format used, and any mode-functions 307 `buffer-file-format' is set to the format used, and any mode-functions
308 for the format are called." 308 for the format are called."
309 (interactive 309 (interactive
310 (list (format-read "Translate buffer from format (default: guess): "))) 310 (list (format-read "Translate buffer from format (default guess): ")))
311 (save-excursion 311 (save-excursion
312 (goto-char (point-min)) 312 (goto-char (point-min))
313 (format-decode format (buffer-size) t))) 313 (format-decode format (buffer-size) t)))
314 314
315 (defun format-decode-region (from to &optional format) 315 (defun format-decode-region (from to &optional format)
316 "Decode the region from some format. 316 "Decode the region from some format.
317 Arg FORMAT is optional; if omitted the format will be determined by looking 317 Arg FORMAT is optional; if omitted the format will be determined by looking
318 for identifying regular expressions at the beginning of the region." 318 for identifying regular expressions at the beginning of the region."
319 (interactive 319 (interactive
320 (list (region-beginning) (region-end) 320 (list (region-beginning) (region-end)
321 (format-read "Translate region from format (default: guess): "))) 321 (format-read "Translate region from format (default guess): ")))
322 (save-excursion 322 (save-excursion
323 (goto-char from) 323 (goto-char from)
324 (format-decode format (- to from) nil))) 324 (format-decode format (- to from) nil)))
325 325
326 (defun format-encode-buffer (&optional format) 326 (defun format-encode-buffer (&optional format)