summaryrefslogtreecommitdiff
blob: 6d96be603127eb4c8c538e84b558cf5c7e808d10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
diff -u ../qemacs/buffer.c ./buffer.c
--- ../qemacs/buffer.c	2006-12-31 20:34:01.000000000 +0100
+++ ./buffer.c	2007-02-26 15:00:50.000000000 +0100
@@ -1528,10 +1528,12 @@
     if (stat(filename, &st) == 0)
         mode = st.st_mode & 0777;
 
-    /* backup old file if present */
-    strcpy(buf1, filename);
-    strcat(buf1, "~");
-    rename(filename, buf1);
+ /* backup old file if present and make-backup-files is on */
+	if(mbf == 1) {
+		 strcpy(buf1, filename);
+		 strcat(buf1, "~");
+		rename(filename, buf1);
+	 }
 
     ret = b->data_type->buffer_save(b, filename);
     if (ret < 0)
Gemeinsame Unterverzeichnisse: ../qemacs/fonts und ./fonts.
Gemeinsame Unterverzeichnisse: ../qemacs/libqhtml und ./libqhtml.
Nur in ../qemacs: Makefile.orig.
Gemeinsame Unterverzeichnisse: ../qemacs/plugin-example und ./plugin-example.
diff -u ../qemacs/qe.c ./qe.c
--- ../qemacs/qe.c	2007-02-26 14:58:27.000000000 +0100
+++ ./qe.c	2007-02-26 15:02:13.000000000 +0100
@@ -67,6 +67,7 @@
 int trace_buffer_state;
 int no_init_file;
 const char *user_option;
+mbf = 1;
 
 /* mode handling */
 
@@ -4816,6 +4817,14 @@
     do_refresh(qs->first_window);
 }
 
+static void make_backup_files(EditState *s) {
+	if(mbf == 1) {
+		mbf = 0;
+	} else {
+		mbf = 1;
+	}
+}
+
 /* compute default path for find/save buffer */
 static void get_default_path(EditState *s, char *buf, int buf_size)
 {
diff -u ../qemacs/qeconfig.h ./qeconfig.h
--- ../qemacs/qeconfig.h	2007-01-12 16:06:16.000000000 +0100
+++ ./qeconfig.h	2007-02-26 15:03:30.000000000 +0100
@@ -86,6 +86,7 @@
           do_changecase_region, 0, "*v")
     CMDV( KEY_CTRLX(KEY_CTRL('u')), KEY_NONE, "upcase-region", 
           do_changecase_region, 1, "*v")
+	CMD0( KEY_NONE, KEY_NONE, "make-backup-files", make_backup_files)
 
     /* keyboard macros */
     CMD0( KEY_CTRLX('('), KEY_NONE, "start-kbd-macro", do_start_macro)
diff -u ../qemacs/qe.h ./qe.h
--- ../qemacs/qe.h	2007-01-12 16:06:16.000000000 +0100
+++ ./qe.h	2007-02-26 15:02:41.000000000 +0100
@@ -1422,6 +1422,8 @@
 void fill_border(EditState *s, int x, int y, int w, int h, int color);
 int qe_bitmap_format_to_pix_fmt(int format);
 
+int mbf;
+
 /* shell.c */
 EditBuffer *new_shell_buffer(const char *name, const char *path,
                              const char **argv, int is_shell);
Gemeinsame Unterverzeichnisse: ../qemacs/tests und ./tests.