[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[zile-devel] [patch] Adjustment of the default config for backups
From: |
Nicolas Duboc |
Subject: |
[zile-devel] [patch] Adjustment of the default config for backups |
Date: |
Fri, 18 Aug 2006 15:00:40 +0200 |
User-agent: |
mutt-ng/devel-r804 (Debian) |
Hi,
While testing my Debian package for zile 2.2.17 I found a bug in the
current state of the backup system.
Contrarily to what the doc says, make-backup-files defaults to false
(nil). It's because this variable is not declared in tbl_vars.h.
Then I found that the actual default value for backup-directory is
"~/.backup" (doc says nil). I think nil is a better default value
because ~/.backup will certainly not exist on user's account and will
produce errors on save.
The following patch corrects these two issues. The patch also remove
obsolete variables from tbl_vars.h, correct a typo and document the
behavior when backup-directory is nil.
Regards,
--
Nicolas Duboc <address@hidden>
----------------------------------------
diff -ur /home/nico/src/zile-2.2.17/doc/dotzile.sample ./doc/dotzile.sample
--- /home/nico/src/zile-2.2.17/doc/dotzile.sample 2006-07-18
02:48:09.000000000 +0200
+++ ./doc/dotzile.sample 2006-08-18 14:44:40.000000000 +0200
@@ -60,7 +60,8 @@
; Specify target backup directory [default: nil]
; If set to a directory name (which must exist), backups are created
-; in that directory.
+; in that directory. Otherwise backups are created alongside the
+; backuped file.
(setq backup-directory nil)
; Rebind keys
diff -ur /home/nico/src/zile-2.2.17/src/tbl_vars.h ./src/tbl_vars.h
--- /home/nico/src/zile-2.2.17/src/tbl_vars.h 2006-07-25 14:27:02.000000000
+0200
+++ ./src/tbl_vars.h 2006-08-18 14:43:09.000000000 +0200
@@ -11,28 +11,15 @@
* - "b" for boolean ("t" or "nil");
* - "" (empty string) for non-fixed format.
* The third column specifies the default value.
- * The third column specifies whether the variable becomes local when set.
+ * The fourth column specifies whether the variable becomes local when set.
* The fifth column specifies the variable documentation.
*/
X("auto-fill-mode", "b", "nil", FALSE, "\
If enabled, the Auto Fill Mode is automatically enabled.")
-X("backup-directory", "", "~/.backup", FALSE, "\
+X("backup-directory", "", "nil", FALSE, "\
Specify target backup directory. Directory must be existent.\n\
-This value is used only when the `backup-with-directory' value is true.")
-X("backup-method", "", "simple", FALSE, "\
-Specify the file backup method.\n\
-\n\
-Possible values are: none and simple.\n\
-\n\
- - If `none' is specified, Zile will not create backup files.\n\
- - If `simple' is specified, Zile will create a backup file with a\n\
- tilde `~' appended to the name (e.g.: on saving `foo.c' it will\n\
- create the backup `foo.c~').")
-X("backup-with-directory", "b", "nil", FALSE, "\
-If enabled Zile will backup files to a user specified directory;\n\
-the directory must exist and must be specified in the\n\
-variable `backup-directory'.")
+This value is used only when the `make-backup-files' value is true.")
X("beep", "b", "t", FALSE, "\
If enabled, a sound will be emitted on any error.")
X("case-fold-search", "b", "t", TRUE, "\
@@ -49,6 +36,9 @@
spaces.")
X("kill-whole-line", "b", "nil", FALSE, "\
If enabled, `kill-line' with no arg at beg of line kills the whole line.")
+X("make-backup-files", "b", "t", FALSE, "\
+If enabled, Zile will create a backup file with a tilde `~' appended\n\
+to the file name")
X("skip-splash-screen", "b", "nil", FALSE, "\
If enabled, the splash screen at startup will be avoided.")
X("standard-indent", "", "4", FALSE, "\
pgpC5uHxeNrBc.pgp
Description: PGP signature
- [zile-devel] [patch] Adjustment of the default config for backups,
Nicolas Duboc <=