summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-editors/qemacs/files/qemacs-0.4.0_pre20080605-make_backup.patch
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-editors/qemacs/files/qemacs-0.4.0_pre20080605-make_backup.patch')
-rw-r--r--app-editors/qemacs/files/qemacs-0.4.0_pre20080605-make_backup.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/app-editors/qemacs/files/qemacs-0.4.0_pre20080605-make_backup.patch b/app-editors/qemacs/files/qemacs-0.4.0_pre20080605-make_backup.patch
new file mode 100644
index 000000000000..cdfe4c439db8
--- /dev/null
+++ b/app-editors/qemacs/files/qemacs-0.4.0_pre20080605-make_backup.patch
@@ -0,0 +1,68 @@
+Add make-backup-files command for backup toggling, from upstream mailing list:
+http://lists.gnu.org/archive/html/qemacs-devel/2004-11/msg00007.html
+http://bugs.gentoo.org/75052
+
+--- buffer.c.orig 2009-03-07 21:14:02.000000000 +0100
++++ buffer.c 2009-03-07 21:15:40.000000000 +0100
+@@ -1657,12 +1657,14 @@
+ if (stat(filename, &st) == 0)
+ mode = st.st_mode & 0777;
+
+- /* backup old file if present */
+- if (strlen(filename) < MAX_FILENAME_SIZE - 1) {
++ /* backup old file if present and make-backup-files is on */
++ if(mbf == 1) {
++ if (strlen(filename) < MAX_FILENAME_SIZE - 1) {
+ if (snprintf(buf1, sizeof(buf1), "%s~", filename) < ssizeof(buf1)) {
+ // should check error code
+ rename(filename, buf1);
+ }
++ }
+ }
+
+ /* CG: should pass mode to buffer_save */
+--- qe.c.orig 2009-03-07 21:14:09.000000000 +0100
++++ qe.c 2009-03-07 21:17:01.000000000 +0100
+@@ -71,6 +71,7 @@
+ static int screen_height = 0;
+ static int no_init_file;
+ static const char *user_option;
++mbf = 1;
+
+ /* mode handling */
+
+@@ -5316,6 +5317,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)
+ {
+--- qeconfig.h.orig 2009-03-07 21:14:19.000000000 +0100
++++ qeconfig.h 2009-03-07 21:17:37.000000000 +0100
+@@ -192,6 +192,7 @@
+ "downcase-region", do_changecase_region, ESi, -1, "*v")
+ CMD3( KEY_CTRLX(KEY_CTRL('u')), KEY_NONE,
+ "upcase-region", do_changecase_region, ESi, 1, "*v")
++ CMD0( KEY_NONE, KEY_NONE, "make-backup-files", make_backup_files)
+
+ /*---------------- Command handling ----------------*/
+
+--- qe.h.orig 2009-03-07 21:14:26.000000000 +0100
++++ qe.h 2009-03-07 21:17:53.000000000 +0100
+@@ -1765,6 +1765,7 @@
+ /* image.c */
+ 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(EditBuffer *b0, const char *name,