comparison lisp/prim/files-nomule.el @ 86:364816949b59 r20-0b93

Import from CVS: tag r20-0b93
author cvs
date Mon, 13 Aug 2007 09:09:02 +0200
parents c7528f8e288d
children fe104dbd9147
comparison
equal deleted inserted replaced
85:c661705957e0 86:364816949b59
18 ;; You should have received a copy of the GNU General Public License 18 ;; You should have received a copy of the GNU General Public License
19 ;; along with XEmacs; see the file COPYING. If not, write to the 19 ;; along with XEmacs; see the file COPYING. If not, write to the
20 ;; Free Software Foundation, 59 Temple Place - Suite 330, 20 ;; Free Software Foundation, 59 Temple Place - Suite 330,
21 ;; Boston, MA 02111-1307, USA. 21 ;; Boston, MA 02111-1307, USA.
22 22
23 ;;; Synched up with: FSF 19.34 (files.el). 23 ;;; Synched up with: FSF 19.34 (files.el). (Is it? Please check)
24 24
25 ;;; Commentary: 25 ;;; Commentary:
26 26
27 ;; These stubs were moved from the bottom of files.el. 27 ;; These stubs were moved from the bottom of files.el.
28 28
44 with the file contents. This is better than simply deleting and inserting 44 with the file contents. This is better than simply deleting and inserting
45 the whole thing because (1) it preserves some marker positions 45 the whole thing because (1) it preserves some marker positions
46 and (2) it puts less data in the undo list." 46 and (2) it puts less data in the undo list."
47 (insert-file-contents-internal filename visit beg end replace nil nil)) 47 (insert-file-contents-internal filename visit beg end replace nil nil))
48 48
49 (defun write-region (start end filename &optional append visit lockname) 49 (defun write-region (start end filename &optional append visit lockname coding-system)
50 "Write current region into specified file. 50 "Write current region into specified file.
51 When called from a program, takes three arguments: 51 When called from a program, takes three arguments:
52 START, END and FILENAME. START and END are buffer positions. 52 START, END and FILENAME. START and END are buffer positions.
53 Optional fourth argument APPEND if non-nil means 53 Optional fourth argument APPEND if non-nil means
54 append to existing file contents (if any). 54 append to existing file contents (if any).
61 If VISIT is neither t nor nil nor a string, 61 If VISIT is neither t nor nil nor a string,
62 that means do not print the \"Wrote file\" message. 62 that means do not print the \"Wrote file\" message.
63 The optional sixth arg LOCKNAME, if non-nil, specifies the name to 63 The optional sixth arg LOCKNAME, if non-nil, specifies the name to
64 use for locking and unlocking, overriding FILENAME and VISIT. 64 use for locking and unlocking, overriding FILENAME and VISIT.
65 Kludgy feature: if START is a string, then that string is written 65 Kludgy feature: if START is a string, then that string is written
66 to the file, instead of any buffer contents, and END is ignored." 66 to the file, instead of any buffer contents, and END is ignored.
67 Optional seventh argument CODING-SYSTEM is meaningful only if support
68 for Mule is present in XEmacs and specifies the coding system
69 used to encode the text when it is written out, and defaults to
70 the value of `file-coding-system' in the current buffer. When Mule
71 support is not present, the CODING-SYSTEM argument is ignored."
67 (interactive "r\nFWrite region to file: ") 72 (interactive "r\nFWrite region to file: ")
68 (write-region-internal start end filename append visit lockname nil)) 73 (write-region-internal start end filename append visit lockname nil))
69 74
70 (defun load (file &optional noerror nomessage nosuffix) 75 (defun load (file &optional noerror nomessage nosuffix)
71 "Execute a file of Lisp code named FILE. 76 "Execute a file of Lisp code named FILE.